Package com.vmware.vim25

Examples of com.vmware.vim25.OvfFile


                     progressReporter.reportProgress((int)(param * 100 / totalBytes));
                   }
                  });
               totalBytesDownloaded += lengthOfDiskFile;

               OvfFile ovfFile = new OvfFile();
               ovfFile.setPath(diskFileName);
               ovfFile.setDeviceId(deviceId);
               ovfFile.setSize(lengthOfDiskFile);
               ovfFiles[i] = ovfFile;
            }

            // write OVF descriptor file
            OvfCreateDescriptorParams ovfDescParams = new OvfCreateDescriptorParams();
View Full Code Here


                                    progressReporter.reportProgress((int)(param * 100 / totalBytes));
                                }
                            });
                            totalBytesDownloaded += lengthOfDiskFile;

                            OvfFile ovfFile = new OvfFile();
                            ovfFile.setPath(diskFileName);
                            ovfFile.setDeviceId(deviceId);
                            ovfFile.setSize(lengthOfDiskFile);
                            ovfFiles[i] = ovfFile;
                        }

                        // write OVF descriptor file
                        OvfCreateDescriptorParams ovfDescParams = new OvfCreateDescriptorParams();
View Full Code Here

                     progressReporter.reportProgress((int)(param * 100 / totalBytes));
                   }
                  });
               totalBytesDownloaded += lengthOfDiskFile;

               OvfFile ovfFile = new OvfFile();
               ovfFile.setPath(diskFileName);
               ovfFile.setDeviceId(deviceId);
               ovfFile.setSize(lengthOfDiskFile);
               ovfFiles[i] = ovfFile;
            }

            // write OVF descriptor file
            OvfCreateDescriptorParams ovfDescParams = new OvfCreateDescriptorParams();
View Full Code Here

                     progressReporter.reportProgress((int)(param * 100 / totalBytes));
                   }
                  });
               totalBytesDownloaded += lengthOfDiskFile;

               OvfFile ovfFile = new OvfFile();
               ovfFile.setPath(diskFileName);
               ovfFile.setDeviceId(deviceId);
               ovfFile.setSize(lengthOfDiskFile);
               ovfFiles[i] = ovfFile;
            }

            // write OVF descriptor file
            OvfCreateDescriptorParams ovfDescParams = new OvfCreateDescriptorParams();
View Full Code Here

                     progressReporter.reportProgress((int)(param * 100 / totalBytes));
                   }
                  });
               totalBytesDownloaded += lengthOfDiskFile;
              
               OvfFile ovfFile = new OvfFile();
               ovfFile.setPath(diskFileName)
               ovfFile.setDeviceId(deviceId)
               ovfFile.setSize(lengthOfDiskFile)
               ovfFiles[i] = ovfFile; 
            }
           
            // write OVF descriptor file
            OvfCreateDescriptorParams ovfDescParams = new OvfCreateDescriptorParams()
View Full Code Here

          System.out.println("File Name: " + diskFileName);
          System.out.println("VMDK URL: " + diskUrlStr);
          String cookie = si.getServerConnection().getVimService().getWsc().getCookie();
          long lengthOfDiskFile = writeVMDKFile(diskLocalPath, diskUrlStr, cookie, alredyWrittenBytes, diskCapacityInByte);
          alredyWrittenBytes += lengthOfDiskFile;
          OvfFile ovfFile = new OvfFile();
          ovfFile.setPath(diskFileName);
          ovfFile.setDeviceId(deviceId);
          ovfFile.setSize(lengthOfDiskFile);
          ovfFiles[i] = ovfFile;
        }
       
        OvfCreateDescriptorParams ovfDescParams = new OvfCreateDescriptorParams();
        ovfDescParams.setOvfFiles(ovfFiles);
View Full Code Here

        vmFolder = (Folder) host.getVms()[0].getParent();

        importSpecParams.setLocale("US");
        importSpecParams.setEntityName(newVmName);
        importSpecParams.setDeploymentOption("");
        OvfNetworkMapping networkMapping = new OvfNetworkMapping();
        networkMapping.setName("Network 1");
        networkMapping.setNetwork(host.getNetworks()[0].getMOR());
        importSpecParams.setNetworkMapping(new OvfNetworkMapping[] { networkMapping });
        importSpecParams.setPropertyMapping(null);

        /* read ovf from the file. */
        ovfDescriptor = readOvfContent(ovfPath);
View Full Code Here

 
  public ObjectContent[] getVmPropertiesOnHyperHost(String[] propertyPaths) throws Exception {
    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - retrieveProperties() for VM properties. target MOR: " + _mor.get_value() + ", properties: " + new Gson().toJson(propertyPaths));
   
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("VirtualMachine");
    pSpec.setPathSet(propertyPaths);
   
      TraversalSpec host2VmTraversal = new TraversalSpec();
      host2VmTraversal.setType("HostSystem");
      host2VmTraversal.setPath("vm");
      host2VmTraversal.setName("host2VmTraversal");
View Full Code Here

  @Override
  public ObjectContent[] getDatastorePropertiesOnHyperHost(String[] propertyPaths) throws Exception {
    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - retrieveProperties() on Datastore properties. target MOR: " + _mor.get_value() + ", properties: " + new Gson().toJson(propertyPaths));

    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Datastore");
    pSpec.setPathSet(propertyPaths);
   
      TraversalSpec host2DatastoreTraversal = new TraversalSpec();
      host2DatastoreTraversal.setType("HostSystem");
      host2DatastoreTraversal.setPath("datastore");
      host2DatastoreTraversal.setName("host2DatastoreTraversal");
View Full Code Here

  public ManagedObjectReference getNetworkMor(String portGroupName) throws Exception {
    PropertySpec pSpec = new PropertySpec();
    pSpec.setType("Network");
    pSpec.setPathSet(new String[] {"summary.name"});
   
      TraversalSpec host2NetworkTraversal = new TraversalSpec();
      host2NetworkTraversal.setType("HostSystem");
      host2NetworkTraversal.setPath("network");
      host2NetworkTraversal.setName("host2NetworkTraversal");

      ObjectSpec oSpec = new ObjectSpec();
      oSpec.setObj(_mor);
      oSpec.setSkip(Boolean.TRUE);
      oSpec.setSelectSet(new SelectionSpec[] { host2NetworkTraversal });
View Full Code Here

TOP

Related Classes of com.vmware.vim25.OvfFile

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.