Search in sources :

Example 1 with ComputeStateWithDescription

use of com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription in project photon-model by vmware.

the class MockCostStatsAdapterService method getAccountDescription.

@Override
protected void getAccountDescription(AWSCostStatsCreationContext statsData, AWSCostStatsCreationStages next) {
    ComputeDescription compDesc = new ComputeDescription();
    compDesc.id = "123";
    compDesc.documentSelfLink = UriUtils.buildUriPath(ComputeDescriptionService.FACTORY_LINK, generateUuidFromStr(compDesc.id));
    Set<URI> statsAdapterReferences = new HashSet<>();
    statsAdapterReferences.add(UriUtils.buildUri("stats-adapter-references"));
    compDesc.statsAdapterReferences = statsAdapterReferences;
    statsData.accountId = TestAWSCostAdapterService.account1Id;
    ComputeStateWithDescription account1ComputeState = new ComputeStateWithDescription();
    account1ComputeState.documentSelfLink = TestAWSCostAdapterService.account1SelfLink;
    account1ComputeState.type = ComputeType.ENDPOINT_HOST;
    account1ComputeState.endpointLink = "endpoint1";
    account1ComputeState.endpointLinks = new HashSet<String>();
    account1ComputeState.endpointLinks.add("endpoint1");
    account1ComputeState.name = "account1";
    account1ComputeState.descriptionLink = UriUtils.buildUriPath(ComputeDescriptionService.FACTORY_LINK, generateUuidFromStr("123"));
    account1ComputeState.creationTimeMicros = Utils.getNowMicrosUtc();
    account1ComputeState.customProperties = new HashMap<>();
    account1ComputeState.customProperties.put(AWSConstants.AWS_ACCOUNT_ID_KEY, "account1Id");
    account1ComputeState.customProperties.put(EndpointAllocationTaskService.CUSTOM_PROP_ENPOINT_TYPE, EndpointType.aws.name());
    account1ComputeState.description = new ComputeDescription();
    account1ComputeState.description.statsAdapterReferences = statsAdapterReferences;
    account1ComputeState.tenantLinks = Collections.singletonList("tenant-1");
    statsData.computeDesc = account1ComputeState;
    statsData.awsAccountIdToComputeStates.put(TestAWSCostAdapterService.account1Id, Collections.singletonList(account1ComputeState));
    inferEndpointLink(statsData);
    getParentAuth(statsData, next);
}
Also used : ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) ComputeDescription(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription) URI(java.net.URI) HashSet(java.util.HashSet)

Example 2 with ComputeStateWithDescription

use of com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription in project photon-model by vmware.

the class AWSCostStatsService method getAccountDescription.

