VMware {code} Community
daveniu
Contributor
Contributor

Setting 'Always used assigned IP Addresses until this vApp or associated netwroks are deleted'

Hi

I have been working through some test code to deploy a vApp from a template, all is good and I can deploy the vApp from the template:-) The only thing I cant work out how to do is to set the 'Always used assigned IP Addresses until this vApp or associated networks are deleted' tick box that is shown in the Flash GUI on the networking tab of the vapp.

I have been looking around the NetworkConfig object and think I have found the setting namely RetainNetInfoAcrossDeployments

            Vdc vdc = FindVdc(orgName, vdcName, client);
            var vapp = Vapp.GetVappByReference(client, vdc.GetVappRefByName("HellovCloudvAppp"));
            var vappNet=vapp.GetNetworkConfigSection();
            vappNet.NetworkConfig.FirstOrDefault().Configuration.RetainNetInfoAcrossDeployments=true;
            vappNet.NetworkConfig.FirstOrDefault().Configuration.RetainNetInfoAcrossDeploymentsSpecified=true
            vapp.UpdateSection(vappNet);

But try as I may I am unable to set the tick box in the GUI after my API call.

Regards and thanks in advance

David

Reply
0 Kudos
3 Replies
bsvinis
Contributor
Contributor

We are also encountering this issue. The PHP SDK we are using does not return any faults, so we assume its trying to, but every time we do a getRetainNetInfoAcrossDeployments() call after attempting to set this in the NetworkConfigurationType, we receive a bool false back. Is the setting not being set on the vCloud Director side?

Reply
0 Kudos
rkamal
VMware Employee
VMware Employee

Hi,

Also logged a bug for this.

Regards,

Rajesh Kamal.

Reply
0 Kudos
alexvirtacore
Contributor
Contributor

Is there anywhere to view that bug report? Do you happen to have an update on it? We're running into complications with using vCloud Connector and the API.

Reply
0 Kudos