Package org.jclouds.vcloud.domain

Examples of org.jclouds.vcloud.domain.GuestCustomizationSection


   protected Boolean resetPasswordRequired;
   protected String customizationScript;
   protected String computerName;

   public GuestCustomizationSection getResult() {
      GuestCustomizationSection system = new GuestCustomizationSection(guest.getType(), guest.getHref(), info, enabled,
            changeSid, virtualMachineId, joinDomainEnabled, useOrgSettings, domainName, domainUserName,
            domainUserPassword, adminPasswordEnabled, adminPasswordAuto, adminPassword, resetPasswordRequired,
            customizationScript, computerName, edit);
      this.guest = null;
      this.info = null;
View Full Code Here


    * strict than those in a vAppTemplate. For example, while it is possible to instantiate a
    * vAppTemplate with a VM named (incorrectly) {@code Ubuntu_10.04}, you must change the name to a
    * valid (alphanumeric underscore) name before you can update it.
    */
   public Task updateVmWithNameAndCustomizationScript(Vm vm, String name, @Nullable String customizationScript) {
      GuestCustomizationSection guestConfiguration = vm.getGuestCustomizationSection();
      guestConfiguration.setComputerName(name);
      if (customizationScript != null) {
         // In version 1.0.0, the api returns a script that loses newlines, so we cannot append to a
         // customization script.
         // TODO: parameterize whether to overwrite or append existing customization
         if (!buildVersion.startsWith("1.0.0") && !"".endsWith(buildVersion)
                  && guestConfiguration.getCustomizationScript() != null)
            customizationScript = guestConfiguration.getCustomizationScript() + "\n" + customizationScript;

         guestConfiguration.setCustomizationScript(customizationScript);
      }
      return client.getVmApi().updateGuestCustomizationOfVm(guestConfiguration, vm.getHref());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.vcloud.domain.GuestCustomizationSection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.