Skip to content

Commit

Permalink
fix(xo-server-netbox/test): perform test with a 50-character name (#5963
Browse files Browse the repository at this point in the history
)

See https://xcp-ng.org/forum/topic/5111
See https://netbox.readthedocs.io/en/stable/release-notes/version-2.10/#other-changes > #5011

Versions of Netbox <2.10 only allow cluster type names of length <= 50.
  • Loading branch information
pdonias committed Oct 26, 2021
1 parent 284169a commit 5ec1092
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.unreleased.md
Expand Up @@ -17,6 +17,7 @@
- [Backups] Delete unused snapshots related to other schedules (even no longer existing) (PR [#5949](https://github.com/vatesfr/xen-orchestra/pull/5949))
- [Jobs] Fix `job.runSequence` method (PR [#5944](https://github.com/vatesfr/xen-orchestra/pull/5944))
- [Netbox] Fix error when testing plugin on versions older than 2.10 (PR [#5963](https://github.com/vatesfr/xen-orchestra/pull/5963))

### Packages to release

Expand All @@ -35,6 +36,7 @@
>
> In case of conflict, the highest (lowest in previous list) `$version` wins.
- xo-server-netbox patch
- vhd-lib minor
- @xen-orchestra/backup minor
- @xen-orchestra/proxy minor
Expand Down
2 changes: 1 addition & 1 deletion packages/xo-server-netbox/src/index.js
Expand Up @@ -662,7 +662,7 @@ class Netbox {
}

async test() {
const randomSuffix = Math.random().toString(36).slice(2)
const randomSuffix = Math.random().toString(36).slice(2, 11)
const name = '[TMP] Xen Orchestra Netbox plugin test - ' + randomSuffix
await this.#makeRequest('/virtualization/cluster-types/', 'POST', {
name,
Expand Down

0 comments on commit 5ec1092

Please sign in to comment.