Search in sources :

Example 11 with Folder

use of com.vmware.vim25.mo.Folder in project photon-model by vmware.

the class VSphereIncrementalEnumerationService method refreshResourcesOnDatacenter.

private void refreshResourcesOnDatacenter(EnumerationClient client, EnumerationProgress ctx, TaskManager mgr) {
    Set<String> sharedDatastores = new HashSet<>();
    List<StoragePolicyOverlay> storagePolicies = new ArrayList<>();
    // put results in different buckets by type
    PropertyFilterSpec spec = client.createResourcesFilterSpec();
    CollectorDetails collectorDetails = new CollectorDetails();
    EnumerationClient.ObjectUpdateIterator resourcesIterator;
    SegregatedOverlays segregatedOverlays;
    logInfo("Processing resources on datacenter: %s", ctx.getDcLink());
    try {
        ManagedObjectReference resourcesPropertyCollector = client.createPropertyCollectorWithFilter(spec);
        // remove getObjectIterator API
        resourcesIterator = new ObjectUpdateIterator(resourcesPropertyCollector, this.connection.getVimPort(), "");
        List<ObjectUpdate> updates = new ArrayList<>();
        while (resourcesIterator.hasNext()) {
            UpdateSet page = resourcesIterator.next();
            if (null != page) {
                for (PropertyFilterUpdate propertyFilterUpdate : page.getFilterSet()) {
                    updates.addAll(propertyFilterUpdate.getObjectSet());
                }
            }
        }
        segregatedOverlays = segregateObjectUpdates(ctx, updates);
    } catch (Exception e) {
        String msg = "Error processing PropertyCollector results";
        logWarning(() -> msg + ": " + e.toString());
        mgr.patchTaskToFailure(msg, e);
        return;
    }
    // This will split the folders into two lists. Default folders (vm, host, network, datastore) have parent as datacenter
    // and are not visible in vCenter. These need not be persisted. Any other folders will have another folder as a parent
    // and will be persisted with  appropriate parent.
    // partitioningBy will always return a map with two entries, one for where the predicate is true and one for
    // where it is false. Even though the entries can be empty, they will be present in the map , i.e. map size will be
    // always be two
    Map<Boolean, List<FolderOverlay>> folderMap = new HashMap<>(segregatedOverlays.folders.stream().collect(Collectors.partitioningBy(s -> s.getParent().getType().equals(VimNames.TYPE_DATACENTER))));
    // Process true Folder and root folder list
    List<FolderOverlay> trueFolders = folderMap.get(Boolean.FALSE);
    List<FolderOverlay> rootFolders = folderMap.get(Boolean.TRUE);
    ctx.expectFolderCount(trueFolders.size());
    logInfo("Processing folders on datacenter: %s", ctx.getDcLink());
    for (FolderOverlay folder : trueFolders) {
        try {
            // The parent list will be passed along. This is to achieve the below
            // Folder A is root folder and has datacenter as the parent.
            // Folder Ac has parent as A. Since 'A' is not persisted anymore, 'Ac'
            // should have the datacenter as its parent.
            VsphereFolderEnumerationHelper.processFoundFolder(this, ctx, folder, rootFolders, client);
        } catch (Exception e) {
            logWarning(() -> "Error processing folder information : " + e.toString());
        }
    }
    // Process HostSystem list to get the datastore access level whether local / shared
    try {
        for (HostSystemOverlay hs : segregatedOverlays.hosts) {
            sharedDatastores.addAll(client.getDatastoresHostMountInfo(hs));
        }
    } catch (Exception e) {
        // We can continue as we will not know whether the datastore is local or shared which
        // is ok to proceed.
        logWarning(() -> "Error processing datastore host mount information : " + e.toString());
    }
    storagePolicies = VsphereStoragePolicyEnumerationHelper.createStorageProfileOverlays(this, client);
    // process results in topological order
    ctx.expectNetworkCount(segregatedOverlays.networks.size());
    logInfo("Processing network on datacenter: %s", ctx.getDcLink());
    for (NetworkOverlay net : segregatedOverlays.networks.values()) {
        VSphereNetworkEnumerationHelper.processFoundNetwork(this, ctx, net, segregatedOverlays.networks);
    }
    ctx.expectDatastoreCount(segregatedOverlays.datastores.size());
    logInfo("Processing datastore on datacenter: %s", ctx.getDcLink());
    for (DatastoreOverlay ds : segregatedOverlays.datastores) {
        ds.setMultipleHostAccess(sharedDatastores.contains(ds.getName()));
        VsphereDatastoreEnumerationHelper.processFoundDatastore(this, ctx, ds);
    }
    // checkpoint net & storage, they are not related currently
    try {
        ctx.getDatastoreTracker().await();
        ctx.getNetworkTracker().await();
        ctx.getFolderTracker().await();
    } catch (InterruptedException e) {
        threadInterrupted(mgr, e);
        return;
    }
    // datastore processing is complete.
    if (storagePolicies.size() > 0) {
        ctx.expectStoragePolicyCount(storagePolicies.size());
        for (StoragePolicyOverlay sp : storagePolicies) {
            VsphereStoragePolicyEnumerationHelper.processFoundStoragePolicy(this, ctx, sp);
        }
        // checkpoint for storage policy
        try {
            ctx.getStoragePolicyTracker().await();
        } catch (InterruptedException e) {
            threadInterrupted(mgr, e);
            return;
        }
    }
    ctx.expectComputeResourceCount(segregatedOverlays.clusters.size());
    for (ComputeResourceOverlay cluster : segregatedOverlays.clusters) {
        ctx.track(cluster);
        cluster.markHostAsClustered(segregatedOverlays.hosts);
        VsphereComputeResourceEnumerationHelper.processFoundComputeResource(this, ctx, cluster, client);
    }
    // checkpoint compute
    try {
        ctx.getComputeResourceTracker().await();
    } catch (InterruptedException e) {
        threadInterrupted(mgr, e);
        return;
    }
    // process clustered as well as non-clustered hosts
    ctx.expectHostSystemCount(segregatedOverlays.hosts.size());
    logInfo("Processing hosts on datacenter: %s", ctx.getDcLink());
    for (HostSystemOverlay hs : segregatedOverlays.hosts) {
        ctx.track(hs);
        VSphereHostSystemEnumerationHelper.processFoundHostSystem(this, ctx, hs, client);
    }
    // exclude all root resource pools
    // no need to collect the root resource pool
    segregatedOverlays.resourcePools.removeIf(rp -> !VimNames.TYPE_RESOURCE_POOL.equals(rp.getParent().getType()));
    MoRefKeyedMap<String> computeResourceNamesByMoref = collectComputeNames(segregatedOverlays.hosts, segregatedOverlays.clusters);
    ctx.expectResourcePoolCount(segregatedOverlays.resourcePools.size());
    logInfo("Processing resource pools on datacenter: %s", ctx.getDcLink());
    for (ResourcePoolOverlay rp : segregatedOverlays.resourcePools) {
        String ownerName = computeResourceNamesByMoref.get(rp.getOwner());
        VSphereResourcePoolEnumerationHelper.processFoundResourcePool(this, ctx, rp, ownerName, client);
    }
    // checkpoint compute
    try {
        ctx.getHostSystemTracker().await();
        ctx.getResourcePoolTracker().await();
    } catch (InterruptedException e) {
        threadInterrupted(mgr, e);
        return;
    }
    logInfo("Updating server disks on datacenter: %s", ctx.getDcLink());
    // update server disks with selfLinks of HostSystem
    for (HostSystemOverlay hostSystemOverlay : segregatedOverlays.hosts) {
        updateServerDisks(ctx, hostSystemOverlay);
    }
    logInfo("Processing VMs on datacenter: %s", ctx.getDcLink());
    spec = client.createVmFilterSpec(client.getDatacenter());
    List<VmOverlay> vmOverlayList = new ArrayList<>();
    EnumerationClient.ObjectUpdateIterator vmIterator;
    try {
        ManagedObjectReference vmPropertyCollector = client.createPropertyCollectorWithFilter(spec);
        vmIterator = new ObjectUpdateIterator(vmPropertyCollector, this.connection.getVimPort(), "");
        while (vmIterator.hasNext()) {
            UpdateSet page = vmIterator.next();
            if (null != page) {
                for (PropertyFilterUpdate propertyFilterUpdate : page.getFilterSet()) {
                    ctx.resetVmTracker();
                    for (ObjectUpdate cont : propertyFilterUpdate.getObjectSet()) {
                        if (!VimUtils.isVirtualMachine(cont.getObj())) {
                            continue;
                        }
                        VmOverlay vm = new VmOverlay(cont);
                        if (vm.isTemplate()) {
                            // templates are skipped, enumerated as "images" instead
                            continue;
                        }
                        if (vm.getInstanceUuid() == null) {
                            logWarning(() -> String.format("Cannot process a VM without" + " instanceUuid: %s", VimUtils.convertMoRefToString(vm.getId())));
                        } else {
                            ctx.getVmTracker().register();
                            vmOverlayList.add(vm);
                            VSphereVirtualMachineEnumerationHelper.processFoundVm(this, ctx, vm);
                        }
                    }
                    ctx.getVmTracker().arriveAndAwaitAdvance();
                    VSphereVMSnapshotEnumerationHelper.enumerateSnapshots(this, ctx, vmOverlayList);
                }
            }
        }
    } catch (Exception e) {
        String msg = "Error processing PropertyCollector results";
        logWarning(() -> msg + ": " + e.toString());
        mgr.patchTaskToFailure(msg, e);
        return;
    }
    // Sync disks deleted in vSphere
    deleteIndependentDisksUnavailableInVSphere(ctx, client);
    try {
        ctx.getDeleteDiskTracker().await();
    } catch (InterruptedException e) {
        threadInterrupted(mgr, e);
        return;
    }
    // if enumeration action is start and this is the initial enumeration, then store the property collectors and versions.
    if (EnumerationAction.START == ctx.getRequest().enumerationAction) {
        collectorDetails.vmCollectorVersion = vmIterator.getVersion();
        collectorDetails.vmPropertyCollector = vmIterator.getPropertyCollector();
        collectorDetails.resourcesCollectorVersion = resourcesIterator.getVersion();
        collectorDetails.resourcesPropertyCollector = resourcesIterator.getPropertyCollector();
        collectorDetails.datacenter = ctx.getRegionId();
        this.collectors.add(collectorDetails);
    }
}
Also used : PropertyFilterSpec(com.vmware.vim25.PropertyFilterSpec) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ObjectUpdateIterator(com.vmware.photon.controller.model.adapters.vsphere.EnumerationClient.ObjectUpdateIterator) ObjectUpdateIterator(com.vmware.photon.controller.model.adapters.vsphere.EnumerationClient.ObjectUpdateIterator) List(java.util.List) ArrayList(java.util.ArrayList) ObjectUpdate(com.vmware.vim25.ObjectUpdate) HashSet(java.util.HashSet) PropertyFilterUpdate(com.vmware.vim25.PropertyFilterUpdate) RpcException(com.vmware.photon.controller.model.adapters.vsphere.vapi.RpcException) IOException(java.io.IOException) UpdateSet(com.vmware.vim25.UpdateSet) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference)

