Examples of ManagedObjectReference


Examples of com.vmware.vim25.ManagedObjectReference

  public void importVmFromOVF(String ovfFilePath, String vmName, DatastoreMO dsMo, String diskOption) throws Exception {
      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - importVmFromOVF(). target MOR: " + _mor.getValue() + ", ovfFilePath: " + ovfFilePath + ", vmName: " + vmName
        + ", datastore: " + dsMo.getMor().getValue() + ", diskOption: " + diskOption);

    ManagedObjectReference morRp = getHyperHostOwnerResourcePool();
    assert(morRp != null);

    if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - importVmFromOVF(). resource pool: " + morRp.getValue());

    HypervisorHostHelper.importVmFromOVF(this, ovfFilePath, vmName, dsMo, diskOption, morRp, null);

      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - importVmFromOVF() done");
View Full Code Here

Examples of com.vmware.vim25.ManagedObjectReference

      if(s_logger.isTraceEnabled())
      s_logger.trace("vCenter API trace - mountDatastore(). target MOR: " + _mor.getValue() + ", vmfs: " + vmfsDatastore + ", poolHost: " + poolHostAddress
        + ", poolHostPort: " + poolHostPort + ", poolPath: " + poolPath + ", poolUuid: " + poolUuid);

    ManagedObjectReference morDs = null;
    ManagedObjectReference morDsFirst = null;
    List<ManagedObjectReference> hosts = (List<ManagedObjectReference>)_context.getVimClient().getDynamicProperty(_mor, "host");
    if(hosts != null && hosts.size() > 0) {
      for(ManagedObjectReference morHost : hosts) {
        HostMO hostMo = new HostMO(_context, morHost);
        morDs = hostMo.mountDatastore(vmfsDatastore, poolHostAddress, poolHostPort, poolPath, poolUuid);
        if(morDsFirst == null)
          morDsFirst = morDs;

        // assume datastore is in scope of datacenter
        assert(morDsFirst.getValue().equals(morDs.getValue()));
      }
    }

    if(morDs == null) {
      String msg = "Failed to mount datastore in all hosts within the cluster";
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.