-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat(xo-server-netbox): synchronize VM tags #6957
Conversation
9f2fc81
to
d8f5594
Compare
@@ -306,7 +306,7 @@ class Netbox { | |||
|
|||
log.info('Synchronizing VMs') | |||
|
|||
const createNetboxVm = async (vm, { cluster, platforms }) => { | |||
const createNetboxVm = async (vm, { cluster, platforms, netboxTags }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you find a better name than netboxTags
?
Also, it make the code a bit harder to understand with cluster
vs netboxTags
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to differentiate Netbox objects from XO objects even when there's no variable name conflict (tag
vs netboxTag
). But when the object type was already different, I didn't namespace them (pool
vs cluster
). But maybe I should? And maybe I should also namespace XO objects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, maybe always prefixing objects with xo
and nb
would make the code clearer 🤔
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I like it. It might be a bit verbose but at least it's clear and consistent.
274f7d6
to
df97d22
Compare
df97d22
to
439a1df
Compare
439a1df
to
54b633f
Compare
DO NOT SQUASH!
Fixes #5899
See Zammad#12478
See https://xcp-ng.org/forum/topic/6902
Screenshots
Description
Synchronize XO VM tags with Netbox VM tags.
Checklist
Fixes #007
,See xoa-support#42
,See https://...
)Introduced by
CHANGELOG.unreleased.md