Examples of OptionValue


Examples of com.vmware.vim.binding.vim.option.OptionValue

    *           -- memory size in MB
    */
   public static void setMemoryAndBalloon(ConfigSpec spec, Long memSize) {
      spec.setMemoryMB(memSize);
      Long maxBalloon = memSize * 75 / 100;
      OptionValue balloonOption =
            new OptionValueImpl("sched.mem.maxmemctl", maxBalloon.toString());
      spec.setExtraConfig(new OptionValue[] { balloonOption });
   }
View Full Code Here

Examples of com.vmware.vim25.OptionValue

              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

Examples of com.vmware.vim25.OptionValue

            // 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

Examples of com.vmware.vim25.OptionValue

              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

Examples of com.vmware.vim25.OptionValue

                        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

Examples of com.vmware.vim25.OptionValue

            }
        }
    }
   
    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

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

Examples of com.vmware.vim25.OptionValue

    }

    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

Examples of com.vmware.vim25.OptionValue

            }
        }
    }

    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

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
TOP
Copyright © 2018 www.massapi.com. 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.