bb-Ricardo / netbox-sync

Sync objects from VMware or redfish sources to NetBox
MIT License
290 stars 65 forks source link

Device platform relation missing (?) #408

Closed lucafabbri365 closed 1 month ago

lucafabbri365 commented 2 months ago

Hello, I'm using NetBox-Sync to sync VMware with NetBox. The _vm_platformrelation parameter is employed to map the VMware platform name to my own platform name (defined in NetBox). This option works fine for platforms associated with VMs, but it doesn't work for platforms associated with devices (VMware hosts).

Example (settings.yaml)

...
vm_platform_relation: Red Hat Enterprise Linux 8.* = Red Hat Enterprise Linux 8, VMware ESXi 7.* = VMware ESXi 7.0 Update 3o, VMware ESXi 8.* = VMware ESXi 8.0 Update 2b
...

Mapping between Red Hat Enterprise Linux 8 (64-bit) (from VMware) and Red Hat Enterprise Linux 8 (NetBox) is working fine; however mapping between VMware ESXi 7.0.3 (from VMware) and VMware ESXi 7.0 Update 3o (NetBox) is not working, as well as VMware ESXi 8.0.2 (from VMware) and VMware ESXi 8.0 Update 2b (NetBox): it creates two platforms VMware ESXi 7.0.3 and VMware ESXi 8.0.2.

What am I doing wrong?

bb-Ricardo commented 2 months ago

Hi,

Thank you for this report. I think you're not doing anything wrong. This relation is just missing.

will add this one as well

bb-Ricardo commented 2 months ago

Hi, just added it to the development branch. Would you be able to test it out? the new config option is called host_platform_relation

Thank you

lucafabbri365 commented 1 month ago

Hello @bb-Ricardo, tested and worked fine !!!

May I continue using the version from development branch ?

Thank you.

bb-Ricardo commented 1 month ago

That is up to you. You can use dev branch for now. I usually try to keep it clean.

Hope to merge this soon to main.