-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add cmdlet for StaticRoutes (Add/Get/Remove) #43
base: master
Are you sure you want to change the base?
Conversation
for get Static Routes Information (address_family, prefix, static_nexthops, type)
and add also some example
Needed for remove function
(Don't work for the moment.. get a 500 Error...)
address_ipv4 => address_family
need to specify the vRF...
Need to enhance vrf part (for add and remove)
…rameter more easy for remove after and also display !
…outes But fail for remove... (need to add Context for VRF...)
and also use better variable for prefix URI (replace / by %2F)
PowerArubaCX/Private/Confirm.ps1
Outdated
throw "Element specified does not contain a address_family property." | ||
} | ||
if ( -not ( $argument | get-member -name prefix -Membertype Properties)) { | ||
throw "Element specified does not contain an prefix property." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is "a prefix" not "an"
PowerArubaCX/Private/Confirm.ps1
Outdated
#Check if it looks like an Static Routes element | ||
|
||
if ( -not ( $argument | get-member -name address_family -Membertype Properties)) { | ||
throw "Element specified does not contain a address_family property." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is "an address..."
PowerArubaCX/Public/StaticRoutes.ps1
Outdated
|
||
<# | ||
.SYNOPSIS | ||
Add Aruba CX Static Static Route |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static Static ?
|
||
End { | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a blank line ?
PowerArubaCX/Public/StaticRoutes.ps1
Outdated
|
||
<# | ||
.SYNOPSIS | ||
Get list of all Aruba CX Route |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
routes*
$sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf | ||
Confirm-ArubaCXStaticRoutes ($sr) | Should -Be $true | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context isn't close
$sr.type | Should -Not -BeNullOrEmpty | ||
$sr.vrf | Should -Be $pester_vrf | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank line
$sr.prefix | Should -Be $pester_sr | ||
$sr.vrf | Should -Be $pester_vrf | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again
|
||
Describe "Add Static Route" { | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again ..
reported by Cedric
reported by Cedric
reported by Cedric
[Parameter (Mandatory = $true)] | ||
[object]$argument | ||
) | ||
#Check if it looks like an Static Routes element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo an => a
Support of partial Forward (need to add StaticRoutes NextHop), Reject and Blackhole