Skip to content

Commit

Permalink
feat(netbox): support Netbox v4.2
Browse files Browse the repository at this point in the history
Fixes #8280
Fixes #7645
See Zammad#34699
See https://xcp-ng.org/forum/topic/10236/netbox-version-4-2-1-not-supported
See https://github.com/netbox-community/netbox/releases/tag/v4.2.0

Nothing to do because:
- Clusters: `site` is replaced by `scope` (a region, site, site group or
  location) but we don't auto-assign `site` on clusters.
- VMs: `site` field still exists. We don't assign it except for old versions
  where we use the cluster's `site`.
- Prefixes: `site` is also replaced by `scope` but prefixes are created
  manually.
  • Loading branch information
pdonias committed Mar 7, 2025
1 parent 5a501d9 commit 08d5c82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- `/rest/v0/hosts` (PR [#8372](https://github.com/vatesfr/xen-orchestra/pull/8372))
- `/rest/v0/hosts/<host-id>` (PR [#8372](https://github.com/vatesfr/xen-orchestra/pull/8372))
- `/rest/v0/hosts/<host-id>/stats` (PR [#8372](https://github.com/vatesfr/xen-orchestra/pull/8372))
- [Netbox] Support version 4.2.x

### Bug fixes

Expand Down Expand Up @@ -44,5 +45,6 @@
- @xen-orchestra/rest-api minor
- @xen-orchestra/xapi patch
- xo-server patch
- xo-server-netbox minor

<!--packages-end-->
2 changes: 1 addition & 1 deletion docs/docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ Synchronize your pools, VMs, network interfaces and IP addresses with your [Netb

- `>= 2.10`
- `3.x`
- `< 4.2`
- `< 4.3`

:::tip
For safety, XO will not synchronize your pools if it detects a Netbox version that is not supported. If you wish to change that behavior, edit you `xo-server` configuration like so:
Expand Down
2 changes: 1 addition & 1 deletion packages/xo-server-netbox/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import slugify from './slugify'

const log = createLogger('xo:netbox')

const SUPPORTED_VERSION = '>=2.10 <4.2'
const SUPPORTED_VERSION = '>=2.10 <4.3'
const CLUSTER_TYPE = 'XCP-ng Pool'
const TYPES_WITH_UUID = ['virtualization.cluster', 'virtualization.virtualmachine', 'virtualization.vminterface']
const CHUNK_SIZE = 100
Expand Down

0 comments on commit 08d5c82

Please sign in to comment.