Package com.vmware.vim.binding.impl.vim.OvfManager_Impl

Examples of com.vmware.vim.binding.impl.vim.OvfManager_Impl.CreateImportSpecParamsImpl


   throws Exception {
      ManagedObjectReference vmRef;
      AuAssert.check(VcContext.isInTaskSession());
      VcService vcs = VcContext.getService();

      CreateImportSpecParams importParams = new CreateImportSpecParamsImpl();
      importParams.setDeploymentOption("");
      importParams.setLocale("");
      importParams.setEntityName(name);
      NetworkMapping[] nets = {
            new NetworkMappingImpl("Network 1", network.getMoRef()),
            new NetworkMappingImpl("Network 2", network.getMoRef())
      };
      importParams.setNetworkMapping(nets);
      importParams.setIpAllocationPolicy(IpAllocationPolicy.transientPolicy.toString());
      importParams.setDiskProvisioning("thin");

      // create import spec from ovf
      CreateImportSpecResult specResult = vcs.getOvfManager().createImportSpec(
            loadOvfContents(ovfPath), rp.getMoRef(), ds.getMoRef(), importParams);
      AuAssert.check(specResult.getError() == null && specResult.getWarning() == null);
View Full Code Here

TOP

Related Classes of com.vmware.vim.binding.impl.vim.OvfManager_Impl.CreateImportSpecParamsImpl

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.