netbox-sync: fix orphan tagging if 'ignore_unknown_source_object_puning' is set to true

Hi Ricardo, I remember that you said that to me, but as soon I saw this issue, I reworked my entire docker deployment πŸ˜… The main problem arise with this condition https://github.com/bb-Ricardo/netbox-sync/blob/main/module/netbox/inventory.py#L314. A simple continue is not enough, the entire process of orphan tagging is skipped.

Maybe a condition like:

if this object has a tag that matches the current loaded source: orphan tagging is allowed.
Otherwise: object is not part of the loaded source so skip.

If I find some time, in the next few days, I will have a look at it and discuss with you a better solution. Thank you

_Originally posted by @rizlas in https://github.com/bb-Ricardo/netbox-sync/issues/176#issuecomment-1402761532_

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 23 (23 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you for all the testing and patients. Will close this issue.

Hi, it’s working fine now πŸ‘πŸ» πŸ˜ƒ Thank you! Only a little thing, I tried the behavior injecting manually the tag [NetBox-synced] and started sync like this:

    "tags": [
        "NetBox-synced",
        "Source: vSphereBO",
    ]

After the run i got this situation:

    "tags": [
        "NetBox-synced"
    ]

It is caused because I manually injected the tag?

Hi,

Sorry for that. This slipped through. I thought I took care of it. Obviously not.

Will fix it soon.

I will, with almost a clean vcenter is 60MB output. As soon as I anonymize it I’ll share it with you.