protected void getAccountDescription(AWSCostStatsCreationContext statsData, AWSCostStatsCreationStages next) {
    Consumer<Operation> onSuccess = (op) -> {
        ComputeStateWithDescription compute = op.getBody(ComputeStateWithDescription.class);
        statsData.computeDesc = compute;
        inferEndpointLink(statsData);
        String accountId = AWSUtils.isAwsS3Proxy() ? "mock" : compute.customProperties.get(AWS_ACCOUNT_ID_KEY);
        if (compute.type != ComputeType.ENDPOINT_HOST || compute.parentLink != null || compute.endpointLink == null || accountId == null || CollectionUtils.isEmpty(compute.endpointLinks)) {
            logWithContext(statsData, Level.SEVERE, () -> "Malformed Root Compute.");
            postAccumulatedCostStats(statsData, true);
            return;
        }
        statsData.accountId = accountId;
        statsData.awsAccountIdToComputeStates.put(accountId, Collections.singletonList(compute));
        getEndpointState(statsData, next);
    };
    URI computeUri = UriUtils.extendUriWithQuery(statsData.statsRequest.resourceReference, UriUtils.URI_PARAM_ODATA_EXPAND, Boolean.TRUE.toString());
    AdapterUtils.getServiceState(this, computeUri, onSuccess, getFailureConsumer(statsData));
}
Also used : AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) Arrays(java.util.Arrays) DateTimeZone(org.joda.time.DateTimeZone) AWS_ACCOUNT_BILL_PROCESSED_TIME_MILLIS(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_ACCOUNT_BILL_PROCESSED_TIME_MILLIS) AWSCsvBillParser(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSCsvBillParser) ServiceTypeCluster(com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster) QueryTask(com.vmware.xenon.services.common.QueryTask) ServiceDocument(com.vmware.xenon.common.ServiceDocument) ComputeType(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription.ComputeType) EndpointAllocationTaskService(com.vmware.photon.controller.model.tasks.EndpointAllocationTaskService) SingleResourceStatsCollectionTaskState(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceStatsCollectionTaskState) ProgressListener(com.amazonaws.event.ProgressListener) STORAGE_TYPE_EBS(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.STORAGE_TYPE_EBS) Utils(com.vmware.xenon.common.Utils) STORAGE_TYPE_S3(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.STORAGE_TYPE_S3) ACCOUNT_IS_AUTO_DISCOVERED(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.ACCOUNT_IS_AUTO_DISCOVERED) Map(java.util.Map) URI(java.net.URI) ProgressEventType(com.amazonaws.event.ProgressEventType) AWSMissingResourcesEnumerationService(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSMissingResourcesEnumerationService) Path(java.nio.file.Path) AWSClientManager(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSClientManager) EndpointState(com.vmware.photon.controller.model.resources.EndpointService.EndpointState) PrintWriter(java.io.PrintWriter) ComputeStatsResponse(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse) ComputeStatsRequest(com.vmware.photon.controller.model.adapterapi.ComputeStatsRequest) StatelessService(com.vmware.xenon.common.StatelessService) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) TaskManager(com.vmware.photon.controller.model.adapters.util.TaskManager) Set(java.util.Set) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Occurance(com.vmware.xenon.services.common.QueryTask.Query.Occurance) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) AwsServiceDetailDto(com.vmware.photon.controller.model.adapters.aws.dto.AwsServiceDetailDto) Objects(java.util.Objects) List(java.util.List) AWS_LINKED_ACCOUNT_IDS(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_LINKED_ACCOUNT_IDS) Stream(java.util.stream.Stream) UriUtils(com.vmware.xenon.common.UriUtils) Entry(java.util.Map.Entry) QueryOption(com.vmware.xenon.services.common.QueryTask.QuerySpecification.QueryOption) AwsServices(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSCsvBillParser.AwsServices) ResourceMetrics(com.vmware.photon.controller.model.monitoring.ResourceMetricsService.ResourceMetrics) SingleResourceTaskCollectionStage(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService.SingleResourceTaskCollectionStage) AwsAccountDetailDto(com.vmware.photon.controller.model.adapters.aws.dto.AwsAccountDetailDto) TransferManager(com.amazonaws.services.s3.transfer.TransferManager) QueryByPages(com.vmware.photon.controller.model.query.QueryUtils.QueryByPages) OperationContext(com.vmware.xenon.common.OperationContext) AWS_ACCOUNT_ID_KEY(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_ACCOUNT_ID_KEY) HashMap(java.util.HashMap) ComputeDescriptionService(com.vmware.photon.controller.model.resources.ComputeDescriptionService) GetObjectRequest(com.amazonaws.services.s3.model.GetObjectRequest) ResourceMetricsService(com.vmware.photon.controller.model.monitoring.ResourceMetricsService) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) ProgressEvent(com.amazonaws.event.ProgressEvent) HashSet(java.util.HashSet) AuthCredentialsService(com.vmware.xenon.services.common.AuthCredentialsService) Query(com.vmware.xenon.services.common.QueryTask.Query) UriPaths(com.vmware.photon.controller.model.UriPaths) CollectionUtils(org.apache.commons.collections.CollectionUtils) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) BiConsumer(java.util.function.BiConsumer) ComputeStats(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse.ComputeStats) AwsClientType(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AwsClientType) StatsUtil(com.vmware.photon.controller.model.tasks.monitoring.StatsUtil) ExecutorService(java.util.concurrent.ExecutorService) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) AmazonS3Exception(com.amazonaws.services.s3.model.AmazonS3Exception) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) Files(java.nio.file.Files) StringWriter(java.io.StringWriter) Operation(com.vmware.xenon.common.Operation) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) IOException(java.io.IOException) ServiceStat(com.vmware.xenon.common.ServiceStats.ServiceStat) AwsResourceDetailDto(com.vmware.photon.controller.model.adapters.aws.dto.AwsResourceDetailDto) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) LocalDate(org.joda.time.LocalDate) ConcurrentSkipListMap(java.util.concurrent.ConcurrentSkipListMap) Paths(java.nio.file.Paths) ClusterUtil(com.vmware.photon.controller.model.util.ClusterUtil) AWSStatsNormalizer(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSStatsNormalizer) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) PhotonModelConstants(com.vmware.photon.controller.model.constants.PhotonModelConstants) AWSClientManagerFactory(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSClientManagerFactory) ServiceDocumentDescription(com.vmware.xenon.common.ServiceDocumentDescription) Collections(java.util.Collections) OperationJoin(com.vmware.xenon.common.OperationJoin) PhotonModelUriUtils.createInventoryUri(com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) Operation(com.vmware.xenon.common.Operation) URI(java.net.URI)