Example 12 with Folder

use of com.vmware.vim25.mo.Folder in project photon-model by vmware.

the class VSphereIncrementalEnumerationService method segregateObjectUpdates.

private SegregatedOverlays segregateObjectUpdates(EnumerationProgress ctx, List<ObjectUpdate> updates) {
    SegregatedOverlays segregatedOverlays = new SegregatedOverlays();
    for (ObjectUpdate cont : updates) {
        if (VimUtils.isNetwork(cont.getObj())) {
            NetworkOverlay net = new NetworkOverlay(cont);
            ctx.track(net);
            String nameOrNull = net.getNameOrNull();
            /*add overlay if name is null or name doesn't contain dvuplinks
                When a DV port group is removed, we do not get name but we have to process it
                i.e. remove the subnet document from photon-model
                for that we need to add it to segregatedOverlays.*/
            if ((null == nameOrNull) || (!nameOrNull.toLowerCase().contains("dvuplinks"))) {
                // TODO starting with 6.5 query the property config.uplink instead
                segregatedOverlays.networks.put(net.getId(), net);
            }
        } else if (VimUtils.isHost(cont.getObj())) {
            // this includes all standalone and clustered hosts
            HostSystemOverlay hs = new HostSystemOverlay(cont);
            segregatedOverlays.hosts.add(hs);
        } else if (VimUtils.isComputeResource(cont.getObj())) {
            ComputeResourceOverlay cr = new ComputeResourceOverlay(cont);
            if ((ObjectUpdateKind.ENTER.equals(cr.getObjectUpdateKind()) && cr.isDrsEnabled()) || (!ObjectUpdateKind.ENTER.equals(cr.getObjectUpdateKind()))) {
                // when DRS is enabled add the cluster itself and skip the hosts
                // if a cluster is modified or deleted, add it to overlays
                segregatedOverlays.clusters.add(cr);
            } else {
                // ignore non-clusters and non-drs cluster: they are handled as hosts
                continue;
            }
        } else if (VimUtils.isDatastore(cont.getObj())) {
            DatastoreOverlay ds = new DatastoreOverlay(cont);
            segregatedOverlays.datastores.add(ds);
        } else if (VimUtils.isResourcePool(cont.getObj())) {
            ResourcePoolOverlay rp = new ResourcePoolOverlay(cont);
            segregatedOverlays.resourcePools.add(rp);
        } else if (VimUtils.isFolder(cont.getObj())) {
            FolderOverlay folder = new FolderOverlay(cont);
            segregatedOverlays.folders.add(folder);
        }
    }
    return segregatedOverlays;
}
Also used : ObjectUpdate(com.vmware.vim25.ObjectUpdate)

