Examples of CreateImportSpecParams


Examples of com.vmware.vim.binding.vim.OvfManager.CreateImportSpecParams

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