Package com.vmware.vim25

Examples of com.vmware.vim25.OptionValue


    private static void configNvpExtraOption(List<OptionValue> extraOptions, VirtualMachineTO vmSpec) {
        /**
         * Extra Config : nvp.vm-uuid = uuid
         *  - Required for Nicira NVP integration
         */
      OptionValue newVal = new OptionValue();
        newVal.setKey("nvp.vm-uuid");
        newVal.setValue(vmSpec.getUuid());
        extraOptions.add(newVal);

        /**
         * Extra Config : nvp.iface-id.<num> = uuid
         *  - Required for Nicira NVP integration
         */
        int nicNum = 0;
        for (NicTO nicTo : sortNicsByDeviceId(vmSpec.getNics())) {
            if (nicTo.getUuid() != null) {
                newVal = new OptionValue();
                newVal.setKey("nvp.iface-id." + nicNum);
                newVal.setValue(nicTo.getUuid());
                extraOptions.add(newVal);
            }
            nicNum++;
        }
    }
View Full Code Here


    }

    private static void configCustomExtraOption(List<OptionValue> extraOptions, VirtualMachineTO vmSpec) {
      // we no longer to validation anymore
        for(Map.Entry<String, String> entry : vmSpec.getDetails().entrySet()) {
          OptionValue newVal = new OptionValue();
            newVal.setKey(entry.getKey());
            newVal.setValue(entry.getValue());
            extraOptions.add(newVal);
        }
    }
View Full Code Here

        if (optionsToMerge != null) {
            for (int j = 0; j < optionsToMerge.length; j++)
                options[i++] = optionsToMerge[j];
        }

        options[i] = new OptionValue();
        options[i].setKey("RemoteDisplay.vnc.enabled");
        options[i++].setValue(enableVnc ? "true" : "false");

        options[i] = new OptionValue();
        options[i].setKey("RemoteDisplay.vnc.password");
        options[i++].setValue(vncPassword);

        options[i] = new OptionValue();
        options[i].setKey("RemoteDisplay.vnc.port");
        options[i++].setValue("" + vncPort);

        if (needKeyboardSetup) {
            options[i] = new OptionValue();
            options[i].setKey("RemoteDisplay.vnc.keymap");
            options[i++].setValue(keyboardLayout);
        }

        return options;
View Full Code Here

                    String value = null;
                    for (DynamicProperty objProp : objProps) {
                        if (objProp.getName().equals("name")) {
                            name = (String)objProp.getVal();
                        } else {
                            OptionValue optValue = (OptionValue)objProp.getVal();
                            value = (String)optValue.getValue();
                        }
                    }

                    if (name != null && value != null) {
                        portInfo.put(name, Integer.parseInt(value));
View Full Code Here

            }
        }
    }

    private static void configBasicExtraOption(List<OptionValue> extraOptions, VirtualMachineTO vmSpec) {
        OptionValue newVal = new OptionValue();
        newVal.setKey("machine.id");
        newVal.setValue(vmSpec.getBootArgs());
        extraOptions.add(newVal);

        newVal = new OptionValue();
        newVal.setKey("devices.hotplug");
        newVal.setValue("true");
        extraOptions.add(newVal);
    }
View Full Code Here

    private static void configNvpExtraOption(List<OptionValue> extraOptions, VirtualMachineTO vmSpec) {
        /**
         * Extra Config : nvp.vm-uuid = uuid
         *  - Required for Nicira NVP integration
         */
        OptionValue newVal = new OptionValue();
        newVal.setKey("nvp.vm-uuid");
        newVal.setValue(vmSpec.getUuid());
        extraOptions.add(newVal);

        /**
         * Extra Config : nvp.iface-id.<num> = uuid
         *  - Required for Nicira NVP integration
         */
        int nicNum = 0;
        for (NicTO nicTo : sortNicsByDeviceId(vmSpec.getNics())) {
            if (nicTo.getUuid() != null) {
                newVal = new OptionValue();
                newVal.setKey("nvp.iface-id." + nicNum);
                newVal.setValue(nicTo.getUuid());
                extraOptions.add(newVal);
            }
            nicNum++;
        }
    }
View Full Code Here

    }

    private static void configCustomExtraOption(List<OptionValue> extraOptions, VirtualMachineTO vmSpec) {
        // we no longer to validation anymore
        for (Map.Entry<String, String> entry : vmSpec.getDetails().entrySet()) {
            OptionValue newVal = new OptionValue();
            newVal.setKey(entry.getKey());
            newVal.setValue(entry.getValue());
            extraOptions.add(newVal);
        }
    }
View Full Code Here

                        vmName = (String)objProp.getVal();
                    } else if(objProp.getName().startsWith("value[")) {
                      if(objProp.getVal() != null)
                        vmInternalCSName = ((CustomFieldStringValue)objProp.getVal()).getValue();
                    } else {
                        OptionValue optValue = (OptionValue)objProp.getVal();
                        value = (String)optValue.getValue();
                    }
                }
             
                  if (vmInternalCSName != null && isUserVMInternalCSName(vmInternalCSName))
                      vmName = vmInternalCSName;
View Full Code Here

            // pass boot arguments through machine.id & perform customized options to VMX
   
            Map<String, String> vmDetailOptions = validateVmDetails(vmSpec.getDetails());
            OptionValue[] extraOptions = new OptionValue[2 + vmDetailOptions.size()];
            extraOptions[0] = new OptionValue();
            extraOptions[0].setKey("machine.id");
            extraOptions[0].setValue(vmSpec.getBootArgs());
           
            extraOptions[1] = new OptionValue();
            extraOptions[1].setKey("devices.hotplug");
            extraOptions[1].setValue("true");

            int j = 2;
            for(Map.Entry<String, String> entry : vmDetailOptions.entrySet()) {
              extraOptions[j] = new OptionValue();
              extraOptions[j].setKey(entry.getKey());
              extraOptions[j].setValue(entry.getValue());
              j++;
            }
           
View Full Code Here

    if(optionsToMerge != null) {
      for(int j = 0; j < optionsToMerge.length; j++)
        options[i++] = optionsToMerge[j];
    }
     
    options[i] = new OptionValue();
    options[i].setKey("RemoteDisplay.vnc.enabled");
    options[i++].setValue(enableVnc ? "true" : "false");
 
    options[i] = new OptionValue();
    options[i].setKey("RemoteDisplay.vnc.password");
    options[i++].setValue(vncPassword);
 
    options[i] = new OptionValue();
    options[i].setKey("RemoteDisplay.vnc.port");
    options[i++].setValue("" + vncPort);
   
    if(needKeyboardSetup) {
      options[i] = new OptionValue();
      options[i].setKey("RemoteDisplay.vnc.keymap");
      options[i++].setValue(keyboardLayout);
    }
   
    return options;
View Full Code Here

TOP

Related Classes of com.vmware.vim25.OptionValue

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.