Example 13 with Folder

use of com.vmware.vim25.mo.Folder in project photon-model by vmware.

the class EnumerationClient method buildFullTraversal.

/**
 * @return An array of SelectionSpec covering VM, Host, Resource pool,
 * Cluster Compute Resource and Datastore.
 */
public List<SelectionSpec> buildFullTraversal() {
    // Terminal traversal specs
    // RP -> VM
    TraversalSpec rpToVm = new TraversalSpec();
    rpToVm.setType(VimNames.TYPE_RESOURCE_POOL);
    rpToVm.setName("rpToVm");
    rpToVm.setPath("vm");
    rpToVm.setSkip(Boolean.FALSE);
    // vApp -> VM
    TraversalSpec vAppToVM = new TraversalSpec();
    vAppToVM.setType(VimNames.TYPE_VAPP);
    vAppToVM.setName("vAppToVM");
    vAppToVM.setPath("vm");
    // HostSystem -> VM
    TraversalSpec hToVm = new TraversalSpec();
    hToVm.setType(VimNames.TYPE_HOST);
    hToVm.setPath("vm");
    hToVm.setName("hToVm");
    hToVm.getSelectSet().add(getSelectionSpec("VisitFolders"));
    hToVm.setSkip(Boolean.FALSE);
    // DC -> DS
    TraversalSpec dcToDs = new TraversalSpec();
    dcToDs.setType(VimNames.TYPE_DATACENTER);
    dcToDs.setPath("datastore");
    dcToDs.setName("dcToDs");
    dcToDs.setSkip(Boolean.FALSE);
    // Recurse through all ResourcePools
    TraversalSpec rpToRp = new TraversalSpec();
    rpToRp.setType(VimNames.TYPE_RESOURCE_POOL);
    rpToRp.setPath("resourcePool");
    rpToRp.setSkip(Boolean.FALSE);
    rpToRp.setName("rpToRp");
    rpToRp.getSelectSet().add(getSelectionSpec("rpToRp"));
    TraversalSpec crToRp = new TraversalSpec();
    crToRp.setType(VimNames.TYPE_COMPUTE_RESOURCE);
    crToRp.setPath("resourcePool");
    crToRp.setSkip(Boolean.FALSE);
    crToRp.setName("crToRp");
    crToRp.getSelectSet().add(getSelectionSpec("rpToRp"));
    TraversalSpec crToH = new TraversalSpec();
    crToH.setType(VimNames.TYPE_COMPUTE_RESOURCE);
    crToH.setSkip(Boolean.FALSE);
    crToH.setPath("host");
    crToH.setName("crToH");
    TraversalSpec dcToHf = new TraversalSpec();
    dcToHf.setType(VimNames.TYPE_DATACENTER);
    dcToHf.setSkip(Boolean.FALSE);
    dcToHf.setPath("hostFolder");
    dcToHf.setName("dcToHf");
    dcToHf.getSelectSet().add(getSelectionSpec("VisitFolders"));
    TraversalSpec vAppToRp = new TraversalSpec();
    vAppToRp.setType(VimNames.TYPE_VAPP);
    vAppToRp.setName("vAppToRp");
    vAppToRp.setPath("resourcePool");
    vAppToRp.getSelectSet().add(getSelectionSpec("rpToRp"));
    TraversalSpec dcToVmf = new TraversalSpec();
    dcToVmf.setType(VimNames.TYPE_DATACENTER);
    dcToVmf.setSkip(Boolean.FALSE);
    dcToVmf.setPath("vmFolder");
    dcToVmf.setName("dcToVmf");
    dcToVmf.getSelectSet().add(getSelectionSpec("VisitFolders"));
    TraversalSpec dcToNetf = new TraversalSpec();
    dcToNetf.setType(VimNames.TYPE_DATACENTER);
    dcToNetf.setSkip(Boolean.FALSE);
    dcToNetf.setPath("networkFolder");
    dcToNetf.setName("dcToNetf");
    dcToNetf.getSelectSet().add(getSelectionSpec("VisitFolders"));
    TraversalSpec dcToNet = new TraversalSpec();
    dcToNet.setType(VimNames.TYPE_DATACENTER);
    dcToNet.setSkip(Boolean.FALSE);
    dcToNet.setPath("network");
    dcToNet.setName("dcToNet");
    // For Folder -> Folder recursion
    TraversalSpec visitFolders = new TraversalSpec();
    visitFolders.setType(VimNames.TYPE_FOLDER);
    visitFolders.setPath("childEntity");
    visitFolders.setSkip(Boolean.FALSE);
    visitFolders.setName("VisitFolders");
    List<SelectionSpec> sspecarrvf = new ArrayList<>();
    sspecarrvf.add(getSelectionSpec("crToRp"));
    sspecarrvf.add(getSelectionSpec("crToH"));
    sspecarrvf.add(getSelectionSpec("dcToVmf"));
    sspecarrvf.add(getSelectionSpec("dcToHf"));
    sspecarrvf.add(getSelectionSpec("vAppToRp"));
    sspecarrvf.add(getSelectionSpec("vAppToVM"));
    sspecarrvf.add(getSelectionSpec("dcToDs"));
    sspecarrvf.add(getSelectionSpec("hToVm"));
    sspecarrvf.add(getSelectionSpec("rpToVm"));
    sspecarrvf.add(getSelectionSpec("dcToNet"));
    sspecarrvf.add(getSelectionSpec("dcToNetf"));
    sspecarrvf.add(getSelectionSpec("VisitFolders"));
    visitFolders.getSelectSet().addAll(sspecarrvf);
    List<SelectionSpec> resultspec = new ArrayList<>();
    resultspec.add(visitFolders);
    resultspec.add(crToRp);
    resultspec.add(crToH);
    resultspec.add(dcToVmf);
    resultspec.add(dcToHf);
    resultspec.add(vAppToRp);
    resultspec.add(vAppToVM);
    resultspec.add(dcToDs);
    resultspec.add(hToVm);
    resultspec.add(rpToVm);
    resultspec.add(rpToRp);
    resultspec.add(dcToNet);
    resultspec.add(dcToNetf);
    return resultspec;
}
Also used : TraversalSpec(com.vmware.vim25.TraversalSpec) SelectionSpec(com.vmware.vim25.SelectionSpec) ArrayList(java.util.ArrayList)

