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

fix(netbox/VM): explicitly assign site #7124

Merged
merged 4 commits into from
Oct 30, 2023
Merged

Conversation

pdonias
Copy link
Member

@pdonias pdonias commented Oct 24, 2023

See Zammad#17766
See https://xcp-ng.org/forum/topic/7887

Description

Assign site field to VMs on versions of Netbox where it's mandatory.

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

@pdonias pdonias force-pushed the pierre-fix-netbox-vm-site branch 2 times, most recently from 5b3ae27 to c545a05 Compare October 25, 2023 08:31
@pdonias pdonias force-pushed the pierre-fix-netbox-vm-site branch from c545a05 to 3112c85 Compare October 25, 2023 09:37
@pdonias pdonias marked this pull request as ready for review October 25, 2023 09:44
@pdonias pdonias requested a review from MathieuRA October 25, 2023 09:46
@pdonias pdonias force-pushed the pierre-fix-netbox-vm-site branch from 6acc632 to 0ec5ac8 Compare October 25, 2023 09:56
@MathieuRA MathieuRA requested a review from julien-f October 26, 2023 12:21
@@ -395,6 +402,7 @@ class Netbox {
cluster: nbVm.cluster?.id ?? null,
status: nbVm.status?.value ?? null,
platform: nbVm.platform?.id ?? null,
site: nbVm.site === undefined ? undefined : nbVm.site?.id ?? null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplify or remove ? in nbVm.site?.id.

@pdonias pdonias requested a review from julien-f October 30, 2023 10:10
@julien-f julien-f merged commit 1d7559d into master Oct 30, 2023
1 check passed
@julien-f julien-f deleted the pierre-fix-netbox-vm-site branch October 30, 2023 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants