Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Get|Set-ArubaSWPort #40

Merged
merged 12 commits into from
Nov 19, 2018
Merged

Add Get|Set-ArubaSWPort #40

merged 12 commits into from
Nov 19, 2018

Conversation

alagoutte
Copy link
Collaborator

Add cmdlets for Get and Configure Port (name, config, status, flow control, dsnoop trust...)

@alagoutte
Copy link
Collaborator Author

@CedricMoreau can you look ?

Get Port of the Switch

.DESCRIPTION
Get Portinformation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space ? (Between port and informtion)


<#
.SYNOPSIS
Get Port Sstatisticsof the Switch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space

Get Port Sstatisticsof the Switch

.DESCRIPTION
Get Portinformation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space

} else {
$_port | add-member -name "is_dsnoop_port_trusted" -membertype NoteProperty -Value $false
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line maybe ?

}
$response = invoke-ArubaSWWebRequest -method "PUT" -body $_port -url $url

$response | convertfrom-json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line too

Set-ArubaSWPort -port_id 3 -name DEFAULT_PORT
#Always enable the port (disabled on WorkBench...)
Set-ArubaSWPort -port_id 3 -is_port_enable
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line ?

}

It "Get ALL Port" {
$PORTS = Get-ArubaSWPort
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent ? (not the same as below )

#TODO: Add check if no ipaddress/login/password info...

Describe "Get Port" {
BeforeAll {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line (or remove it at line 43)

$PORT.drop_tx | Should -Not -BeNullOrEmpty
$PORT.port_speed_mbps | Should -Not -BeNullOrEmpty
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a blank line ?

}

It "Get ALL Port Stastistics" {
$PORTS = Get-ArubaSWPortStatistics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent ?

2 new Get (Get-ArubaSWPort/Get-ArubaSWPortStatistics) and a Set (Set-ArubaSWPort) cmdlets
@alagoutte alagoutte merged commit 572b03d into PowerAruba:master Nov 19, 2018
@alagoutte alagoutte deleted the port branch November 19, 2018 07:07
alagoutte added a commit to alagoutte/PowerArubaSW that referenced this pull request Nov 25, 2018
3 new cmdlets

* Enhance speed (Don't wait 5sec between each request...) (PowerAruba#32)
* Enhance security (Enable TLS 1.2 when HTTPS is used...) (PowerAruba#60)
* Better "error" message when fail to connect or use a API  (PowerAruba#55)
* Add -usebasicparsing for use without connnected session (like task) (PowerAruba#56)
* Add integration test (using Pester) for check code (Known issue about VSF Switch)  (PowerAruba#36)
* Add Get|Set-ArubaSWPort(-statistics) to get and configure a port (name, status, mode...) and Port statistics
(name, packets/bytes/throughtput/error TX or RX...) (PowerAruba#40)
* Add [Extract-Port-ArubaSW.ps1 tools
script](https://github.com/PowerAruba/PowerArubaSW/blob/master/Tools/Extract-Port-ArubaSW.ps1) for generate a
Excel file with the list of Port and configuration (vlan, status, lldp neighbor...) (PowerAruba#34)
* 4 removed cmdlets (Get-ArubaSWSystemStatus[Cpu|Memory|Storage|Time] (PowerAruba#43)
alagoutte added a commit to alagoutte/PowerArubaSW that referenced this pull request Nov 26, 2018
3 new cmdlets

* Enhance speed (Don't wait 5sec between each request...) (PowerAruba#32)
* Enhance security (Enable TLS 1.2 when HTTPS is used...) (PowerAruba#60)
* Better "error" message when fail to connect or use a API  (PowerAruba#55)
* Add -usebasicparsing for use without connnected session (like task) (PowerAruba#56)
* Add integration test (using Pester) for check code (Known issue about VSF Switch)  (PowerAruba#36)
* Add Get|Set-ArubaSWPort(-statistics) to get and configure a port (name, status, mode...) and Port statistics
(name, packets/bytes/throughtput/error TX or RX...) (PowerAruba#40)
* Add [Extract-Port-ArubaSW.ps1 tools
script](https://github.com/PowerAruba/PowerArubaSW/blob/master/Tools/Extract-Port-ArubaSW.ps1) for generate a
Excel file with the list of Port and configuration (vlan, status, lldp neighbor...) (PowerAruba#34)
* 4 removed cmdlets (Get-ArubaSWSystemStatus[Cpu|Memory|Storage|Time] (PowerAruba#43)
@alagoutte alagoutte mentioned this pull request Nov 26, 2018
alagoutte added a commit that referenced this pull request Nov 26, 2018
3 new cmdlets

* Enhance speed (Don't wait 5sec between each request...) (#32)
* Enhance security (Enable TLS 1.2 when HTTPS is used...) (#60)
* Better "error" message when fail to connect or use a API  (#55)
* Add -usebasicparsing for use without connnected session (like task) (#56)
* Add integration test (using Pester) for check code (Known issue about VSF Switch)  (#36)
* Add Get|Set-ArubaSWPort(-statistics) to get and configure a port (name, status, mode...) and Port statistics
(name, packets/bytes/throughtput/error TX or RX...) (#40)
* Add [Extract-Port-ArubaSW.ps1 tools
script](https://github.com/PowerAruba/PowerArubaSW/blob/master/Tools/Extract-Port-ArubaSW.ps1) for generate a
Excel file with the list of Port and configuration (vlan, status, lldp neighbor...) (#34)
* 4 removed cmdlets (Get-ArubaSWSystemStatus[Cpu|Memory|Storage|Time] (#43)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants