Description
On asking for all virtual machines and using retrievePropertiesEx() it will return 100 objects and a token. using this token on continueRetrievePropertiesEx throws a Permission Denied Exception.
We tried the same with vmware govmomi and we receive 334 objects
Environment
- Java version: openjdk 17.0.10 2024-01-16
- vSphere version: vSphere 8.0
Steps or code snippet to reproduce
val propertyCollector = this.getServiceContent()?.propertyCollector
?: throw IllegalStateException("VMware Connection is open, but could not get property collector!")
val resultList = mutableListOf<ObjectContent>()
var retrieveResult = this.getPort()?.retrievePropertiesEx(propertyCollector, filters, options)
if (isResultEmpty(retrieveResult)) {
// return the empty list
return resultList
}
// add the current results, at this point, we know that retrieveResult is not null
resultList.addAll(retrieveResult!!.objects)
// continue the request to get remaining data chunks, if necessary
while (retrieveResult != null && retrieveResult.token != null) {
// get the continuation token
val token = retrieveResult.token
// continue data fetching using the provided continuation token
retrieveResult = this.getPort()?.continueRetrievePropertiesEx(propertyCollector, token)
if (!isResultEmpty(retrieveResult)) {
// again, at this point we know that retrieveResult is not empty
resultList.addAll(retrieveResult!!.objects)
}
}
return retrieveResult
Actual behavior
retrievePropertiesEx() returns 100 objects and a token of "0", and because of the token the continueRetrievePropertiesEx() is throwing an Permission Denied exception
Expected behavior
it should be possible to retrieve all 334 objects
Description
On asking for all virtual machines and using
retrievePropertiesEx()it will return 100 objects and a token. using this token oncontinueRetrievePropertiesExthrows a Permission Denied Exception.We tried the same with vmware govmomi and we receive 334 objects
Environment
Steps or code snippet to reproduce
Actual behavior
retrievePropertiesEx()returns 100 objects and a token of"0", and because of the token thecontinueRetrievePropertiesEx()is throwing an Permission Denied exceptionExpected behavior
it should be possible to retrieve all 334 objects