Merge pull request #256 from lamw/master
Updating Metdata file + Minor Typo/Fixes
This commit is contained in:
@@ -36,7 +36,7 @@ Description = 'PowerShell Module for Managing NSX-T on VMware Cloud on AWS'
|
|||||||
PowerShellVersion = '6.0'
|
PowerShellVersion = '6.0'
|
||||||
|
|
||||||
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
|
||||||
FunctionsToExport = 'Connect-NSXTProxy', 'Get-NSXTSegment', 'New-NSXTSegment', 'Remove-NSXTSegment', 'Get-NSXTGroup', 'New-NSXTGroup', 'Remove-NSXTGroup', 'Get-NSXTService', 'New-NSXTService', 'Get-NSXTFirewall', 'New-NSXTFirewall', 'Remove-NSXTFirewall'
|
FunctionsToExport = 'Connect-NSXTProxy', 'Get-NSXTSegment', 'New-NSXTSegment', 'Remove-NSXTSegment', 'Get-NSXTGroup', 'New-NSXTGroup', 'Remove-NSXTGroup', 'Get-NSXTService', 'New-NSXTService', 'Get-NSXTFirewall', 'New-NSXTFirewall', 'Remove-NSXTFirewall', 'Get-NSXTDistFirewallSection', 'Get-NSXTDistFirewall', 'New-NSXTDistFirewall', 'Remove-NSXTDistFirewall'
|
||||||
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
|
||||||
CmdletsToExport = @()
|
CmdletsToExport = @()
|
||||||
|
|
||||||
|
|||||||
@@ -1292,7 +1292,7 @@ Function New-NSXTDistFirewall {
|
|||||||
Write-Host -ForegroundColor Red "`nThe NSX-T Proxy session is no longer valid, please re-run the Connect-NSXTProxy cmdlet to retrieve a new token`n"
|
Write-Host -ForegroundColor Red "`nThe NSX-T Proxy session is no longer valid, please re-run the Connect-NSXTProxy cmdlet to retrieve a new token`n"
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
Write-Error "Error in creating new NSX-T Distribugted Firewall Rule"
|
Write-Error "Error in creating new NSX-T Distributed Firewall Rule"
|
||||||
Write-Error "`n($_.Exception.Message)`n"
|
Write-Error "`n($_.Exception.Message)`n"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -1317,9 +1317,9 @@ Function Remove-NSXTDistFirewall {
|
|||||||
===========================================================================
|
===========================================================================
|
||||||
|
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Removes an NSX-T Distribugted Firewall Rule
|
Removes an NSX-T Distributed Firewall Rule
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This cmdlet removes an NSX-T Distribugted Firewall Rule
|
This cmdlet removes an NSX-T Distributed Firewall Rule
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Remove-NSXTFirewall -Id TEST -Troubleshoot
|
Remove-NSXTFirewall -Id TEST -Troubleshoot
|
||||||
#>
|
#>
|
||||||
@@ -1331,7 +1331,7 @@ Function Remove-NSXTDistFirewall {
|
|||||||
|
|
||||||
If (-Not $global:nsxtProxyConnection) { Write-error "No NSX-T Proxy Connection found, please use Connect-NSXTProxy" } Else {
|
If (-Not $global:nsxtProxyConnection) { Write-error "No NSX-T Proxy Connection found, please use Connect-NSXTProxy" } Else {
|
||||||
$sectionId = (Get-NSXTDistFirewallSection -Name $Section).Id
|
$sectionId = (Get-NSXTDistFirewallSection -Name $Section).Id
|
||||||
$dfwId = (Get-NSXTDistFirewall -SectionName $Section).Id
|
$dfwId = (Get-NSXTDistFirewall -SectionName $Section | where { $_.id -eq $Id}).Id
|
||||||
|
|
||||||
$method = "DELETE"
|
$method = "DELETE"
|
||||||
$deleteDistFirewallURL = $global:nsxtProxyConnection.Server + "/policy/api/v1/infra/domains/cgw/communication-maps/$sectionId/communication-entries/$dfwId"
|
$deleteDistFirewallURL = $global:nsxtProxyConnection.Server + "/policy/api/v1/infra/domains/cgw/communication-maps/$sectionId/communication-entries/$dfwId"
|
||||||
@@ -1351,14 +1351,14 @@ Function Remove-NSXTDistFirewall {
|
|||||||
Write-Host -ForegroundColor Red "`nThe NSX-T Proxy session is no longer valid, please re-run the Connect-NSXTProxy cmdlet to retrieve a new token`n"
|
Write-Host -ForegroundColor Red "`nThe NSX-T Proxy session is no longer valid, please re-run the Connect-NSXTProxy cmdlet to retrieve a new token`n"
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
Write-Error "Error in creating new NSX-T Firewall Rule"
|
Write-Error "Error in removing NSX-T Distributed Firewall Rule"
|
||||||
Write-Error "`n($_.Exception.Message)`n"
|
Write-Error "`n($_.Exception.Message)`n"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($requests.StatusCode -eq 200) {
|
if($requests.StatusCode -eq 200) {
|
||||||
Write-Host "Succesfully removed NSX-T Distribugted Firewall Rule"
|
Write-Host "Succesfully removed NSX-T Distributed Firewall Rule"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user