[FR] Exclude VM's disk sync based on tags or name
Currently, there is no way of excluding the sync of partial information, for example disks. We can only exclude based on VM name or a VLAN.
For example when running veeam, there are VMs which gets a "Independent-nonpersistent" attachment of the VMs volume disk which is currently being back upped. This causes, upon run of netbox-sync, to get a change log entry for a temporary disk attached to a backup VM. If run again and the backup finished, it creates a new change log entry for removal of the disk, resulting in a large change log set only for adding and removing disks from a particiular set of VMs.
It would be great to have a filter for specific VMs or VM Tags, which excludes them from disk-syncing and/or other information as well. Maybe some kind of "basic information" filter I guess?
Hey, then it would be great if you could create a pull request. This would make it super easy to review and merge.
Thank you.
Hi @Littlericket,
sorry, I didn't want to sound rude. There was another post right under yours which suggested code but this post has then been deleted. Have never seen that.
I can image that it would be better to just exclude the backup drives from being synched.
Is there any common pattern by which the backup drives could be recognised?
@bb-Ricardo no issue here. Seems like the comment was some AI generated cursor-style change. Nevertheless it seems like the feature I've requested is this change somehow.
I think we can not really recognize the drives, since they have no extra information that this disk is attached because of a block backup. The only thing which differes from the disk on the VM is the "Independent-nonpersistent" tag.
For the attached disk on the VM it is mounted as "Persistent".
I will try to get a PR ready but I am not very confident with python.
Hey @Littlericket,
nonpersistent sounds like good hint to me.