0 Replies Latest reply on Nov 7, 2018 2:17 AM by JoJoGabor

    Creating An External Network in vCloud Director 9.10

    JoJoGabor Expert

      I'm having trouble creating an external network in vCloud director. My XML must be wrong but I can't figure out where. I am performing a POST with this XML and get a HTTP 400 (Bad Request) error, can anyone see where I am going wrong?

       

      $xml = '<?xml version="1.0" encoding="UTF-8"?>

          <vmext:VMWExternalNetwork

         xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"

         xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"

         name="test-extnet"

         type="application/vnd.vmware.admin.vmwexternalnet+xml">

         <vcloud:Description>Test-extnet</vcloud:Description>

         <vcloud:Configuration>

            <vcloud:IpScopes>

               <vcloud:IpScope>

                  <vcloud:IsInherited>false</vcloud:IsInherited>

                  <vcloud:Gateway>10.67.68.1</vcloud:Gateway>

                  <vcloud:Netmask>255.255.255.0</vcloud:Netmask>

                  <vcloud:Dns1>10.67.68.2</vcloud:Dns1>

                  <vcloud:Dns2>10.67.68.3</vcloud:Dns2>

                  <vcloud:DnsSuffix>test.com</vcloud:DnsSuffix>

               </vcloud:IpScope>

            </vcloud:IpScopes>

            <vcloud:FenceMode>isolated</vcloud:FenceMode>

         </vcloud:Configuration>

         <vmext:VimPortGroupRef>

            <vmext:VimServerRef

               href="https://myvcdURL/api/admin/extension/vimServer/9" />

            <vmext:MoRef>dvportgroup-123</vmext:MoRef>

            <vmext:VimObjectType>DV_PORTGROUP</vmext:VimObjectType>

         </vmext:VimPortGroupRef>

      </vmext:VMWExternalNetwork>'