Example 3 with ComputeStateWithDescription

use of com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription in project photon-model by vmware.

the class ResourceEnumerationTaskService method sendEnumRequest.

private void sendEnumRequest(Operation start, ResourceEnumerationTaskState state) {
    ComputeEnumerateResourceRequest req = new ComputeEnumerateResourceRequest();
    req.resourcePoolLink = state.resourcePoolLink;
    req.adapterManagementReference = state.adapterManagementReference;
    req.resourceReference = createInventoryUri(this.getHost(), state.parentComputeLink);
    req.endpointLinkReference = createInventoryUri(this.getHost(), state.endpointLink);
    req.enumerationAction = state.enumerationAction;
    req.taskReference = UriUtils.buildUri(getHost(), state.documentSelfLink);
    req.isMockRequest = state.options.contains(TaskOption.IS_MOCK);
    req.preserveMissing = state.options.contains(TaskOption.PRESERVE_MISSING_RESOUCES);
    req.endpointLink = state.endpointLink;
    req.deletedResourceExpirationMicros = getResourceExpirationMicros(state.expirationPolicy == null ? ResourceExpirationPolicy.EXPIRE_AFTER_ONE_MONTH : state.expirationPolicy);
    // Patch the enumerate service URI from the CHD
    CompletionHandler descriptionCompletion = (o, ex) -> {
        if (ex != null) {
            TaskUtils.sendFailurePatch(this, state, ex);
            start.fail(ex);
            return;
        }
        ComputeStateWithDescription csd = o.getBody(ComputeStateWithDescription.class);
        if (csd.description.enumerationAdapterReference == null) {
            // no enumeration adapter associated with this resource, just patch completion
            sendSelfFinishedPatch(state);
            return;
        }
        sendRequest(Operation.createPatch(csd.description.enumerationAdapterReference).setBody(req));
    };
    URI computeUri = UriUtils.extendUriWithQuery(UriUtils.buildUri(this.getHost(), state.parentComputeLink), UriUtils.URI_PARAM_ODATA_EXPAND, Boolean.TRUE.toString());
    sendRequest(Operation.createGet(computeUri).setCompletion(descriptionCompletion));
}
Also used : Service(com.vmware.xenon.common.Service) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) HashMap(java.util.HashMap) ServiceUriPaths(com.vmware.xenon.services.common.ServiceUriPaths) HashSet(java.util.HashSet) Utils(com.vmware.xenon.common.Utils) UriPaths(com.vmware.photon.controller.model.UriPaths) TaskFactoryService(com.vmware.xenon.services.common.TaskFactoryService) Map(java.util.Map) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) URI(java.net.URI) LinkedList(java.util.LinkedList) EnumSet(java.util.EnumSet) EndpointState(com.vmware.photon.controller.model.resources.EndpointService.EndpointState) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) Collection(java.util.Collection) Operation(com.vmware.xenon.common.Operation) TaskStage(com.vmware.xenon.common.TaskState.TaskStage) TaskUtils.getResourceExpirationMicros(com.vmware.photon.controller.model.tasks.TaskUtils.getResourceExpirationMicros) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) CompletionHandler(com.vmware.xenon.common.Operation.CompletionHandler) DeferredResult(com.vmware.xenon.common.DeferredResult) UriUtils(com.vmware.xenon.common.UriUtils) ReleaseConstants(com.vmware.photon.controller.model.constants.ReleaseConstants) TaskState(com.vmware.xenon.common.TaskState) FactoryService(com.vmware.xenon.common.FactoryService) ServiceStateMapUpdateRequest(com.vmware.xenon.common.ServiceStateMapUpdateRequest) TaskService(com.vmware.xenon.services.common.TaskService) Collections(java.util.Collections) Since(com.esotericsoftware.kryo.serializers.VersionFieldSerializer.Since) PhotonModelUriUtils.createInventoryUri(com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) CompletionHandler(com.vmware.xenon.common.Operation.CompletionHandler) URI(java.net.URI)

