mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 18:02:29 +00:00
34 lines
No EOL
808 B
PowerShell
34 lines
No EOL
808 B
PowerShell
function VerifyAPIConnectivity {
|
|
[CmdletBinding()]
|
|
param ()
|
|
|
|
$uriSegments = [System.Collections.ArrayList]::new(@('extras', '_choices'))
|
|
|
|
$uri = BuildNewURI -Segments $uriSegments -SkipConnectedCheck
|
|
|
|
InvokeNetboxRequest -URI $uri
|
|
}
|
|
|
|
function SetupNetboxConfigVariable {
|
|
[CmdletBinding()]
|
|
param
|
|
(
|
|
[switch]$Overwrite
|
|
)
|
|
|
|
Write-Verbose "Checking for NetboxConfig hashtable"
|
|
if ((-not ($script:NetboxConfig)) -or $Overwrite) {
|
|
Write-Verbose "Creating NetboxConfig hashtable"
|
|
$script:NetboxConfig = @{
|
|
'Connected' = $false
|
|
'Choices' = @{
|
|
}
|
|
}
|
|
}
|
|
|
|
Write-Verbose "NetboxConfig hashtable already exists"
|
|
}
|
|
|
|
function GetNetboxConfigVariable {
|
|
return $script:NetboxConfig
|
|
} |