vmware-archive / powernsx

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

Get-NsxSecurityTag does not return more that 1021 results #576

Open jmmacip opened 5 years ago

jmmacip commented 5 years ago

When you have more than 1024 security Tags NSX 6.3 API returns the values using paging. Default pagesize is 1024 and the current call does not check for the Value XXXX to find out if the values is greater than 1024, then a second call with an startindex value has to be sent to retrieve the rest of the security tags.

alagoutte commented 5 years ago

Hi,

Do you plan to make a fix ?

jmmacip commented 5 years ago

Hi,

Do you plan to make a fix ?

I have been looking at the code and there are some implications on changing invoke-nsxrestmethod and Invoke-NsxWebRequest because this functions are widely used and the fact that in nsx 6.3 Rest API thee are only 4 calls using paging and 9 in 6.4, I´m more inclined to create a specific Invoke-NsxWebRequest-paged and use it only with those 9 calls.

alagoutte commented 5 years ago

It will not be complicated to add a Parameter for Paging ? (to NsxWebRequest ?)

padrevh commented 5 years ago

PowerNSX has been incredibly valuable to my organization. However, since exceeding 1024 security groups and security tags here, this limitation has made most commands useless since the results are incomplete. Can you advise on if you plan to make a fix? Or suggest any workaround? Thank you!

alagoutte commented 5 years ago

Hi,

it is a limited dev of powernsx... you can look some other function already using paging like Get-NsxLogicalSwitch or Get-NsxEdge