netbox-sync icon indicating copy to clipboard operation
netbox-sync copied to clipboard

Exceptions for sync_vm_dummy_interfaces

Open Azmodeszer opened this issue 1 year ago • 8 comments

Is there a way to specify VM/hostname-based exceptions for skipping the virtual interface import? Right now, as far as I can see, the sync_vm_dummy_interfaces option is all or nothing, but we have a few cases where it would be desirable for the virtual interface to show up in Netbox.

Azmodeszer avatar Feb 12 '24 13:02 Azmodeszer

Hey,

Can you give me some examples? Adding a filter option or changing it into one seems doable.

bb-Ricardo avatar Feb 12 '24 13:02 bb-Ricardo

We have a couple of virtual DNS servers sharing a pair of (public) anycast IPs for loadbalancing. For each server these two IPs are assigned to dummy interfaces inside the VM. With the flag set to false they are naturally excluded, but needless to say that this information would be useful to have.

Azmodeszer avatar Feb 12 '24 14:02 Azmodeszer

Mhh, not sure what to base the filer on.

This is an example from my test environment:

2024-02-13 17:21:52,339 - INFO: Created new virtual machine interface object: vNIC Dummy-0000 (abc-9-jj8fs)
2024-02-13 17:21:52,412 - INFO: Created new IP address object: 192.168.5.192/32
2024-02-13 17:21:53,092 - INFO: Created new virtual machine interface object: vNIC Dummy-0000 (abc-9-wwn46)
2024-02-13 17:21:53,167 - INFO: Created new IP address object: 192.168.244.64/32
2024-02-13 17:21:53,554 - INFO: Created new virtual machine interface object: vNIC Dummy-0000 (abc-9-sc57c)
2024-02-13 17:21:53,626 - INFO: Created new IP address object: 192.168.122.0/32

Based on the interface name?

Also have this in my example:

2024-02-13 17:23:30,376 - INFO: Created new virtual machine interface object: vNIC Dummy-ADC6 (abc_www)
2024-02-13 17:23:30,496 - INFO: Created new virtual machine interface object: vNIC Dummy-8049 (abc_www)
2024-02-13 17:23:31,503 - INFO: Created new virtual machine interface object: vNIC Dummy-94F8 (Docker-test)

What do you think?

bb-Ricardo avatar Feb 13 '24 16:02 bb-Ricardo

It's only a few machines in my use case, so a whitelist of VM names would be enough for me.

Azmodeszer avatar Feb 14 '24 10:02 Azmodeszer

Hi. Any news here? :)

Azmodeszer avatar Jul 12 '24 09:07 Azmodeszer

I'm really sorry, this project did not get the attention it deserves lately.

Also happy to merge Pull Requests.

bb-Ricardo avatar Jul 13 '24 14:07 bb-Ricardo