Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netbox plugin: sync VM description #6024

Closed
jcharaoui opened this issue Nov 28, 2021 · 3 comments · Fixed by #6950
Closed

Netbox plugin: sync VM description #6024

jcharaoui opened this issue Nov 28, 2021 · 3 comments · Fixed by #6950

Comments

@jcharaoui
Copy link
Contributor

In Xen Orchestra, we use the description under each VM name to store functional descriptions of the machines.

Unfortunately, that information isn't transferred into NetBox upon sync.

It would be great if that description was sync'd to the NetBox VM comments field, or another custom field (to avoid clobbering possibly existing data).

@olivierlambert
Copy link
Member

olivierlambert commented Nov 28, 2021

That's not an easy decision to make 🤔

  • "Comments" could be great, however, they are meant to be a full text field supporting Markdown in Netbox. In XAPI, it's a very shorter field just meant to describe the VM (not "potential work to do on it", or more structured data)
  • Adding a "description" field means a bit more work for the admin on Netbox side.

That's always the challenge when "plugin" things to each other. Where to stop syncing details where it fits less between both tools.

Do we want Netbox to have objects closer to XAPI or to stay "standard"? Do you know what's going on with VMware equivalent plugin for Netbox?

@jcharaoui
Copy link
Contributor Author

jcharaoui commented Nov 28, 2021

Adding a "description" field means a bit more work for the admin on Netbox side.

If it's like adding the UUID field, that's really not "work"; w/ NetBox 3.0.x, this is really fast/easy to do. And if XOA finds the field isn't present, then just skip it. I'm not sure how this works on the VMWare side, since we don't use a plugin for it.

As for the NetBox comments field, you're right, it would be a better fit for #5792 :)

@olivierlambert
Copy link
Member

Okay let's go for this first step:

  1. Netbox: adding a description field for VM objects
  2. If it exists, XO will sync the VM description

julien-f pushed a commit that referenced this issue Jul 27, 2023
Fixes #6038, Fixes #6135, Fixes #6024, Fixes #6036
See https://xcp-ng.org/forum/topic/6070
See zammad#5695
See https://xcp-ng.org/forum/topic/6149
See https://xcp-ng.org/forum/topic/6332

Complete rewrite of the plugin. Main functional changes:
- Synchronize VM description
- Fix duplicated VMs in Netbox after disconnecting one pool
- Migrating a VM from one pool to another keeps VM data added manually
- Fix largest IP prefix being picked instead of smallest
- Fix synchronization not working if some pools are unavailable
- Better error messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants