Java 类com.vmware.vim25.CustomizationGlobalIPSettings 实例源码

项目:photon-model    文件:CustomizationClient.java   
public void customizeDns(List<String> dnsServers, List<String> dnsSearchDomains,
        CustomizationSpec template) {
    CustomizationGlobalIPSettings settings = new CustomizationGlobalIPSettings();
    if (dnsServers != null) {
        settings.getDnsServerList().addAll(dnsServers);
    }

    if (dnsSearchDomains != null) {
        settings.getDnsSuffixList().addAll(dnsSearchDomains);
    }

    template.setGlobalIPSettings(settings);
}
项目:jcloud-vsphere    文件:MasterToVirtualMachineCloneSpec.java   
private VirtualMachineCloneSpec configureVirtualMachineCloneSpec(VirtualMachineRelocateSpec rSpec, String linuxName, boolean postConfiguration) throws Exception {

      VirtualMachineCloneSpec cloneSpec = new VirtualMachineCloneSpec();
      cloneSpec.setPowerOn(true);
      cloneSpec.setTemplate(false);
      //cloneSpec.setSnapshot(currentSnapshot.getMOR());
      cloneSpec.setLocation(rSpec);
      if (postConfiguration) {
         CustomizationSpec customizationSpec = new CustomizationSpec();
         CustomizationLinuxPrep linuxPrep = new CustomizationLinuxPrep();
         CustomizationFixedName fixedName = new CustomizationFixedName();
         fixedName.setName(linuxName);
         linuxPrep.setHostName(fixedName);
         linuxPrep.setDomain("");
         linuxPrep.setHwClockUTC(true);
         //linuxPrep.setTimeZone("Etc/UTC");
         customizationSpec.setIdentity(linuxPrep);
         customizationSpec.setGlobalIPSettings(new CustomizationGlobalIPSettings());
         CustomizationAdapterMapping[] nicSettingMap = new CustomizationAdapterMapping[1];
         nicSettingMap[0] = new CustomizationAdapterMapping();
         nicSettingMap[0].adapter = new CustomizationIPSettings();
         nicSettingMap[0].adapter.setIp(new CustomizationDhcpIpGenerator());
         customizationSpec.setNicSettingMap(nicSettingMap);
         cloneSpec.setCustomization(customizationSpec);
      }


      return cloneSpec;
   }
项目:cs-actions    文件:GuestConfigSpecs.java   
public CustomizationSpec getWinCustomizationSpec(GuestInputs guestInputs) {
    CustomizationSpec customizationSpec = new CustomizationSpec();

    CustomizationSysprep customizationSysprep = getCustomizationSysprep(guestInputs);
    customizationSpec.setIdentity(customizationSysprep);

    CustomizationWinOptions winOptions = getCustomizationWinOptions(guestInputs);
    customizationSpec.setOptions(winOptions);

    customizationSpec.setGlobalIPSettings(new CustomizationGlobalIPSettings());

    setAdapter(guestInputs, customizationSpec);

    return customizationSpec;
}
项目:cs-actions    文件:GuestConfigSpecs.java   
public CustomizationSpec getLinuxCustomizationSpec(GuestInputs guestInputs) {
    CustomizationSpec customizationSpec = new CustomizationSpec();

    CustomizationLinuxPrep customizationLinuxPrep = getCustomizationLinuxPrep(guestInputs);
    customizationSpec.setIdentity(customizationLinuxPrep);

    CustomizationGlobalIPSettings customizationGlobalIPSettings = new CustomizationGlobalIPSettings();
    customizationSpec.setGlobalIPSettings(customizationGlobalIPSettings);

    setAdapter(guestInputs, customizationSpec);

    return customizationSpec;
}