Example 4 with ComputeStateWithDescription

use of com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription in project photon-model by vmware.

the class BaseAdapterContext method getParentDescription.

/**
 * Populate context with parent {@code ComputeStateWithDescription}.
 * <p>
 * <p>
 * By default {@code context.child.parentLink} is used as source.
 */
protected DeferredResult<T> getParentDescription(T context) {
    URI ref = context.child != null ? // 'child' is already resolved so used it
    UriUtils.buildUri(context.service.getHost(), context.child.parentLink) : // state machine starts from here so resRef should point to the parent
    context.resourceReference;
    ref = ComputeStateWithDescription.buildUri(ref);
    Operation op = Operation.createGet(ref);
    return context.service.sendWithDeferredResult(op, ComputeStateWithDescription.class).thenApply(state -> {
        context.parent = state;
        return context;
    });
}
Also used : ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) Operation(com.vmware.xenon.common.Operation) URI(java.net.URI)

Example 5 with ComputeStateWithDescription

use of com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription in project photon-model by vmware.

the class VSphereIncrementalEnumerationService method handlePatch.

@Override
public void handlePatch(Operation patch) {
    // complete the patch immediately.
    patch.complete();
    logInfo("Received PATCH for incremental enumeration!");
    VSphereIncrementalEnumerationRequest enumerationRequest = patch.getBody(VSphereIncrementalEnumerationRequest.class);
    ComputeEnumerateResourceRequest request = enumerationRequest.request;
    URI parentUri = ComputeService.ComputeStateWithDescription.buildUri(PhotonModelUriUtils.createInventoryUri(getHost(), request.resourceReference));
    logInfo("Creating task manager!");
    TaskManager mgr = new TaskManager(this, request.taskReference, request.resourceLink());
    logInfo(" Requesting GET on compute state with description!.");
    Operation.createGet(parentUri).setCompletion(o -> {
        logInfo("Submitting job to threadpool!");
        VsphereEnumerationHelper.submitWorkToVSpherePool(this, () -> {
            logInfo("Incremental enumeration job started for endpoint %s", enumerationRequest.request.endpointLink);
            ComputeStateWithDescription computeStateWithDesc = o.getBody(ComputeStateWithDescription.class);
            VapiConnection vapiConnection = VapiConnection.createFromVimConnection(this.connection);
            logInfo("Establishing VAPI connection for endpoint %s", enumerationRequest.request.endpointLink);
            try {
                vapiConnection.login();
            } catch (IOException | RpcException rpce) {
                logWarning(() -> String.format("Cannot login into vAPI endpoint: %s", Utils.toString(rpce)));
                mgr.patchTaskToFailure(rpce);
                // self delete service so that full enumeration kicks in next invocation.
                selfDeleteService();
                return;
            }
            try {
                // Get instanceUuid of the vCenter
                AboutInfo vCenter = this.connection.getServiceContent().getAbout();
                for (CollectorDetails collectorDetails : this.collectors) {
                    logInfo("Retrieving  resources incremental data for data center: %s", collectorDetails.datacenter);
                    EnumerationProgress enumerationProgress = new EnumerationProgress(new HashSet<>(), request, computeStateWithDesc, vapiConnection, collectorDetails.datacenter, vCenter.getInstanceUuid());
                    EnumerationClient client = new EnumerationClient(this.connection, computeStateWithDesc, VimUtils.convertStringToMoRef(collectorDetails.datacenter));
                    List<ObjectUpdate> resourcesUpdates = collectResourcesData(collectorDetails);
                    List<ObjectUpdate> vmUpdates = collectVMData(collectorDetails);
                    logInfo("Received resources updates for datacenter: %s : %s", collectorDetails.datacenter, resourcesUpdates.size());
                    logInfo("Received vm updates for datacenter: %s : %s", collectorDetails.datacenter, vmUpdates.size());
                    logInfo("Resources Updates: %s", Utils.toJson(resourcesUpdates));
                    logInfo("VM Updates: %s", Utils.toJson(vmUpdates));
                    if (!resourcesUpdates.isEmpty()) {
                        SegregatedOverlays segregatedOverlays = segregateObjectUpdates(enumerationProgress, resourcesUpdates);
                        this.logInfo("Processing incremental changes for folders for datacenter [%s]!", collectorDetails.datacenter);
                        VsphereFolderEnumerationHelper.handleFolderChanges(this, segregatedOverlays.folders, enumerationProgress, client);
                        logInfo("Processing incremental changes for networks for datacenter [%s]!", collectorDetails.datacenter);
                        VSphereNetworkEnumerationHelper.handleNetworkChanges(this, segregatedOverlays.networks, enumerationProgress, client);
                        logInfo("Processing incremental changes for Datastores for datacenter [%s]!", collectorDetails.datacenter);
                        VsphereDatastoreEnumerationHelper.handleDatastoreChanges(this, segregatedOverlays.datastores, enumerationProgress);
                        logInfo("Processing incremental changes for compute resource for datacenter [%s]!", collectorDetails.datacenter);
                        VsphereComputeResourceEnumerationHelper.handleComputeResourceChanges(this, segregatedOverlays.clusters, enumerationProgress, client);
                        logInfo("Processing incremental changes for host system for datacenter [%s]!", collectorDetails.datacenter);
                        VSphereHostSystemEnumerationHelper.handleHostSystemChanges(this, segregatedOverlays.hosts, enumerationProgress, client);
                        logInfo("Processing incremental changes for resource pool for datacenter [%s]!", collectorDetails.datacenter);
                        VSphereResourcePoolEnumerationHelper.handleResourcePoolChanges(this, segregatedOverlays.resourcePools, enumerationProgress, client);
                    }
                    if (!vmUpdates.isEmpty()) {
                        logInfo("Processing incremental changes for virtual machines for datacenter [%s]!", collectorDetails.datacenter);
                        VSphereVirtualMachineEnumerationHelper.handleVMChanges(this, vmUpdates, enumerationProgress, client);
                    }
                    // sync storage profiles
                    logInfo("Syncing storage profiles for datacenter [%s]!", collectorDetails.datacenter);
                    VsphereStoragePolicyEnumerationHelper.syncStorageProfiles(this, client, enumerationProgress);
                }
                mgr.patchTask(TaskStage.FINISHED);
            } catch (Exception exception) {
                String msg = "Error processing PropertyCollector results during incremental retrieval";
                logWarning(() -> msg + ": " + exception.toString());
                mgr.patchTaskToFailure(exception);
                // self delete service so that full enumeration kicks in next invocation.
                // TODO: This is not complete. We need to enable owner selection on this service.
                selfDeleteService();
                return;
            } finally {
                vapiConnection.close();
            }
        });
    }, mgr).sendWith(this);
}
Also used : Arrays(java.util.Arrays) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) TagCache(com.vmware.photon.controller.model.adapters.vsphere.tagging.TagCache) QueryTask(com.vmware.xenon.services.common.QueryTask) ServiceDocument(com.vmware.xenon.common.ServiceDocument) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) UpdateSet(com.vmware.vim25.UpdateSet) PropertyFilterSpec(com.vmware.vim25.PropertyFilterSpec) Utils(com.vmware.xenon.common.Utils) VsphereEnumerationHelper.convertOnlyResultToDocument(com.vmware.photon.controller.model.adapters.vsphere.VsphereEnumerationHelper.convertOnlyResultToDocument) Map(java.util.Map) Connection(com.vmware.photon.controller.model.adapters.vsphere.util.connection.Connection) URI(java.net.URI) VapiConnection(com.vmware.photon.controller.model.adapters.vsphere.vapi.VapiConnection) SubnetService(com.vmware.photon.controller.model.resources.SubnetService) StatelessService(com.vmware.xenon.common.StatelessService) TaskManager(com.vmware.photon.controller.model.adapters.util.TaskManager) DatacenterLister(com.vmware.photon.controller.model.adapters.vsphere.util.finders.DatacenterLister) Set(java.util.Set) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Occurance(com.vmware.xenon.services.common.QueryTask.Query.Occurance) Collectors(java.util.stream.Collectors) List(java.util.List) StorageDescriptionService(com.vmware.photon.controller.model.resources.StorageDescriptionService) DeferredResult(com.vmware.xenon.common.DeferredResult) ComputeService(com.vmware.photon.controller.model.resources.ComputeService) VsphereEnumerationHelper.withTaskResults(com.vmware.photon.controller.model.adapters.vsphere.VsphereEnumerationHelper.withTaskResults) AboutInfo(com.vmware.vim25.AboutInfo) DiskService(com.vmware.photon.controller.model.resources.DiskService) MoRefKeyedMap(com.vmware.photon.controller.model.adapters.vsphere.util.MoRefKeyedMap) ComputeProperties(com.vmware.photon.controller.model.ComputeProperties) ResourceCleanRequest(com.vmware.photon.controller.model.adapters.vsphere.VsphereResourceCleanerService.ResourceCleanRequest) PhotonModelUriUtils(com.vmware.photon.controller.model.util.PhotonModelUriUtils) ObjectUpdateKind(com.vmware.vim25.ObjectUpdateKind) HashMap(java.util.HashMap) RuntimeFaultFaultMsg(com.vmware.vim25.RuntimeFaultFaultMsg) RpcException(com.vmware.photon.controller.model.adapters.vsphere.vapi.RpcException) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) HashSet(java.util.HashSet) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) TYPE_SERVER_DISK(com.vmware.photon.controller.model.adapters.vsphere.util.VimNames.TYPE_SERVER_DISK) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) Element(com.vmware.photon.controller.model.adapters.vsphere.util.finders.Element) Operation(com.vmware.xenon.common.Operation) ObjectUpdateIterator(com.vmware.photon.controller.model.adapters.vsphere.EnumerationClient.ObjectUpdateIterator) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) IOException(java.io.IOException) PropertyFilterUpdate(com.vmware.vim25.PropertyFilterUpdate) VimNames(com.vmware.photon.controller.model.adapters.vsphere.util.VimNames) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference) TaskStage(com.vmware.xenon.common.TaskState.TaskStage) NetworkService(com.vmware.photon.controller.model.resources.NetworkService) ConcurrentSkipListSet(java.util.concurrent.ConcurrentSkipListSet) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) ObjectUpdate(com.vmware.vim25.ObjectUpdate) OperationJoin(com.vmware.xenon.common.OperationJoin) VapiConnection(com.vmware.photon.controller.model.adapters.vsphere.vapi.VapiConnection) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) AboutInfo(com.vmware.vim25.AboutInfo) URI(java.net.URI) RpcException(com.vmware.photon.controller.model.adapters.vsphere.vapi.RpcException) IOException(java.io.IOException) TaskManager(com.vmware.photon.controller.model.adapters.util.TaskManager) List(java.util.List) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet)

Aggregations

ComputeStateWithDescription (com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription)15 URI (java.net.URI)13 Operation (com.vmware.xenon.common.Operation)10 Utils (com.vmware.xenon.common.Utils)8 List (java.util.List)8 QueryUtils (com.vmware.photon.controller.model.query.QueryUtils)7 UriUtils (com.vmware.xenon.common.UriUtils)7 QueryTask (com.vmware.xenon.services.common.QueryTask)7 PhotonModelUriUtils.createInventoryUri (com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri)6 OperationJoin (com.vmware.xenon.common.OperationJoin)6 ArrayList (java.util.ArrayList)6 UriPaths (com.vmware.photon.controller.model.UriPaths)5 TaskManager (com.vmware.photon.controller.model.adapters.util.TaskManager)5 ComputeDescription (com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription)5 Service (com.vmware.xenon.common.Service)5 ServiceDocument (com.vmware.xenon.common.ServiceDocument)5 QueryOption (com.vmware.xenon.services.common.QueryTask.QuerySpecification.QueryOption)5 HashMap (java.util.HashMap)5 ComputeEnumerateResourceRequest (com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest)4 ManagedObjectReference (com.vmware.vim25.ManagedObjectReference)4