🔵 other: run of .\deploy -skipversion for testing

This commit is contained in:
Chris Lawson 2023-03-22 16:57:07 +08:00
parent 471a942309
commit c736e0a1f7
3 changed files with 276 additions and 64 deletions

View file

@ -1,9 +1,9 @@
#
# Module manifest for module 'NetboxPS'
# Module manifest for module 'PSGet_NetboxPS'
#
# Generated by: Ben Claussen
#
# Generated on: 2023-03-17
# Generated on: 22/03/2023
#
@{
@ -66,35 +66,41 @@ CLRVersion = '2.0.50727'
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
NestedModules = @()
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
'Add-NetboxVirtualMachineInterface', 'BuildNewURI',
'BuildURIComponents', 'CheckNetboxIsConnected',
'Clear-NetboxCredential', 'Connect-NetboxAPI', 'CreateEnum',
'GenerateSlug', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
'GetNetboxAPIErrorBody', 'Get-NetboxCircuit',
'Get-NetboxCircuitProvider', 'Get-NetboxCircuitTermination',
'Get-NetboxCircuitType', 'GetNetboxConfigVariable',
'Get-NetboxContact', 'Get-NetboxContactAssignment',
'Get-NetboxContactRole', 'Get-NetboxContentType',
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
'Get-NetboxDCIMCableTermination', 'Get-NetboxDCIMDevice',
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
'Get-NetboxDCIMFrontPort', 'Get-NetboxDCIMInterface',
'Get-NetboxDCIMInterfaceConnection', 'Get-NetboxDCIMPlatform',
'Get-NetboxDCIMRearPort', 'Get-NetboxDCIMSite', 'Get-NetboxHostname',
'Get-NetboxHostPort', 'Get-NetboxHostScheme',
'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress',
'Get-NetboxIPAMAggregate', 'Get-NetboxIPAMAvailableIP',
'Get-NetboxIPAMPrefix', 'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN',
'Get-NetboxTag', 'Get-NetboxTenant', 'Get-NetboxTimeout',
'Get-NetboxVersion', 'Get-NetboxVirtualizationCluster',
'Get-NetboxDCIMDManufacture', 'Get-NetboxDCIMFrontPort',
'Get-NetboxDCIMInterface', 'Get-NetboxDCIMInterfaceConnection',
'Get-NetboxDCIMPlatform', 'Get-NetboxDCIMRearPort',
'Get-NetboxDCIMSite', 'Get-NetboxHostname', 'Get-NetboxHostPort',
'Get-NetboxHostScheme', 'Get-NetboxInvokeParams',
'Get-NetboxIPAMAddress', 'Get-NetboxIPAMAggregate',
'Get-NetboxIPAMAvailableIP', 'Get-NetboxIPAMPrefix',
'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN', 'Get-NetboxTag',
'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion',
'Get-NetboxVirtualizationCluster',
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit',
'New-NetboxContact', 'New-NetboxContactAssignment',
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN',
'New-NetboxTenant', 'New-NetboxVirtualMachine',
'Get-NetboxVirtualMachineInterface', 'InvokeNetboxRequest',
'New-NetboxCircuit', 'New-NetboxContact',
'New-NetboxContactAssignment', 'New-NetboxContactRole',
'New-NetboxDCIMDevice', 'New-NetboxDCIMDeviceRole',
'New-NetboxDCIMDeviceType', 'New-NetboxDCIMManufacture',
'New-NetboxDCIMSite', 'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix',
'New-NetboxIPAMVLAN', 'New-NetboxTenant', 'New-NetboxVirtualMachine',
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMFrontPort',
'Remove-NetboxDCIMInterface',
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
@ -107,16 +113,18 @@ FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
'Set-NetboxVirtualMachineInterface', 'Test-NetboxAPIConnected'
'Set-NetboxVirtualMachineInterface', 'SetupNetboxConfigVariable',
'Test-NetboxAPIConnected', 'ThrowNetboxRESTError',
'VerifyAPIConnectivity'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = '*'
CmdletsToExport = @()
# Variables to export from this module
VariablesToExport = '*'
# VariablesToExport = @()
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
AliasesToExport = @()
# DSC resources to export from this module
# DscResourcesToExport = @()
@ -147,14 +155,8 @@ PrivateData = @{
# ReleaseNotes of this module
# ReleaseNotes = ''
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
# ExternalModuleDependencies = ''
} # End of PSData hashtable

View file

@ -1,9 +1,9 @@
#
# Module manifest for module 'NetboxPS'
# Module manifest for module 'PSGet_NetboxPS'
#
# Generated by: Ben Claussen
#
# Generated on: 2023-03-17
# Generated on: 22/03/2023
#
@{
@ -66,35 +66,41 @@ CLRVersion = '2.0.50727'
# FormatsToProcess = @()
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
NestedModules = @()
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
'Add-NetboxVirtualMachineInterface', 'BuildNewURI',
'BuildURIComponents', 'CheckNetboxIsConnected',
'Clear-NetboxCredential', 'Connect-NetboxAPI', 'CreateEnum',
'GenerateSlug', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
'GetNetboxAPIErrorBody', 'Get-NetboxCircuit',
'Get-NetboxCircuitProvider', 'Get-NetboxCircuitTermination',
'Get-NetboxCircuitType', 'GetNetboxConfigVariable',
'Get-NetboxContact', 'Get-NetboxContactAssignment',
'Get-NetboxContactRole', 'Get-NetboxContentType',
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
'Get-NetboxDCIMCableTermination', 'Get-NetboxDCIMDevice',
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
'Get-NetboxDCIMFrontPort', 'Get-NetboxDCIMInterface',
'Get-NetboxDCIMInterfaceConnection', 'Get-NetboxDCIMPlatform',
'Get-NetboxDCIMRearPort', 'Get-NetboxDCIMSite', 'Get-NetboxHostname',
'Get-NetboxHostPort', 'Get-NetboxHostScheme',
'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress',
'Get-NetboxIPAMAggregate', 'Get-NetboxIPAMAvailableIP',
'Get-NetboxIPAMPrefix', 'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN',
'Get-NetboxTag', 'Get-NetboxTenant', 'Get-NetboxTimeout',
'Get-NetboxVersion', 'Get-NetboxVirtualizationCluster',
'Get-NetboxDCIMDManufacture', 'Get-NetboxDCIMFrontPort',
'Get-NetboxDCIMInterface', 'Get-NetboxDCIMInterfaceConnection',
'Get-NetboxDCIMPlatform', 'Get-NetboxDCIMRearPort',
'Get-NetboxDCIMSite', 'Get-NetboxHostname', 'Get-NetboxHostPort',
'Get-NetboxHostScheme', 'Get-NetboxInvokeParams',
'Get-NetboxIPAMAddress', 'Get-NetboxIPAMAggregate',
'Get-NetboxIPAMAvailableIP', 'Get-NetboxIPAMPrefix',
'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN', 'Get-NetboxTag',
'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion',
'Get-NetboxVirtualizationCluster',
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit',
'New-NetboxContact', 'New-NetboxContactAssignment',
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN',
'New-NetboxTenant', 'New-NetboxVirtualMachine',
'Get-NetboxVirtualMachineInterface', 'InvokeNetboxRequest',
'New-NetboxCircuit', 'New-NetboxContact',
'New-NetboxContactAssignment', 'New-NetboxContactRole',
'New-NetboxDCIMDevice', 'New-NetboxDCIMDeviceRole',
'New-NetboxDCIMDeviceType', 'New-NetboxDCIMManufacture',
'New-NetboxDCIMSite', 'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix',
'New-NetboxIPAMVLAN', 'New-NetboxTenant', 'New-NetboxVirtualMachine',
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMFrontPort',
'Remove-NetboxDCIMInterface',
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
@ -107,16 +113,18 @@ FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
'Set-NetboxVirtualMachineInterface', 'Test-NetboxAPIConnected'
'Set-NetboxVirtualMachineInterface', 'SetupNetboxConfigVariable',
'Test-NetboxAPIConnected', 'ThrowNetboxRESTError',
'VerifyAPIConnectivity'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = '*'
CmdletsToExport = @()
# Variables to export from this module
VariablesToExport = '*'
# VariablesToExport = @()
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'
AliasesToExport = @()
# DSC resources to export from this module
# DscResourcesToExport = @()
@ -147,14 +155,8 @@ PrivateData = @{
# ReleaseNotes of this module
# ReleaseNotes = ''
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
# External dependent modules of this module
# ExternalModuleDependencies = @()
# ExternalModuleDependencies = ''
} # End of PSData hashtable

View file

@ -655,6 +655,27 @@ public enum $EnumName
#endregion
#region File GenerateSlug.ps1
function GenerateSlug {
[CmdletBinding()]
[OutputType([string])]
param (
[Parameter(Mandatory = $true)]
[string]$Slug
)
Write-Verbose "Generating slug"
$Slug = $Slug.Replace("-", "").Replace(" ", "-").ToLower()
Write-Verbose " Completed building URIBuilder"
# Return the entire UriBuilder object
$Slug
}
#endregion
#region File Get-ModelDefinition.ps1
@ -1811,6 +1832,61 @@ function Get-NetboxDCIMDeviceType {
#endregion
#region File Get-NetboxDCIMDManufacture.ps1
function Get-NetboxDCIMManufacture {
[CmdletBinding()]
#region Parameters
param
(
[uint16]$Offset,
[uint16]$Limit,
[Parameter(ParameterSetName = 'ById')]
[uint16[]]$Id,
[string]$Name,
[string]$Slug,
[switch]$Raw
)
#endregion Parameters
switch ($PSCmdlet.ParameterSetName) {
'ById' {
foreach ($ManuID in $Id) {
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'manufacturers', $ManuID))
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Id', 'Raw'
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
InvokeNetboxRequest -URI $URI -Raw:$Raw
}
break
}
default {
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'manufacturers'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters -SkipParameterByName 'Raw'
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
InvokeNetboxRequest -URI $URI -Raw:$Raw
}
}
}
#endregion
#region File Get-NetboxDCIMFrontPort.ps1
function Get-NetboxDCIMFrontPort {
@ -3900,6 +3976,138 @@ function New-NetboxDCIMDevice {
#endregion
#region File New-NetboxDCIMDeviceRole.ps1
function New-NetboxDCIMDeviceRole {
[CmdletBinding(ConfirmImpact = 'low',
SupportsShouldProcess = $true)]
[OutputType([pscustomobject])]
param
(
[string]$Name,
[string]$Color,
[bool]$VM_Role,
[string]$Description,
[hashtable]$Custom_Fields
)
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'device-roles'))
$Method = 'POST'
if (-not $PSBoundParameters.ContainsKey('slug')) {
$PSBoundParameters.Add('slug', (GenerateSlug -Slug $Name))
}
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
$URI = BuildNewURI -Segments $URIComponents.Segments
if ($PSCmdlet.ShouldProcess($Name, 'Create new Device Role')) {
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters
}
}
#endregion
#region File New-NetboxDCIMDeviceType.ps1
function New-NetboxDCIMDeviceType {
[CmdletBinding(ConfirmImpact = 'low',
SupportsShouldProcess = $true)]
[OutputType([pscustomobject])]
#region Parameters
param
(
[Parameter(Mandatory = $true)]
[string]$Manufacturer,
[Parameter(Mandatory = $true)]
[string]$Model,
[string]$Part_Number,
[uint16]$U_Height,
[bool]$Is_Full_Depth,
[string]$Subdevice_Role,
[string]$Airflow,
[uint16]$Weight,
[string]$Weight_Unit,
[string]$Description,
[string]$Comments,
[hashtable]$Custom_Fields
)
#endregion Parameters
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'device-types'))
$Method = 'POST'
if (-not $PSBoundParameters.ContainsKey('slug')) {
$PSBoundParameters.Add('slug', (GenerateSlug -Slug $Model))
}
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
$URI = BuildNewURI -Segments $URIComponents.Segments
if ($PSCmdlet.ShouldProcess($Name, 'Create new Device Types')) {
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters
}
}
#endregion
#region File New-NetboxDCIMManufacture.ps1
function New-NetboxDCIMManufacture {
[CmdletBinding(ConfirmImpact = 'low',
SupportsShouldProcess = $true)]
[OutputType([pscustomobject])]
#region Parameters
param
(
[Parameter(Mandatory = $true)]
[string]$Name,
[string]$Description,
[hashtable]$Custom_Fields
)
#endregion Parameters
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'manufacturers'))
$Method = 'POST'
if (-not $PSBoundParameters.ContainsKey('slug')) {
$PSBoundParameters.Add('slug', (GenerateSlug -Slug $name))
}
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
$URI = BuildNewURI -Segments $URIComponents.Segments
if ($PSCmdlet.ShouldProcess($Name, 'Create new Manufacture')) {
InvokeNetboxRequest -URI $URI -Method $Method -Body $URIComponents.Parameters
}
}
#endregion
#region File New-NetboxDCIMSite.ps1
<#