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-NSXLogicalSwitch cmdlet #12

Merged
merged 14 commits into from
Oct 24, 2020

Conversation

alagoutte
Copy link
Collaborator

with filtering by id, vlan, (display_)name, transport_zone...

@@ -59,6 +59,9 @@ Describe "Connect to a NSX-T (using multi connection)" {
It "Use Multi connection for call Get (Policy Infra) Segments" {
{ Get-NSXTPolicyInfraSegments -connection $nsx } | Should Not throw
}
It "Use Multi connection for call Get (Policy Infra) Segments" {
{ Get-NSXTPolicyInfraSegments -connection $nsx } | Should Not throw
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wrong cmdlet

Display Logical Switches with switching_profile_id ede3e69a-6562-49a6-98c4-d23408bd832c

.EXAMPLE
Get-NSXTLogicalSwitches -display_name TZ-VLAN
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need fix example

psNSXT/Public/logical-switches.ps1 Show resolved Hide resolved
}

It "Get Logical Switches" {
$sg = Get-NSXTLogicalSwitches
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

$sg => $ls

switch ( $PSCmdlet.ParameterSetName ) {
"id" {
#When there is a id, search on response
$response.results | Where-Object { $_.id -eq $id }
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

can use directly id filter /$id

@alagoutte alagoutte merged commit 6d7363d into psNSXT:master Oct 24, 2020
@alagoutte alagoutte mentioned this pull request Nov 14, 2020
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.

1 participant