vmware-archive / powernsx

PowerShell module that abstracts the VMware NSX-v API to a set of easily used PowerShell functions
173 stars 90 forks source link

Get-NSXIPSet -scopeid <edge-id> pulls all objects instead #620

Open kwongheng opened 4 years ago

kwongheng commented 4 years ago

When I issue the command:

Get-NSXIPSet -scopeid edge-5 # for example, to get IPSets only in Edge-5

It pulls all IPSets instead of those just scoped to edge-5, I can see globalroot scopes objects as well (we don't have universal scoped objects). As such the command takes a long time to execute, if we have a large IPSet numbers.

alagoutte commented 4 years ago

Hi,

Do you have check the API doc ? there is may be not way to get directly IPset from a ScopeID (and we need to get all IPset and make filter after...)

kwongheng commented 4 years ago

That may be true, however, if you do "get-help get-nsxipset -full" one of the examples says that its possible. So if its not possible, it should not access scoped ids.

-------------------------- EXAMPLE 5 -------------------------- PS C:>Get-NSXIpSet TestEsgeIPSet -scopeId edge-1 Returns all locally configured IP Sets on the specified edge.