vmware / go-vcloud-director

Golang SDK for VMware Cloud Director
Other
80 stars 76 forks source link

Getting an AdminVdc does not populate the ResourcePoolRefs property correctly #482

Closed ArnoSen closed 1 year ago

ArnoSen commented 2 years ago

Describe the bug

When retrieving an AdminVdc, the ResourcePoolRefs property is empty but when observing the raw xml, there are results.

Reproduction steps

Run the tests in https://github.com/ArnoSen/go-vcloud-director/blob/UNMARSHAL_OF_ADMINVDC_FAILING_TEST/types/v56/types_test.go

and they will fail.

The test uses a adminVcd xml representation that was taken from one of our test vcloud instances.
ResourcePoolRefs are not populated.

Expected behavior

I expect the resouce pool reference contains one reference with the values from the below xml content:

+    <ResourcePoolRefs>
+        <vmext:VimObjectRef>
+            <vmext:VimServerRef href="https://testcloud/api/admin/extension/vimServer/d5b16253-9f4b-4652-936c-bee560901797" id="urn:vcloud:vimserver:d5b16253-9f4b-4652-936c-bee560901797" type="application/vnd.vmware.admin.vmwvirtualcenter+xml" name="VC"/>
+            <vmext:MoRef>resgroup-1696</vmext:MoRef>
+            <vmext:VimObjectType>RESOURCE_POOL</vmext:VimObjectType>
+        </vmext:VimObjectRef>
+    </ResourcePoolRefs>

Additional context

No response

Didainius commented 1 year ago

Solved in #494