VMware {code} Community
admin
Immortal
Immortal

NetworkPool not returned from 5.1 server

We are using the version 1.5 api on a 5.1 server but not receiving NetworkPool objects

Get NetworkPoolReferences with:

https://vcloudt2/api/admin/extension/networkPoolReferences

Use the href from the response to attempt to get NetworkPool:

https://vcloudt2.model.infra.com.au/api/admin/extension/networkPool/4923cfb7-58ec-4c4b-bf1b-541d392f...

Response:

<?xml version="1.0" encoding="UTF-8"?>
</vmext:VMWNetworkPool>

Response from a v1.5 server:

<vmext:VMWNetworkPool xsi:type="vmext:FencePoolType" status="1" name="MyNetworkPool" id="urn:vcloud:networkpool:420b2439-e7c2-4ea3-8d69-843f33d79b90" type="application/vnd.vmware.admin.networkPool+xml" href="https://vcd15/api/admin/extension/networkPool/420b2439-e7c2-4ea3-8d69-843f33d79b90" xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 http://10.22.38.230/api/v1.5/schema/vmwextensions.xsd http://www.vmware.com/vcloud/v1.5 http://10.22.38.230/api/v1.5/schema/master.xsd" xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" xmlns:vcloud="http://www.vmware.com/vcloud/v1.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <vcloud:Link rel="up" type="application/vnd.vmware.admin.vmwNetworkPoolReferences+xml" href="https://vcd15/api/admin/extension/networkPoolReferences" />

   <vcloud:Link rel="edit" type="application/vnd.vmware.admin.networkPool+xml" href="https://vcd15/api/admin/extension/networkPool/420b2439-e7c2-4ea3-8d69-843f33d79b90" />

   <vcloud:Link rel="remove" href="https://vcd15/api/admin/extension/networkPool/420b2439-e7c2-4ea3-8d69-843f33d79b90" />

   <vcloud:Description>desc for mynetpool</vcloud:Description>

   <vmext:FenceIdCount>10</vmext:FenceIdCount>

   <vmext:VlanId>0</vmext:VlanId>

   <vmext:VimSwitchRef>

     <vmext:VimServerRef type="application/vnd.vmware.admin.vmwvirtualcenter+xml" href="https://vcd15/api/admin/extension/vimServer/bcfff6d0-568a-452a-99cf-b015d6a410a3" />

     <vmext:MoRef>dvs-64</vmext:MoRef>

     <vmext:VimObjectType>DV_SWITCH</vmext:VimObjectType>

   </vmext:VimSwitchRef>

   <vmext:UsedNetworksCount>0</vmext:UsedNetworksCount>

   <vmext:Mtu>1500</vmext:Mtu>

</vmext:VMWNetworkPool>

0 Kudos
2 Replies
Todor_Todorov
Hot Shot
Hot Shot

Hi,

I suppose you're trying to get a network pool of VXLAN type (xsi:type="vmext:VxlanPoolType"). Since this type of network pool was introduced in 5.1, it can only be retrieved with 5.1 version of the API. Other network pool types (FencePoolType, etc.) should be accessible with 1.5 version of the API.

Regards,

Todor Todorov

0 Kudos
admin
Immortal
Immortal

Our issue is that the v1.5 API QueryService returns records for the VXLAN type:

<QueryResultRecords total="2" pageSize="128" page="1" name="networkPool" type="application/vnd.vmware.vcloud.query.records+xml" ...
   <Link rel="alternate" type="application/vnd.vmware.vcloud.query.references+xml" href="https://T2Server/api/query...
   <Link rel="alternate" type="application/vnd.vmware.vcloud.query.idrecords+xml" href="https://T2Server/api/quer...
   <NetworkPoolRecord networkPoolType="3" name="T2Prov-VXLAN-NP" isBusy="false" href="https://T2Server/api/admin/extension/networkPool/4923c...
   <NetworkPoolRecord networkPoolType="2" name="PortGroupPool" isBusy="false" href="https://T2Server/api/admin/extension/networkPool/aae7c00...
</QueryResultRecords>

We then loop through the NetworkPoolRecords and get the item using the href

It is at that point that our system fails when getting VXLAN type network pools.

Our solution will be to filter the network pools, removing networkPoolType="3" so that they are not processed for users connecting to the v5.1 server with the v1.5 API

Thank you for your reply.

0 Kudos