Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

How to update (set) ParentNetwork on vApp

$
0
0

I have a vApp that was instantiated from a vAppTemplate.  The vAppTemplate contains one network, and this network is bridged to an OrgNetwork.  Everything works as expected when the instantiation is to the same organization that the vAppTemplate belongs to.  However if I have shared this template and another organization instantiates this template it almost works.

 

The vApp is created in the new organization, and the vApp has all the network settings except for the ParentNetwork (because the system cannot assume what OrgNetwork to use).  However – how do you set this via the .NET api?

Code I tired for changing:

Vapp app = Vapp.GetVappByReference(clientSystem, ourVappReference);

NetworkConfigSectionType y = app.GetNetworkConfigSection();

var x = y.NetworkConfig[0].Configuration;

//Setting ParentNetwork as it is null

x.ParentNetwork = orgNetworkToUseReference;

x.FenceMode = FenceModeValuesType.bridged;

y.NetworkConfig[0].Configuration = x;

app.UpdateSection(y);

 

But gets error saying IpRange start is not set.  (Looking in debug on x it has very single setting set from the section it loaded)


Viewing all articles
Browse latest Browse all 2039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>