Examples of ConfigSpecImpl


Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

         VcContext.inVcSessionDo(new VcSession<Void>() {
            @Override
            protected Void body() throws Exception {
               FlagInfo flagInfo = new FlagInfoImpl();
               flagInfo.setDiskUuidEnabled(true);
               ConfigSpec configSpec = new ConfigSpecImpl();
               configSpec.setFlags(flagInfo);
               vm.reconfigure(configSpec);
               return null;
            }

            protected boolean isTaskSession() {
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

                              .getOvfEnvironmentTransport()).contains(
                        vmToolEnableItem)) {
               String[] ovfEnvTransport = new String[] { vmToolEnableItem };
               VmConfigSpec vmConfigSpec = new VmConfigSpecImpl();
               vmConfigSpec.setOvfEnvironmentTransport(ovfEnvTransport);
               ConfigSpec configSpec = new ConfigSpecImpl();
               configSpec.setVAppConfig(vmConfigSpec);
               vm.reconfigure(configSpec);
               logger.info("configured ovf env transport");
               return true;
            }
            return false;
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

            if (vm.getConfig() == null || vm.getConfig().getTools() == null
                  || vm.getConfig().getTools().getSyncTimeWithHost() == null
                  || !vm.getConfig().getTools().getSyncTimeWithHost()) {
               ToolsConfigInfo toolsConfigInfo = new ToolsConfigInfoImpl();
               toolsConfigInfo.setSyncTimeWithHost(true);
               ConfigSpec configSpec = new ConfigSpecImpl();
               configSpec.setTools(toolsConfigInfo);
               vm.reconfigure(configSpec);
               logger.info("enabled sync time with host");
               return true;
            }
            return false;
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

         /*
          * Clone the template VM.
          */
         System.out.println("clone the template VM to a VM");
         ConfigSpec spec = new ConfigSpecImpl();
         vm1 = vm.cloneTemplate(vm1Name, myRP, d1, spec);
         System.out.println(vm1.getInfo());
         vm1.dumpDevices();
         map = vm1.getDbvmConfig();
         System.out.println(map);
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

    * @return configuration specification
    * @throws Exception
    */
   public static ConfigSpec createConfigSpec(
         List<VirtualDeviceSpec> deviceChange) throws Exception {
      ConfigSpec config = new ConfigSpecImpl();
      config.setDeviceChange(deviceChange
            .toArray(new VirtualDeviceSpec[deviceChange.size()]));
      return config;
   }
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

      return config;
   }

   public static ConfigSpec createConfigSpec(VirtualDeviceSpec... deviceChanges)
         throws Exception {
      ConfigSpec config = new ConfigSpecImpl();
      config.setDeviceChange(deviceChanges);
      return config;
   }
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

      }
   }

   public static ConfigSpec createEnableDisableHotAddConfigSpec(
         boolean enableHotAddCpu, boolean enableHotAddMemory) {
      ConfigSpec cfgSpec = new ConfigSpecImpl();
      OptionValue hotAddMemory =
            new OptionValueImpl(HOT_ADD_MEMORY_KEY, String.valueOf(
                  enableHotAddMemory).toUpperCase());
      OptionValue hotAddCpu =
            new OptionValueImpl(HOT_ADD_CPU_KEY, String
                  .valueOf(enableHotAddCpu).toUpperCase());
      cfgSpec.setExtraConfig(new OptionValue[] { hotAddMemory, hotAddCpu });
      return cfgSpec;
   }
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

    * (non-Javadoc)
    * @see com.vmware.aurora.vc.VcVirtualMachine#rename(java.lang.String)
    */
   @Override
   public void rename(String newName) throws Exception {
      ConfigSpec spec = new ConfigSpecImpl();
      spec.setName(newName);
      reconfigure(spec);
   }
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

   }

   @Override
   public void
   setRequestedChangeTracking(boolean enabled) throws Exception {
      ConfigSpec spec = new ConfigSpecImpl();
      spec.setChangeTrackingEnabled(enabled);
      reconfigure(spec);
   }
View Full Code Here

Examples of com.vmware.vim.binding.impl.vim.vm.ConfigSpecImpl

    * @param callback The callback function.
    */
   private VcTask setExtraConfig(String optionKey, Object value, final IVcTaskCallback callback)
   throws Exception {
      String jsonString = (new Gson()).toJson(value);
      ConfigSpec spec = new ConfigSpecImpl();
      OptionValue[] extraConfig = new OptionValueImpl[1];
      extraConfig[0] = new OptionValueImpl(optionKey, jsonString);
      spec.setExtraConfig(extraConfig);
      return reconfigure(spec, callback);
   }
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.