title: How to add parent network to existing vapp via REST api when fenceMode is isolated
body: <p>I have a vapp instantiated on vcd host via my template, vapp network config section xml looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;NetworkConfigSection xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://mycloud.stratogen.com/api/vApp/vapp-0991d221-1b3e-47aa-ab69-2d8f300f454d/networkConfigSection/" ovf:required="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 http://mycloud.stratogen.com/api/v1.5/schema/master.xsd"&gt;
      &lt;ovf:Info&gt;The configuration parameters for logical networks&lt;/ovf:Info&gt;
      &lt;Link rel="edit" type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://mycloud.stratogen.com/api/vApp/vapp-0991d221-1b3e-47aa-ab69-2d8f300f454d/networkConfigSection/"/&gt;
      &lt;NetworkConfig networkName="VM Network"&gt;
          &lt;Link rel="repair" href="https://mycloud.stratogen.com/api/admin/network/86d21d4f-0b15-44e3-877e-5b5160ea9271/action/reset"/&gt;
          &lt;Description&gt;The VM Network network&lt;/Description&gt;
          &lt;Configuration&gt;
              &lt;IpScope&gt;
                  &lt;IsInherited&gt;false&lt;/IsInherited&gt;
                  &lt;Gateway&gt;192.168.254.1&lt;/Gateway&gt;
                  &lt;Netmask&gt;255.255.255.0&lt;/Netmask&gt;
                  &lt;IpRanges&gt;
                      &lt;IpRange&gt;
                          &lt;StartAddress&gt;192.168.254.100&lt;/StartAddress&gt;
                          &lt;EndAddress&gt;192.168.254.199&lt;/EndAddress&gt;
                      &lt;/IpRange&gt;
                  &lt;/IpRanges&gt;
              &lt;/IpScope&gt;
              &lt;FenceMode&gt;isolated&lt;/FenceMode&gt;
              &lt;RetainNetInfoAcrossDeployments&gt;false&lt;/RetainNetInfoAcrossDeployments&gt;
          &lt;/Configuration&gt;
          &lt;IsDeployed&gt;false&lt;/IsDeployed&gt;
      &lt;/NetworkConfig&gt;
  &lt;/NetworkConfigSection&gt;
  </code></pre>
  
  <p>So, I have read official vmware documentation about NetworkConfigSection and tried to add ParentNetwork and switch to natRouted fence mode exactly as it was in example:
  <a href="https://pubs.vmware.com/vcd-51/index.jsp?topic=%2Fcom.vmware.vcloud.api.doc_51%2FGUID-92622A15-E588-4FA1-92DA-A22A4757F2A0.html" rel="nofollow">https://pubs.vmware.com/vcd-51/index.jsp?topic=%2Fcom.vmware.vcloud.api.doc_51%2FGUID-92622A15-E588-4FA1-92DA-A22A4757F2A0.html</a></p>
  
  <p>So, now my XML looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;NetworkConfigSection xmlns="http://www.vmware.com/vcloud/v1.5" xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1" type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://mycloud.stratogen.com/api/vApp/vapp-0991d221-1b3e-47aa-ab69-2d8f300f454d/networkConfigSection/" ovf:required="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.dmtf.org/ovf/envelope/1 http://schemas.dmtf.org/ovf/envelope/1/dsp8023_1.1.0.xsd http://www.vmware.com/vcloud/v1.5 http://mycloud.stratogen.com/api/v1.5/schema/master.xsd"&gt;
      &lt;ovf:Info&gt;The configuration parameters for logical networks&lt;/ovf:Info&gt;
      &lt;Link rel="edit" type="application/vnd.vmware.vcloud.networkConfigSection+xml" href="https://mycloud.stratogen.com/api/vApp/vapp-0991d221-1b3e-47aa-ab69-2d8f300f454d/networkConfigSection/"/&gt;
      &lt;NetworkConfig networkName="VM Network"&gt;
          &lt;Link rel="repair" href="https://mycloud.stratogen.com/api/admin/network/86d21d4f-0b15-44e3-877e-5b5160ea9271/action/reset"/&gt;
          &lt;Description&gt;The VM Network network&lt;/Description&gt;
          &lt;Configuration&gt;
          &lt;IpScopes&gt;
              &lt;IpScope&gt;
                  &lt;IsInherited&gt;false&lt;/IsInherited&gt;
                  &lt;Gateway&gt;192.168.254.1&lt;/Gateway&gt;
                  &lt;Netmask&gt;255.255.255.0&lt;/Netmask&gt;
                  &lt;IpRanges&gt;
                      &lt;IpRange&gt;
                          &lt;StartAddress&gt;192.168.254.100&lt;/StartAddress&gt;
                          &lt;EndAddress&gt;192.168.254.199&lt;/EndAddress&gt;
                      &lt;/IpRange&gt;
                  &lt;/IpRanges&gt;
              &lt;/IpScope&gt;
          &lt;/IpScopes&gt;
              &lt;FenceMode&gt;natRouted&lt;/FenceMode&gt;
              &lt;ParentNetwork
              type="application/vnd.vmware.vcloud.network+xml"
              name="Internet"
              href="https://vcloud.example.com/api/network/54" /&gt;
  
              &lt;RetainNetInfoAcrossDeployments&gt;false&lt;/RetainNetInfoAcrossDeployments&gt;
          &lt;/Configuration&gt;
          &lt;IsDeployed&gt;false&lt;/IsDeployed&gt;
      &lt;/NetworkConfig&gt;
  &lt;/NetworkConfigSection&gt;
  </code></pre>
  
  <p>After that I submitted PUT request to edit URL and I got an error:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Error xmlns="http://www.vmware.com/vcloud/v1.5" minorErrorCode="BAD_REQUEST" message="Bad request
   - Unexpected JAXB Exception
   - cvc-complex-type.2.4.a: Invalid content was found starting with element \'ParentNetwork\'. One of \'{&amp;quot;http://www.vmware.com/vcloud/v1.5&amp;quot;:RetainNetInfoAcrossDeployments, &amp;quot;http://www.vmware.com/vcloud/v1.5&amp;quot;:Features, &amp;quot;http://www.vmware.com/vcloud/v1.5&amp;quot;:SyslogServerSettings, &amp;quot;http://www.vmware.com/vcloud/v1.5&amp;quot;:RouterInfo}\' is expected." majorErrorCode="400" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://mycloud.stratogen.com/api/v1.5/schema/master.xsd"&gt;&lt;/Error&gt;
  </code></pre>
  
  <p>How could I add parent network to existing vApp using vCloudDirector rest api?</p>
  
  <p>Thanks.</p>