Fixes, added session class

This commit is contained in:
2022-12-12 13:08:04 +03:00
parent 7d0d1b53ae
commit 5a34f03779
22 changed files with 193 additions and 225 deletions

View File

@@ -7,9 +7,8 @@ function New-Address {
ValueFromPipelineByPropertyName=$true,
HelpMessage="Id of subnet address belongs to",
Position=0)]
[ValidateScript({ $_ -match "^\d+$" })]
[ValidateNotNullOrEmpty()]
[string]
[int]
$SubnetId,
[parameter(
Mandatory=$true,
@@ -72,9 +71,8 @@ function New-Address {
ValueFromPipelineByPropertyName=$true,
HelpMessage="Id of subnet address belongs to",
Position=7)]
[ValidateScript({ $_ -match "^\d+$" })]
[ValidateNotNullOrEmpty()]
[string]
[int]
$TagId,
[parameter(
Mandatory=$false,
@@ -90,9 +88,8 @@ function New-Address {
ValueFromPipelineByPropertyName=$true,
HelpMessage="Id of PowerDNS PTR record",
Position=7)]
[ValidateScript({ $_ -match "^\d+$" })]
[ValidateNotNullOrEmpty()]
[string]
[int]
$PTRId,
[parameter(
Mandatory=$false,
@@ -117,9 +114,8 @@ function New-Address {
ValueFromPipelineByPropertyName=$true,
HelpMessage="Id of device address belongs to",
Position=12)]
[ValidateScript({ $_ -match "^\d+$" })]
[ValidateNotNullOrEmpty()]
[string]
[int]
$DeviceId,
[parameter(
Mandatory=$false,
@@ -137,7 +133,7 @@ function New-Address {
)
process {
$_params = @{
Controller = "addresses"
Controller = [PS.IPAM.controllers]::addresses
Method = "POST"
}