Add cmdlet for StaticRoutes (Add/Get/Remove)#43
Open
alagoutte wants to merge 23 commits into
Open
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)
CedricMoreau
suggested changes
Apr 17, 2020
| 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." |
| #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." |
|
|
||
| <# | ||
| .SYNOPSIS | ||
| Add Aruba CX Static Static Route |
|
|
||
| End { | ||
| } | ||
| } |
|
|
||
| <# | ||
| .SYNOPSIS | ||
| Get list of all Aruba CX Route |
| $sr = Get-ArubaCXStaticRoutes -prefix $pester_sr -vrf $pester_vrf | ||
| Confirm-ArubaCXStaticRoutes ($sr) | Should -Be $true | ||
| } | ||
|
|
| $sr.type | Should -Not -BeNullOrEmpty | ||
| $sr.vrf | Should -Be $pester_vrf | ||
| } | ||
|
|
| $sr.prefix | Should -Be $pester_sr | ||
| $sr.vrf | Should -Be $pester_vrf | ||
| } | ||
|
|
| } | ||
| } | ||
|
|
||
|
|
|
|
||
| Describe "Add Static Route" { | ||
|
|
||
|
|
reported by Cedric
reported by Cedric
reported by Cedric
alagoutte
commented
Apr 14, 2021
| [Parameter (Mandatory = $true)] | ||
| [object]$argument | ||
| ) | ||
| #Check if it looks like an Static Routes element |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support of partial Forward (need to add StaticRoutes NextHop), Reject and Blackhole