mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 18:02:29 +00:00
Support(Setup): Fix indent (using Visual Code Formatter)
This commit is contained in:
parent
5b1ee45769
commit
4ad0562466
3 changed files with 21 additions and 21 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
<#
|
<#
|
||||||
.NOTES
|
.NOTES
|
||||||
===========================================================================
|
===========================================================================
|
||||||
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2020 v5.7.174
|
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2020 v5.7.174
|
||||||
|
|
@ -14,16 +14,16 @@
|
||||||
|
|
||||||
|
|
||||||
function Get-NetboxAPIDefinition {
|
function Get-NetboxAPIDefinition {
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param ()
|
param ()
|
||||||
|
|
||||||
#$URI = "https://netbox.neonet.org/api/docs/?format=openapi"
|
#$URI = "https://netbox.neonet.org/api/docs/?format=openapi"
|
||||||
|
|
||||||
$Segments = [System.Collections.ArrayList]::new(@('docs'))
|
$Segments = [System.Collections.ArrayList]::new(@('docs'))
|
||||||
|
|
||||||
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary @{'format' = 'openapi'}
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary @{'format' = 'openapi' }
|
||||||
|
|
||||||
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters -SkipConnectedCheck
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters -SkipConnectedCheck
|
||||||
|
|
||||||
InvokeNetboxRequest -URI $URI -Timeout 10
|
InvokeNetboxRequest -URI $URI -Timeout 10
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,17 @@
|
||||||
(
|
(
|
||||||
[switch]$Overwrite
|
[switch]$Overwrite
|
||||||
)
|
)
|
||||||
|
|
||||||
Write-Verbose "Checking for NetboxConfig hashtable"
|
Write-Verbose "Checking for NetboxConfig hashtable"
|
||||||
if ((-not ($script:NetboxConfig)) -or $Overwrite) {
|
if ((-not ($script:NetboxConfig)) -or $Overwrite) {
|
||||||
Write-Verbose "Creating NetboxConfig hashtable"
|
Write-Verbose "Creating NetboxConfig hashtable"
|
||||||
$script:NetboxConfig = @{
|
$script:NetboxConfig = @{
|
||||||
'Connected' = $false
|
'Connected' = $false
|
||||||
'Choices' = @{
|
'Choices' = @{
|
||||||
}
|
}
|
||||||
'APIDefinition' = $null
|
'APIDefinition' = $null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Verbose "NetboxConfig hashtable already exists"
|
Write-Verbose "NetboxConfig hashtable already exists"
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
function VerifyAPIConnectivity {
|
function VerifyAPIConnectivity {
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param ()
|
param ()
|
||||||
|
|
||||||
$uriSegments = [System.Collections.ArrayList]::new(@('extras'))
|
$uriSegments = [System.Collections.ArrayList]::new(@('extras'))
|
||||||
|
|
||||||
$uri = BuildNewURI -Segments $uriSegments -Parameters @{'format' = 'json'} -SkipConnectedCheck
|
$uri = BuildNewURI -Segments $uriSegments -Parameters @{'format' = 'json' } -SkipConnectedCheck
|
||||||
|
|
||||||
InvokeNetboxRequest -URI $uri
|
InvokeNetboxRequest -URI $uri
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue