You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really useful if we can see device as virtual chassis master and connect them together, rather then individual stack members, if logical scheme is needed.
If we have core-sw1 with 2 physical cisco devices in stack we will import followtin objects into netbox:
virtual-chassis object called core-sw1
core-sw1 (device type core switch) - master in virtual chassis
core-sw1_1 (device type core switch stack)
core-sw1_2 (device type core switch stack)
In virtual chassis object, core-sw1 device object will be denoted as master with only virtual interfaces created on it.
Individual members (core-sw1_1 and core-sw1_2) would have interfaces 1/0/1-48 and 2/0/1-48, respectively.
Logic could be something in line:
nb_devices = nb.dcim.devices.filter(site_id=site.id)
masters_checked = []
for device in nb_devices:
if device.virtual_chassis:
vc = nb.dcim.virtual_chassis.get(device.virtual_chassis.id)
if vc.master.name not in masters_imported:
masters_checked.append(vc.master.name)
device_for_connection = nb.dcim.devices.get(vc.master.id)
else:
# as usual :)
Afterwards all interfaces will be present on device_for_connection. We just need to keep track of already connected device, so we don't check twice for all stack members.
The text was updated successfully, but these errors were encountered:
One more note:
Since many users prepared scripts and are using plugin as is, maybe it would be good to add one more button on top to select "group with virtual chassis" if grouping is wanted or if that is not selected to work as is.
It would be really useful if we can see device as virtual chassis master and connect them together, rather then individual stack members, if logical scheme is needed.
If we have core-sw1 with 2 physical cisco devices in stack we will import followtin objects into netbox:
In virtual chassis object, core-sw1 device object will be denoted as master with only virtual interfaces created on it.
Individual members (core-sw1_1 and core-sw1_2) would have interfaces 1/0/1-48 and 2/0/1-48, respectively.
Logic could be something in line:
Afterwards all interfaces will be present on device_for_connection. We just need to keep track of already connected device, so we don't check twice for all stack members.
The text was updated successfully, but these errors were encountered: