-
Notifications
You must be signed in to change notification settings - Fork 72
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
Including unmanaged devices in lab topology #547
Comments
It looks like the best way to handle this would be to have a special devices.features flag (maybe A one-stop solution might be to remove "ghost" devices at the end of data transformation process, unless we want to see them in graphs and Graphite, in which case we have to clean up the nodes dictionary in inventory and provider output modules. Should we go for the latter option, I'd recommend adding a shared routine to augment/nodes.py (how about "ghost_buster") and calling it from every provider module that needs this functionality. Just keep in mind that a user might chain a bunch of output modules in sequence, so we have to make sure the original topology data is intact for the next module. Not sure whether we already make a copy of the data before doing anything with it in provider and inventory output modules -- if not, the "ghost_buster" routine could make a copy of the topology with Box(topology,...parameters...) and then work on that. |
I'm starting to work on this. Shouln't be better, at this point, to simply have a parameter like At the end of the day, any kind of device should be able to support ghost mode. I'll create a branch and start working on some code, so we can see how it can be. |
Preview: ssasso@1ac2f3e Note: it could be great to add a test case for that with the "expected" topology output. But this means I need to modify also the YAML output provider, since its output is used for the test itself. Could that be ok for you? Note 2: I tested it with both libvirt and clab providers. |
Looks good to me (maybe we should use "unmanaged" attribute while talking about ghosts in behind the scenes ;). As for a test case: of course it would be nice to be able to test this functionality. Tests don't use output provider (at least the ones working with |
Should have said "using node attributes makes more sense than a weird device type and allows us to do all sorts of interesting stuff in the future" ;) I'm coming down with fever, so maybe I should stop typing... |
Implemented in ed38601 |
Discussed in #538
Originally posted by ssasso October 4, 2022
I have a setup when I want netlab to take care of some network gear equipment config (using the external provider), but at the same time I need to establish peerings with their counterparts which should not be configured by netlab.
(i.e. configure a BGP session on a device controlled by netlab)
I was thinking to use the none device type for that kind of stuff, with sth like:
(for this specific example, I need pe1 to have two configured bgp sessions towards 10.211.211.11 and 10.211.211.12.)
But unfortunately the none device does not support vlan, vrf, and bgp.
Do you think it would be a good idea to allow the none device type to support all modules,
or should I use a real platform on all the devices, and the rely on a group of configurable devices to limit the ansible config with
-l group
?The text was updated successfully, but these errors were encountered: