Package com.vmware.vim25

Examples of com.vmware.vim25.ManagedObjectReference


                return node.getSnapshot();
            } else {
                VirtualMachineSnapshotTree[] childTree =
                    node.getChildSnapshotList();
                if (childTree != null) {
                    ManagedObjectReference mor =
                        findSnapshotInTree(childTree, snapName);
                    if (mor != null) { return mor; }
                }
            }
        }
View Full Code Here


       
        VirtualMachineSnapshotTree[] snapTree =
            vm_.getSnapshot().getRootSnapshotList();
       
        if (snapTree != null) {
            ManagedObjectReference mor = findSnapshotInTree(snapTree, snapName);
            if (mor != null) {
                return new
                    VirtualMachineSnapshot(vm_.getServerConnection(), mor);
            }
        }
View Full Code Here

        if (entityType == null || morefStr == null) {
            return null;
        }

        /* create managed object reference */
        ManagedObjectReference mor = new ManagedObjectReference();
        mor.setType(entityType);
        mor.setVal(morefStr);

        return mor;
    }
View Full Code Here

     */
    protected VirtualMachine generateVirtualMachineWithMoref(String morefStr)
    {
        if (si_ == null || morefStr == null) { return null; }

        ManagedObjectReference mor =
            generateMoref("VirtualMachine", morefStr);
        if (mor == null) { return null; }

        ManagedEntity vm =
            MorUtil.createExactManagedEntity(si_.getServerConnection(), mor);
View Full Code Here

     */
    protected VirtualMachineSnapshot generateSnapshotWithMoref(String morefStr)
    {
        if (si_ == null || morefStr == null) { return null; }

        ManagedObjectReference mor =
            generateMoref("VirtualMachineSnapshot", morefStr);
        if (mor == null) { return null; }

        ManagedObject snap =
            MorUtil.createExactManagedObject(si_.getServerConnection(), mor);
View Full Code Here

    return getName();
  }
 
  @Override
  public ClusterDasConfigInfo getDasConfig() throws Exception {
    ManagedObjectReference morParent = getParentMor();
    if(morParent.getType().equals("ClusterComputeResource")) {
      ClusterMO clusterMo = new ClusterMO(_context, morParent);
      return clusterMo.getDasConfig();
    }
   
    return null;
View Full Code Here

    return new HostNetworkSystemMO(_context, configMgr.getNetworkSystem());
  }
 
  public HostFirewallSystemMO getHostFirewallSystemMO() throws Exception {
    HostConfigManager configMgr = getHostConfigManager();
    ManagedObjectReference morFirewall = configMgr.getFirewallSystem();
   
    // only ESX hosts have firewall manager
    if(morFirewall != null)
      return new HostFirewallSystemMO(_context, morFirewall);
    return null;
View Full Code Here

  }

  @Override
  public ManagedObjectReference getHyperHostOwnerResourcePool() throws Exception {
    ServiceUtil serviceUtil = _context.getServiceUtil();
    ManagedObjectReference morComputerResource = (ManagedObjectReference)serviceUtil.getDynamicProperty(_mor, "parent");
    return (ManagedObjectReference)serviceUtil.getDynamicProperty(morComputerResource, "resourcePool");
  }
View Full Code Here

  }

  @Override
  public ManagedObjectReference getHyperHostCluster() throws Exception {
    ServiceUtil serviceUtil = _context.getServiceUtil();
    ManagedObjectReference morParent = (ManagedObjectReference)serviceUtil.getDynamicProperty(_mor, "parent");
   
    if(morParent.getType().equalsIgnoreCase("ClusterComputeResource")) {
      return morParent;
    }
   
    assert(false);
    throw new Exception("Standalone host is not supported");
View Full Code Here

   
    return null;
  }
 
  public boolean hasPortGroup(HostVirtualSwitch vSwitch, String portGroupName) throws Exception {
    ManagedObjectReference morNetwork = getNetworkMor(portGroupName);
    if(morNetwork != null)
      return true;
    return false;
  }
View Full Code Here

TOP

Related Classes of com.vmware.vim25.ManagedObjectReference

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.