Skip to content

Commit

Permalink
Interfaces(Add): Add ip_mtu parameter when add vlan interface
Browse files Browse the repository at this point in the history
need to write some Tests..
  • Loading branch information
alagoutte committed May 17, 2024
1 parent eb867c2 commit 2e46cd2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PowerArubaCX/Public/Interfaces.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ function Add-ArubaCXInterfaces {
[string]$admin,
[Parameter(Mandatory = $false)]
[string]$description,
[Parameter(Mandatory = $false, ParameterSetName = "vlan")]
[ValidateRange(68, 9198)]
[int]$ip_mtu,
[Parameter(Mandatory = $false, ParameterSetName = "lag")]
[switch]$routing,
[Parameter(Mandatory = $false, ParameterSetName = "lag")]
Expand Down Expand Up @@ -161,6 +164,10 @@ function Add-ArubaCXInterfaces {
$_interface | Add-Member -name "description" -membertype NoteProperty -Value $description
}

if ( $PsBoundParameters.ContainsKey('ip_mtu') ) {
$_interface | Add-Member -name "ip_mtu" -membertype NoteProperty -Value $ip_mtu
}

if ( $PsBoundParameters.ContainsKey('routing') ) {
if ($routing) {
$_interface | Add-Member -name "routing" -membertype NoteProperty -Value $true
Expand Down

0 comments on commit 2e46cd2

Please sign in to comment.