2 Replies Latest reply on Feb 28, 2017 4:58 AM by Nishank11

    Error --> Subnet mask cannot be empty while creating External Network. even when Mask has been set

    Nishank11 Lurker

      Hi There,

      I am using VCD APIs to create a new External network for a provisioned VCD.

      VCD Version 5.6.4

      VCD API version 1.5

      Now, when I am trying to create an External network using POST to "https://<vcloudIP>api/admin/extension/externalnets" and creating the following body, I get an error saying "Subnet Mask can't be empty' However, it is very clear from the body that the mask has been set appropriately.

      Can somebody please point out the issue here...

      <?xml version="1.0" encoding="UTF-8"?>
      <vmext:VMWExternalNetwork
      name="example-extnet"
      type="application/vnd.vmware.admin.vmwexternalnet+xml">
      <vcloud:Description>ExternalNet</vcloud:Description>
      <vcloud:Configuration>
      <vcloud:IpScopes>
      <vcloud:IpScope>
      <vcloud:IsInherited>false</vcloud:IsInherited>
      <vcloud:Gateway>10.11.12.13</vcloud:Gateway>
      <vcloud:Netmask>255.255.254.0</vcloud:Netmask>
      <vcloud:Dns1>10.11.12.14</vcloud:Dns1>
      <vcloud:Dns2>10.11.12.15</vcloud:Dns2>
      <vcloud:DnsSuffix>example.com</vcloud:DnsSuffix>
       <vcloud:IpRanges>
                      <vcloud:IpRange>
                          <vcloud:StartAddress>10.11.12.20</vcloud:StartAddress>
                          <vcloud:EndAddress>10.11.12.50</vcloud:EndAddress>
                      </vcloud:IpRange>
       </vcloud:IpRanges>
      </vcloud:IpScope>
      </vcloud:IpScopes>
      <vcloud:FenceMode>isolated</vcloud:FenceMode>
      </vcloud:Configuration>
      <vmext:VimPortGroupRef>
      <vmext:VimServerRef
      <vmext:MoRef>dvportgroup-45</vmext:MoRef>
      <vmext:VimObjectType>DV_PORTGROUP</vmext:VimObjectType>
      </vmext:VimPortGroupRef>
      </vmext:VMWExternalNetwork>
       
      "@

      <?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="example-extnet"

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

      <vcloud:Description>ExternalNet</vcloud:Description>

      <vcloud:Configuration>

      <vcloud:IpScopes>

      <vcloud:IpScope>

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

      <vcloud:Gateway>10.11.12.13</vcloud:Gateway>

      <vcloud:Netmask>255.255.254.0</vcloud:Netmask>

      <vcloud:Dns1>10.11.12.14</vcloud:Dns1>

      <vcloud:Dns2>10.11.12.15</vcloud:Dns2>

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

       <vcloud:IpRanges>

                      <vcloud:IpRange>

                          <vcloud:StartAddress>10.11.12.20</vcloud:StartAddress>

                          <vcloud:EndAddress>10.11.12.50</vcloud:EndAddress>

                      </vcloud:IpRange>

       </vcloud:IpRanges>

      </vcloud:IpScope>

      </vcloud:IpScopes>

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

      </vcloud:Configuration>

      <vmext:VimPortGroupRef>

      <vmext:VimServerRef

      href="https://<vC-IP/api/admin/extension/vimServer/64c20b37-e21e-4d1b-8601-5991bbc288bc" />

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

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

      </vmext:VimPortGroupRef>

      </vmext:VMWExternalNetwork>

       

       

      "@