mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 18:55:46 +00:00
🔵 other: run of .\deploy -skipversion for testing
This commit is contained in:
parent
471a942309
commit
c736e0a1f7
3 changed files with 276 additions and 64 deletions
|
|
@ -1,9 +1,9 @@
|
||||||
#
|
#
|
||||||
# Module manifest for module 'NetboxPS'
|
# Module manifest for module 'PSGet_NetboxPS'
|
||||||
#
|
#
|
||||||
# Generated by: Ben Claussen
|
# Generated by: Ben Claussen
|
||||||
#
|
#
|
||||||
# Generated on: 2023-03-17
|
# Generated on: 22/03/2023
|
||||||
#
|
#
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -66,35 +66,41 @@ CLRVersion = '2.0.50727'
|
||||||
# FormatsToProcess = @()
|
# FormatsToProcess = @()
|
||||||
|
|
||||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
# 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.
|
# 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',
|
FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
||||||
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
|
'Add-NetboxVirtualMachineInterface', 'BuildNewURI',
|
||||||
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
'BuildURIComponents', 'CheckNetboxIsConnected',
|
||||||
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
|
'Clear-NetboxCredential', 'Connect-NetboxAPI', 'CreateEnum',
|
||||||
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
|
'GenerateSlug', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
||||||
|
'GetNetboxAPIErrorBody', 'Get-NetboxCircuit',
|
||||||
|
'Get-NetboxCircuitProvider', 'Get-NetboxCircuitTermination',
|
||||||
|
'Get-NetboxCircuitType', 'GetNetboxConfigVariable',
|
||||||
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
||||||
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
||||||
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
||||||
'Get-NetboxDCIMCableTermination', 'Get-NetboxDCIMDevice',
|
'Get-NetboxDCIMCableTermination', 'Get-NetboxDCIMDevice',
|
||||||
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
|
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
|
||||||
'Get-NetboxDCIMFrontPort', 'Get-NetboxDCIMInterface',
|
'Get-NetboxDCIMDManufacture', 'Get-NetboxDCIMFrontPort',
|
||||||
'Get-NetboxDCIMInterfaceConnection', 'Get-NetboxDCIMPlatform',
|
'Get-NetboxDCIMInterface', 'Get-NetboxDCIMInterfaceConnection',
|
||||||
'Get-NetboxDCIMRearPort', 'Get-NetboxDCIMSite', 'Get-NetboxHostname',
|
'Get-NetboxDCIMPlatform', 'Get-NetboxDCIMRearPort',
|
||||||
'Get-NetboxHostPort', 'Get-NetboxHostScheme',
|
'Get-NetboxDCIMSite', 'Get-NetboxHostname', 'Get-NetboxHostPort',
|
||||||
'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress',
|
'Get-NetboxHostScheme', 'Get-NetboxInvokeParams',
|
||||||
'Get-NetboxIPAMAggregate', 'Get-NetboxIPAMAvailableIP',
|
'Get-NetboxIPAMAddress', 'Get-NetboxIPAMAggregate',
|
||||||
'Get-NetboxIPAMPrefix', 'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN',
|
'Get-NetboxIPAMAvailableIP', 'Get-NetboxIPAMPrefix',
|
||||||
'Get-NetboxTag', 'Get-NetboxTenant', 'Get-NetboxTimeout',
|
'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN', 'Get-NetboxTag',
|
||||||
'Get-NetboxVersion', 'Get-NetboxVirtualizationCluster',
|
'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion',
|
||||||
|
'Get-NetboxVirtualizationCluster',
|
||||||
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
|
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
|
||||||
'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit',
|
'Get-NetboxVirtualMachineInterface', 'InvokeNetboxRequest',
|
||||||
'New-NetboxContact', 'New-NetboxContactAssignment',
|
'New-NetboxCircuit', 'New-NetboxContact',
|
||||||
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
|
'New-NetboxContactAssignment', 'New-NetboxContactRole',
|
||||||
'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN',
|
'New-NetboxDCIMDevice', 'New-NetboxDCIMDeviceRole',
|
||||||
'New-NetboxTenant', 'New-NetboxVirtualMachine',
|
'New-NetboxDCIMDeviceType', 'New-NetboxDCIMManufacture',
|
||||||
|
'New-NetboxDCIMSite', 'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix',
|
||||||
|
'New-NetboxIPAMVLAN', 'New-NetboxTenant', 'New-NetboxVirtualMachine',
|
||||||
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMFrontPort',
|
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMFrontPort',
|
||||||
'Remove-NetboxDCIMInterface',
|
'Remove-NetboxDCIMInterface',
|
||||||
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
||||||
|
|
@ -107,16 +113,18 @@ FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
||||||
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
||||||
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
|
'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.
|
# 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
|
# 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.
|
# 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
|
# DSC resources to export from this module
|
||||||
# DscResourcesToExport = @()
|
# DscResourcesToExport = @()
|
||||||
|
|
@ -147,14 +155,8 @@ PrivateData = @{
|
||||||
# ReleaseNotes of this module
|
# ReleaseNotes of this module
|
||||||
# ReleaseNotes = ''
|
# 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
|
# External dependent modules of this module
|
||||||
# ExternalModuleDependencies = @()
|
# ExternalModuleDependencies = ''
|
||||||
|
|
||||||
} # End of PSData hashtable
|
} # End of PSData hashtable
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#
|
#
|
||||||
# Module manifest for module 'NetboxPS'
|
# Module manifest for module 'PSGet_NetboxPS'
|
||||||
#
|
#
|
||||||
# Generated by: Ben Claussen
|
# Generated by: Ben Claussen
|
||||||
#
|
#
|
||||||
# Generated on: 2023-03-17
|
# Generated on: 22/03/2023
|
||||||
#
|
#
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -66,35 +66,41 @@ CLRVersion = '2.0.50727'
|
||||||
# FormatsToProcess = @()
|
# FormatsToProcess = @()
|
||||||
|
|
||||||
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
|
# 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.
|
# 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',
|
FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
'Add-NetboxDCIMInterfaceConnection', 'Add-NetboxDCIMRearPort',
|
||||||
'Add-NetboxVirtualMachineInterface', 'Clear-NetboxCredential',
|
'Add-NetboxVirtualMachineInterface', 'BuildNewURI',
|
||||||
'Connect-NetboxAPI', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
'BuildURIComponents', 'CheckNetboxIsConnected',
|
||||||
'Get-NetboxCircuit', 'Get-NetboxCircuitProvider',
|
'Clear-NetboxCredential', 'Connect-NetboxAPI', 'CreateEnum',
|
||||||
'Get-NetboxCircuitTermination', 'Get-NetboxCircuitType',
|
'GenerateSlug', 'Get-ModelDefinition', 'Get-NetboxAPIDefinition',
|
||||||
|
'GetNetboxAPIErrorBody', 'Get-NetboxCircuit',
|
||||||
|
'Get-NetboxCircuitProvider', 'Get-NetboxCircuitTermination',
|
||||||
|
'Get-NetboxCircuitType', 'GetNetboxConfigVariable',
|
||||||
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
'Get-NetboxContact', 'Get-NetboxContactAssignment',
|
||||||
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
'Get-NetboxContactRole', 'Get-NetboxContentType',
|
||||||
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
'Get-NetboxCredential', 'Get-NetboxDCIMCable',
|
||||||
'Get-NetboxDCIMCableTermination', 'Get-NetboxDCIMDevice',
|
'Get-NetboxDCIMCableTermination', 'Get-NetboxDCIMDevice',
|
||||||
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
|
'Get-NetboxDCIMDeviceRole', 'Get-NetboxDCIMDeviceType',
|
||||||
'Get-NetboxDCIMFrontPort', 'Get-NetboxDCIMInterface',
|
'Get-NetboxDCIMDManufacture', 'Get-NetboxDCIMFrontPort',
|
||||||
'Get-NetboxDCIMInterfaceConnection', 'Get-NetboxDCIMPlatform',
|
'Get-NetboxDCIMInterface', 'Get-NetboxDCIMInterfaceConnection',
|
||||||
'Get-NetboxDCIMRearPort', 'Get-NetboxDCIMSite', 'Get-NetboxHostname',
|
'Get-NetboxDCIMPlatform', 'Get-NetboxDCIMRearPort',
|
||||||
'Get-NetboxHostPort', 'Get-NetboxHostScheme',
|
'Get-NetboxDCIMSite', 'Get-NetboxHostname', 'Get-NetboxHostPort',
|
||||||
'Get-NetboxInvokeParams', 'Get-NetboxIPAMAddress',
|
'Get-NetboxHostScheme', 'Get-NetboxInvokeParams',
|
||||||
'Get-NetboxIPAMAggregate', 'Get-NetboxIPAMAvailableIP',
|
'Get-NetboxIPAMAddress', 'Get-NetboxIPAMAggregate',
|
||||||
'Get-NetboxIPAMPrefix', 'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN',
|
'Get-NetboxIPAMAvailableIP', 'Get-NetboxIPAMPrefix',
|
||||||
'Get-NetboxTag', 'Get-NetboxTenant', 'Get-NetboxTimeout',
|
'Get-NetboxIPAMRole', 'Get-NetboxIPAMVLAN', 'Get-NetboxTag',
|
||||||
'Get-NetboxVersion', 'Get-NetboxVirtualizationCluster',
|
'Get-NetboxTenant', 'Get-NetboxTimeout', 'Get-NetboxVersion',
|
||||||
|
'Get-NetboxVirtualizationCluster',
|
||||||
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
|
'Get-NetboxVirtualizationClusterGroup', 'Get-NetboxVirtualMachine',
|
||||||
'Get-NetboxVirtualMachineInterface', 'New-NetboxCircuit',
|
'Get-NetboxVirtualMachineInterface', 'InvokeNetboxRequest',
|
||||||
'New-NetboxContact', 'New-NetboxContactAssignment',
|
'New-NetboxCircuit', 'New-NetboxContact',
|
||||||
'New-NetboxContactRole', 'New-NetboxDCIMDevice', 'New-NetboxDCIMSite',
|
'New-NetboxContactAssignment', 'New-NetboxContactRole',
|
||||||
'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix', 'New-NetboxIPAMVLAN',
|
'New-NetboxDCIMDevice', 'New-NetboxDCIMDeviceRole',
|
||||||
'New-NetboxTenant', 'New-NetboxVirtualMachine',
|
'New-NetboxDCIMDeviceType', 'New-NetboxDCIMManufacture',
|
||||||
|
'New-NetboxDCIMSite', 'New-NetboxIPAMAddress', 'New-NetboxIPAMPrefix',
|
||||||
|
'New-NetboxIPAMVLAN', 'New-NetboxTenant', 'New-NetboxVirtualMachine',
|
||||||
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMFrontPort',
|
'Remove-NetboxDCIMDevice', 'Remove-NetboxDCIMFrontPort',
|
||||||
'Remove-NetboxDCIMInterface',
|
'Remove-NetboxDCIMInterface',
|
||||||
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
'Remove-NetboxDCIMInterfaceConnection', 'Remove-NetboxDCIMRearPort',
|
||||||
|
|
@ -107,16 +113,18 @@ FunctionsToExport = 'Add-NetboxDCIMFrontPort', 'Add-NetboxDCIMInterface',
|
||||||
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
'Set-NetboxInvokeParams', 'Set-NetboxIPAMAddress',
|
||||||
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
'Set-NetboxIPAMPrefix', 'Set-NetboxTimeout',
|
||||||
'Set-NetboxUnstrustedSSL', 'Set-NetboxVirtualMachine',
|
'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.
|
# 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
|
# 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.
|
# 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
|
# DSC resources to export from this module
|
||||||
# DscResourcesToExport = @()
|
# DscResourcesToExport = @()
|
||||||
|
|
@ -147,14 +155,8 @@ PrivateData = @{
|
||||||
# ReleaseNotes of this module
|
# ReleaseNotes of this module
|
||||||
# ReleaseNotes = ''
|
# 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
|
# External dependent modules of this module
|
||||||
# ExternalModuleDependencies = @()
|
# ExternalModuleDependencies = ''
|
||||||
|
|
||||||
} # End of PSData hashtable
|
} # End of PSData hashtable
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -655,6 +655,27 @@ public enum $EnumName
|
||||||
|
|
||||||
#endregion
|
#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
|
#region File Get-ModelDefinition.ps1
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1811,6 +1832,61 @@ function Get-NetboxDCIMDeviceType {
|
||||||
|
|
||||||
#endregion
|
#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
|
#region File Get-NetboxDCIMFrontPort.ps1
|
||||||
|
|
||||||
function Get-NetboxDCIMFrontPort {
|
function Get-NetboxDCIMFrontPort {
|
||||||
|
|
@ -3900,6 +3976,138 @@ function New-NetboxDCIMDevice {
|
||||||
|
|
||||||
#endregion
|
#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
|
#region File New-NetboxDCIMSite.ps1
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue