-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cisco IOL kind #2211
Add Cisco IOL kind #2211
Conversation
@hellt. I have tested and got an OSPF adjacency between two IOL nodes connected via an IOL-L2 switch. name: iol
topology:
nodes:
r1:
kind: cisco_iol
image: vrnetlab/vr-iol:17.12.01
r2:
kind: cisco_iol
image: vrnetlab/vr-iol:17.12.01
sw1:
kind: cisco_iol
image: vrnetlab/vr-iol-l2:17.12.01
links:
- endpoints: ["r1:e0/1", "sw1:e0/1"]
- endpoints: ["r2:e0/1", "sw1:Ethernet0/2"] I think both PRs should be good to be reviewed. Let me know if i've missed any functionality. |
Thanks @kaelemc! |
@hellt IOL type has been added, can be either I've also made it so interfaces can now be defined in a non-contiguous manner. For example you can now have something like this links:
- endpoints: ["router:Ethernet1/2", "switch:e0/4"] previously interfaces had to be added sequentially (if you wanted to use e0/4 it meant that e0/1, e0/2, e0/3 had to be defined first). I have one problem. IOL interfaces can only have 4 interfaces per slot. That means if I wanted to use |
I think we should stick with the contiguous interface naming requirement even though the code can handle otherwise. Even if a user uses a random interface without declaring/using the previous, all interfaces will show up in the CLI anyways which might just create extra confusion. The regex issue is still a problem as soon as a user wants more than 3 data-plane interfaces in their topology. |
…e ethX based interface names when adding endpoints.
I'm not sure if this was the right way to do it but interfaces are assigned to the container following
Interfaces are assigned in groups of four so each slot has max 4 interfaces, because of this the slot is multiplied by 4, the port index is added and then we add them and get out The topology will still only accept the CLI style interface names and NOT I have done my 'famous' OSPF adjacency test using the following topology: name: iol
topology:
nodes:
r1:
kind: cisco_iol
image: vrnetlab/cisco_iol:17.12.01
r2:
kind: cisco_iol
image: vrnetlab/cisco_iol:17.12.01
sw1:
kind: cisco_iol
image: vrnetlab/cisco_iol:l2-17.12.01
type: l2
links:
- endpoints: ["r1:e0/1", "sw1:e0/1"]
- endpoints: ["r2:e0/1", "sw1:e1/2"] |
…efined interface error message.
…minor formatting.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2211 +/- ##
==========================================
+ Coverage 50.70% 51.54% +0.84%
==========================================
Files 171 171
Lines 12536 12631 +95
==========================================
+ Hits 6356 6511 +155
+ Misses 5291 5212 -79
- Partials 889 908 +19
|
Relevant to hellt/vrnetlab#256. This adds Cisco IOL as a kind in containerlab.
The kind is name
cisco_iol
let me know if you want this changed. I've also created the node as aVRNode
type, I figured that'd be the easiest way to get the nice interface names.IOL also doesn't support NETCONF so configuration saving isn't possible by those means, but the user is able to perform
copy run start
orwrite memory
locally on IOL and it'll save to the nvram (which is stored under the labdirectory). That way config persistence is achieved.Still working on documentation and other things.