Example 14 with Folder

use of com.vmware.vim25.mo.Folder in project photon-model by vmware.

the class EnumerationClient method queryDisksAvailabilityinVSphere.

/**
 * Utility method that crosschecks the availability of independent disks in vSphere.
 */
public List<String> queryDisksAvailabilityinVSphere(Map<String, Object> diskInfoInLocalIndex) {
    final List<String> unAvailableDisks = new ArrayList<>();
    diskInfoInLocalIndex.entrySet().stream().forEach(entry -> {
        DiskService.DiskState diskState = Utils.fromJson(entry.getValue(), DiskService.DiskState.class);
        String diskDirectoryPath = diskState.customProperties.get(CustomProperties.DISK_PARENT_DIRECTORY);
        String datastoreName = diskState.customProperties.get(CustomProperties.DISK_DATASTORE_NAME);
        HostDatastoreBrowserSearchSpec searchSpec = createHostDatastoreBrowserSearchSpecForDisk(diskState.id);
        try {
            this.getMoRef.entityProps(this.finder.datastore(datastoreName).object, "browser").entrySet().stream().forEach(item -> {
                try {
                    ManagedObjectReference hostBrowser = (ManagedObjectReference) item.getValue();
                    ManagedObjectReference task = connection.getVimPort().searchDatastoreSubFoldersTask(hostBrowser, diskDirectoryPath, searchSpec);
                    TaskInfo info = VimUtils.waitTaskEnd(connection, task);
                    ArrayOfHostDatastoreBrowserSearchResults searchResult = (ArrayOfHostDatastoreBrowserSearchResults) info.getResult();
                    if (searchResult == null) {
                        // Folder is deleted.
                        unAvailableDisks.add(entry.getKey());
                    } else {
                        searchResult.getHostDatastoreBrowserSearchResults().stream().forEach(result -> {
                            // Folder is present but the vmdk file is deleted.
                            if (CollectionUtils.isEmpty(result.getFile())) {
                                unAvailableDisks.add(entry.getKey());
                            }
                        });
                    }
                } catch (InvalidPropertyFaultMsg | RuntimeFaultFaultMsg | InvalidCollectorVersionFaultMsg | FileFaultFaultMsg | InvalidDatastoreFaultMsg ex) {
                    logger.info("Unable to get the availability status for " + entry.getKey());
                }
            });
        } catch (InvalidPropertyFaultMsg | RuntimeFaultFaultMsg | FinderException ex) {
            logger.info("Unable to find the datastore : " + datastoreName);
        }
    });
    return unAvailableDisks;
}
Also used : InvalidCollectorVersionFaultMsg(com.vmware.vim25.InvalidCollectorVersionFaultMsg) ArrayList(java.util.ArrayList) HostDatastoreBrowserSearchSpec(com.vmware.vim25.HostDatastoreBrowserSearchSpec) RuntimeFaultFaultMsg(com.vmware.vim25.RuntimeFaultFaultMsg) DiskService(com.vmware.photon.controller.model.resources.DiskService) TaskInfo(com.vmware.vim25.TaskInfo) InvalidDatastoreFaultMsg(com.vmware.vim25.InvalidDatastoreFaultMsg) FinderException(com.vmware.photon.controller.model.adapters.vsphere.util.finders.FinderException) InvalidPropertyFaultMsg(com.vmware.vim25.InvalidPropertyFaultMsg) FileFaultFaultMsg(com.vmware.vim25.FileFaultFaultMsg) ArrayOfHostDatastoreBrowserSearchResults(com.vmware.vim25.ArrayOfHostDatastoreBrowserSearchResults) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference)

