Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 220645

Re: VApp Instantiation

$
0
0

If you need to set the Lease settings here is some code that we use:

 

int deployLease = 7 * 24 * 60 * 60;

int storageLease = 30 * 24 * 60 * 60;

InstantiationParamsType instantiationParamsType = new InstantiationParamsType();

LeaseSettingsSectionType leaseSettingsSectionType = new LeaseSettingsSectionType

    {

        DeploymentLeaseInSecondsSpecified = true,

        DeploymentLeaseInSeconds = deployLease,

        DeploymentLeaseExpirationSpecified = true,

        StorageLeaseInSecondsSpecified = true,

        StorageLeaseInSeconds = storageLease,

        StorageLeaseExpirationSpecified = false

    };

Msg_Type leaseInfo = new Msg_Type();

leaseSettingsSectionType.Info = leaseInfo;

instantiationParamsType.Items = new Section_Type[]{leaseSettingsSectionType};

InstantiateVAppTemplateParamsType stuff = new InstantiateVAppTemplateParamsType

    {

        AllEULAsAccepted = true,

        name = alias,

        Source = template.Reference,

        deploy = true,

        Description = description,

        InstantiationParams = instantiationParamsType,

    };

Vapp app = vdc.InstantiateVappTemplate(stuff);


Viewing all articles
Browse latest Browse all 220645

Trending Articles



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