2024-09-01 02:30:24 +02:00
|
|
|
|
|
|
|
|
|
|
function Add-NetboxVirtualMachineDisk {
|
|
|
|
|
|
[CmdletBinding()]
|
|
|
|
|
|
param
|
|
|
|
|
|
(
|
|
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
|
|
|
|
[string]$Name,
|
|
|
|
|
|
|
|
|
|
|
|
[Parameter(Mandatory = $true)]
|
|
|
|
|
|
[uint64]$Virtual_Machine,
|
|
|
|
|
|
|
|
|
|
|
|
[string]$MAC_Address,
|
|
|
|
|
|
|
|
|
|
|
|
[uint64]$Size,
|
|
|
|
|
|
|
|
|
|
|
|
[string]$Description,
|
|
|
|
|
|
|
2024-10-05 12:59:45 +02:00
|
|
|
|
[hashtable]$Custom_Fields,
|
|
|
|
|
|
|
2024-09-01 02:30:24 +02:00
|
|
|
|
[switch]$Raw
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
$Segments = [System.Collections.ArrayList]::new(@('virtualization', 'virtual-disks'))
|
|
|
|
|
|
|
|
|
|
|
|
$PSBoundParameters.Enabled = $Enabled
|
|
|
|
|
|
|
|
|
|
|
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary $PSBoundParameters
|
|
|
|
|
|
|
|
|
|
|
|
$uri = BuildNewURI -Segments $URIComponents.Segments
|
|
|
|
|
|
|
|
|
|
|
|
InvokeNetboxRequest -URI $uri -Method POST -Body $URIComponents.Parameters
|
|
|
|
|
|
}
|