Example 15 with Folder

use of com.vmware.vim25.mo.Folder in project photon-model by vmware.

the class VsphereFolderEnumerationHelper method createFolder.

private static void createFolder(VSphereIncrementalEnumerationService service, EnumerationProgress ctx, FolderOverlay folder, List<FolderOverlay> rootFolders, EnumerationClient client) throws InvalidPropertyFaultMsg, RuntimeFaultFaultMsg {
    ResourceGroupState state = makeFolderFromResults(ctx, folder, rootFolders, client);
    Operation.createPost(PhotonModelUriUtils.createInventoryUri(service.getHost(), ResourceGroupService.FACTORY_LINK)).setBody(state).setCompletion((o, e) -> {
        trackFolder(ctx, folder).handle(o, e);
        service.logInfo("Creating document for folder with name %s", folder.getName());
    }).sendWith(service);
}
Also used : AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) ComputeProperties(com.vmware.photon.controller.model.ComputeProperties) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) PhotonModelUriUtils(com.vmware.photon.controller.model.util.PhotonModelUriUtils) Operation(com.vmware.xenon.common.Operation) QueryTask(com.vmware.xenon.services.common.QueryTask) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) ObjectUpdateKind(com.vmware.vim25.ObjectUpdateKind) RuntimeFaultFaultMsg(com.vmware.vim25.RuntimeFaultFaultMsg) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) VimNames(com.vmware.photon.controller.model.adapters.vsphere.util.VimNames) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference) VsphereEnumerationHelper.getSelfLinkFromOperation(com.vmware.photon.controller.model.adapters.vsphere.VsphereEnumerationHelper.getSelfLinkFromOperation) ResourceGroupService(com.vmware.photon.controller.model.resources.ResourceGroupService) List(java.util.List) InvalidPropertyFaultMsg(com.vmware.vim25.InvalidPropertyFaultMsg) VsphereEnumerationHelper.convertOnlyResultToDocument(com.vmware.photon.controller.model.adapters.vsphere.VsphereEnumerationHelper.convertOnlyResultToDocument) CompletionHandler(com.vmware.xenon.common.Operation.CompletionHandler) VsphereEnumerationHelper.withTaskResults(com.vmware.photon.controller.model.adapters.vsphere.VsphereEnumerationHelper.withTaskResults) ServiceDocumentQueryResult(com.vmware.xenon.common.ServiceDocumentQueryResult) Builder(com.vmware.xenon.services.common.QueryTask.Query.Builder) Collections(java.util.Collections) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState)

