How can I set to a vapp the runtime lease to NEVER EXPIRE on deployment of the vapp?
When I deploy the vapp I use this code :
_vapp.deploy(false, 1000000, false).waitForTask(0);
the second parameter affects the runtime lese, I've tried 0 or 1 but had no effect, I got an error in deployment. How can I set this to NEVER EXPIRE??
with the .NET SDK to do this here is what we do.. hope this helps. (I know it is not exactly what you are doing)
LeaseSettingsSectionType leaseSettings = vapp.GetLeaseSettingsSection();
leaseSettings.DeploymentLeaseExpirationSpecified = false;
leaseSettings.DeploymentLeaseInSecondsSpecified = true;
leaseSettings.DeploymentLeaseInSeconds = 0;
Task vCloudUpdateTask = vapp.UpdateSection(leaseSettings);
I tried this
LeaseSettingsSectionType leaseSection = _vapp.getLeaseSettingsSection();
leaseSection.setDeploymentLeaseInSeconds(946080000);
_vapp.updateSection(leaseSection).waitForTask(0);
but I get the folowing error when I call _vapp.getLeaseSettingsSection();
ERROR [org.jboss.as.ejb3] (EJB default - 1) JBAS014102: Asynchronous invocation failed: com.vmware.vcloud.sdk.VCloudException: Data Not Found
at com.vmware.vcloud.sdk.Vapp.getLeaseSettingsSection(Vapp.java:224)
Any hints?