Package com.vmware.vim.binding.vmodl

Examples of com.vmware.vim.binding.vmodl.ManagedObject


      ManagedObjectReference rootFolderRef = service.getServiceInstanceContent().getRootFolder();
     
      Folder rootFolder = service.getManagedObject(rootFolderRef);
      ManagedObjectReference[] childEntities = rootFolder.getChildEntity();
      for (ManagedObjectReference child : childEntities) {
         ManagedObject mo = service.getManagedObject(child);
         if (mo instanceof Datacenter) {
            return (Datacenter) mo;
         }
      }
      return null;
View Full Code Here


      AuAssert.check(VcContext.isInSession());
      VcService svc = VcContext.getService();
      if (isOfType(parent, clazz)) {
         return parent;
      } else {
         ManagedObject obj = svc.getManagedObject(parent);
         if (obj instanceof Folder) {
            Folder folder = (Folder)obj;
            return getAncestorMoRef(folder.getParent(), clazz);
         }
      }
View Full Code Here

   static protected VcObjectImpl
   loadFromMoRef(ManagedObjectReference moRef)
   throws Exception {
      AuAssert.check(VcContext.isInSession());
      VcObjectImpl obj = null;
      ManagedObject mo = MoUtil.getManagedObject(moRef);
      if (mo instanceof Datacenter) {
         obj = new VcDatacenterImpl((Datacenter)mo);
      } else if (mo instanceof ClusterComputeResource) {
         obj = new VcClusterImpl((ClusterComputeResource)mo);
      } else if (mo instanceof Network) {
View Full Code Here

   loadSnapshotFromMoRef(ManagedObjectReference moRef,
                         VcVirtualMachineImpl parent, String name)
   throws Exception {
      AuAssert.check(VcContext.isInSession());
      VcSnapshotImpl obj = null;
      ManagedObject mo = MoUtil.getManagedObject(moRef);
      AuAssert.check(mo instanceof Snapshot);
      obj = new VcSnapshotImpl((Snapshot)mo, parent, name);
      Profiler.inc(StatsType.VC_LOAD_MO, obj);
      return obj;
   }
View Full Code Here

   }

   protected synchronized void updateInternal(EnumSet<UpdateType> updates)
   throws Exception {
      try {
         ManagedObject mo = getManagedObject();
         if (updates.contains(UpdateType.CONFIG)) {
            Profiler.inc(StatsType.VC_UPDATE_CONFIG, this);
            update(mo);
         }
         if (updates.contains(UpdateType.RUNTIME)) {
View Full Code Here

TOP

Related Classes of com.vmware.vim.binding.vmodl.ManagedObject

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.