Aggregations

ManagedObjectReference (com.vmware.vim25.ManagedObjectReference)30 TraversalSpec (com.vmware.vim25.TraversalSpec)15 ArrayList (java.util.ArrayList)15 PropertyFilterSpec (com.vmware.vim25.PropertyFilterSpec)13 SelectionSpec (com.vmware.vim25.SelectionSpec)12 ObjectSpec (com.vmware.vim25.ObjectSpec)11 PropertySpec (com.vmware.vim25.PropertySpec)11 TaskInfo (com.vmware.vim25.TaskInfo)10 RemoteException (java.rmi.RemoteException)9 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)8 ArrayOfManagedObjectReference (com.vmware.vim25.ArrayOfManagedObjectReference)8 InvalidPropertyFaultMsg (com.vmware.vim25.InvalidPropertyFaultMsg)8 RuntimeFaultFaultMsg (com.vmware.vim25.RuntimeFaultFaultMsg)8 VirtualDisk (com.vmware.vim25.VirtualDisk)7 Operation (com.vmware.xenon.common.Operation)7 VimNames (com.vmware.photon.controller.model.adapters.vsphere.util.VimNames)6 PhotonModelUriUtils (com.vmware.photon.controller.model.util.PhotonModelUriUtils)6 VirtualMachineConfigSpec (com.vmware.vim25.VirtualMachineConfigSpec)6 VirtualMachineDefinedProfileSpec (com.vmware.vim25.VirtualMachineDefinedProfileSpec)6 VirtualMachineRelocateSpec (com.vmware.vim25.VirtualMachineRelocateSpec)6