mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 02:35:46 +00:00
set new minimum Netbox version number
This commit is contained in:
parent
db1bc1e91d
commit
3abf2264d9
4 changed files with 7 additions and 7 deletions
|
|
@ -138,9 +138,9 @@
|
|||
|
||||
Write-Verbose "Checking Netbox version compatibility"
|
||||
$script:NetboxConfig.NetboxVersion = Get-NetboxVersion
|
||||
if ([version]$script:NetboxConfig.NetboxVersion.'netbox-version' -lt 2.8) {
|
||||
if ([version]$script:NetboxConfig.NetboxVersion.'netbox-version' -lt 4.0.1) {
|
||||
$Script:NetboxConfig.Connected = $false
|
||||
throw "Netbox version is incompatible with this PS module. Requires >=2.8.*, found version $($script:NetboxConfig.NetboxVersion.'netbox-version')"
|
||||
throw "Netbox version is incompatible with this PS module. Requires >=4.0, found version $($script:NetboxConfig.NetboxVersion.'netbox-version')"
|
||||
} else {
|
||||
Write-Verbose "Found compatible version [$($script:NetboxConfig.NetboxVersion.'netbox-version')]!"
|
||||
}
|
||||
|
|
@ -151,4 +151,4 @@
|
|||
$script:NetboxConfig.ObjectTypes = Get-NetboxObjectType -Limit 500
|
||||
|
||||
Write-Verbose "Connection process completed"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Ben Claussen
|
||||
#
|
||||
# Generated on: 31/08/2024
|
||||
# Generated on: 01/09/2024
|
||||
#
|
||||
|
||||
@{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# Generated by: Ben Claussen
|
||||
#
|
||||
# Generated on: 31/08/2024
|
||||
# Generated on: 01/09/2024
|
||||
#
|
||||
|
||||
@{
|
||||
|
|
|
|||
|
|
@ -605,9 +605,9 @@ function Connect-NetboxAPI {
|
|||
|
||||
Write-Verbose "Checking Netbox version compatibility"
|
||||
$script:NetboxConfig.NetboxVersion = Get-NetboxVersion
|
||||
if ([version]$script:NetboxConfig.NetboxVersion.'netbox-version' -lt 2.8) {
|
||||
if ([version]$script:NetboxConfig.NetboxVersion.'netbox-version' -lt 4.0.1) {
|
||||
$Script:NetboxConfig.Connected = $false
|
||||
throw "Netbox version is incompatible with this PS module. Requires >=2.8.*, found version $($script:NetboxConfig.NetboxVersion.'netbox-version')"
|
||||
throw "Netbox version is incompatible with this PS module. Requires >=4.0, found version $($script:NetboxConfig.NetboxVersion.'netbox-version')"
|
||||
} else {
|
||||
Write-Verbose "Found compatible version [$($script:NetboxConfig.NetboxVersion.'netbox-version')]!"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue