NetboxPS/Functions/Setup/Get-NetboxTimeout.ps1

13 lines
336 B
PowerShell
Raw Normal View History

Version 1.4 (#14) * Connect(Setup): Fix indent (using Visual code Formatter) * Setup(Functions): Fix indent (using Visual Code Formatter) * Support(Setup): Fix indent (using Visual Code Formatter) * InvokeNetboxRequest(Helpers): Fix indent (using Visual Code Formatter) * Add Set-netboxCipherSSL for enable TLS1.1 and TLS1.2 (for PS 5.0) From PowerAruba/FortiPower Module :) * Add Set-NetboxUnstrustedSSL for disable SSL chain test (for PS 5.0 From PowerAruba/FortiPwoer Module :) * Add Get/Set netboxInvokeParms for Get and Set Invoke Params (array) Like -SkipCertificate, Timeout... * InvokeNetboxRequest: Add to Splat NetboxInvokeParams * Connect: Add SkipCertificateCheck parameter (for PS5 and Core) Also enable TLS 1.1 and 1.2 for PS5 * PSSA: Add Github Actions for launch PSSA (PowerShell Script Analyzer) when launch PR (#11) Add also vscode/PSScriptAnalyzerSettings.psd1 for Settings for PSSA (can be reuse also for vscode...) * Update psproj * Correct typo * Correct brace formatting * Add Get/Set timeout functions * Add Get/Set timeout functions * Add TimeoutSeconds parameter and logic to Connect-NetboxAPI - Updated `InvokeNetboxRequest` to use `NetboxConfig.Timeout` - Updated `Get-NetboxAPIDefinition` to use `NetboxConfig.Timeout` * Trim whitespaces * Add Get-NetboxVersion function * Remove API Definition caching and replace with Netbox version check * Increment version to 1.4 Co-authored-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Co-authored-by: Ben Claussen <claussen@neonet.org>
2021-07-22 12:00:12 -04:00

function Get-NetboxTimeout {
[CmdletBinding()]
[OutputType([uint16])]
param ()
Write-Verbose "Getting Netbox Timeout"
if ($null -eq $script:NetboxConfig.Timeout) {
throw "Netbox Timeout is not set! You may set it with Set-NetboxTimeout -TimeoutSeconds [uint16]"
}
$script:NetboxConfig.Timeout
}