Search in sources :

Example 16 with StorageDescription

use of com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription in project photon-model by vmware.

the class AzureTestUtil method createDefaultStorageAccountDescription.

public static StorageDescription createDefaultStorageAccountDescription(VerificationHost host, String storageAccountName, ComputeState computeHost, EndpointState endpointState) throws Throwable {
    AuthCredentialsServiceState auth = new AuthCredentialsServiceState();
    auth.customProperties = new HashMap<>();
    auth.customProperties.put(AZURE_STORAGE_ACCOUNT_KEY1, randomString(15));
    auth.customProperties.put(AZURE_STORAGE_ACCOUNT_KEY2, randomString(15));
    auth = TestUtils.doPost(host, auth, AuthCredentialsServiceState.class, UriUtils.buildUri(host, AuthCredentialsService.FACTORY_LINK));
    String authLink = UriUtils.buildUriPath(AuthCredentialsService.FACTORY_LINK, auth.documentSelfLink);
    // Create a storage description
    StorageDescription storageDesc = new StorageDescription();
    storageDesc.id = "testStorAcct-" + randomString(4);
    storageDesc.name = storageAccountName;
    storageDesc.regionId = AZURE_RESOURCE_GROUP_LOCATION;
    storageDesc.computeHostLink = computeHost.documentSelfLink;
    storageDesc.authCredentialsLink = authLink;
    storageDesc.resourcePoolLink = computeHost.resourcePoolLink;
    storageDesc.tenantLinks = endpointState.tenantLinks;
    storageDesc.endpointLink = endpointState.documentSelfLink;
    storageDesc.endpointLinks = new HashSet<>();
    storageDesc.endpointLinks.add(endpointState.documentSelfLink);
    storageDesc.customProperties = new HashMap<>();
    storageDesc.customProperties.put(AZURE_STORAGE_TYPE, AZURE_STORAGE_ACCOUNTS);
    return TestUtils.doPost(host, storageDesc, StorageDescription.class, UriUtils.buildUri(host, StorageDescriptionService.FACTORY_LINK));
}
Also used : AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)

Example 17 with StorageDescription

use of com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription in project photon-model by vmware.

the class TestAzureProvisionTask method assertStorageDescription.

/**
 * Ensure that after provisioning, there is one (but only one) StorageDescription created for
 * the shared storage account. This test does not use shared SA, thus provisioning should create
 * a StorageDescription.
 */
private void assertStorageDescription() {
    if (this.isMock) {
        // return. Nothing provisioned on Azure so nothing to check
        return;
    }
    try {
        ComputeState vm = getHost().getServiceState(null, ComputeState.class, UriUtils.buildUri(getHost(), this.vmState.documentSelfLink));
        String sharedSAName = vm.customProperties.get(AzureConstants.AZURE_STORAGE_ACCOUNT_NAME);
        if (sharedSAName != null && !sharedSAName.isEmpty()) {
            Map<String, StorageDescription> storageDescriptionsMap = ProvisioningUtils.<StorageDescription>getResourceStates(getHost(), StorageDescriptionService.FACTORY_LINK, StorageDescription.class);
            assertTrue(!storageDescriptionsMap.isEmpty());
            List<StorageDescription> storageDescriptions = storageDescriptionsMap.values().stream().filter(name -> name.equals(sharedSAName)).collect(Collectors.toList());
            assertEquals("More than one storage description was created for the provisinoed storage account.", storageDescriptions.size(), 1);
        }
    } catch (Throwable t) {
        fail("Unable to verify Storage Description documents");
        t.printStackTrace();
    }
}
Also used : NicSpec(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.AzureNicSpecs.NicSpec) NetworkManagementClientImpl(com.microsoft.azure.management.network.implementation.NetworkManagementClientImpl) ProvisionComputeTaskService(com.vmware.photon.controller.model.tasks.ProvisionComputeTaskService) IpAssignment(com.vmware.photon.controller.model.resources.NetworkInterfaceDescriptionService.IpAssignment) AzureTestUtil.deleteVMs(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.deleteVMs) SHARED_NETWORK_NIC_SPEC(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.SHARED_NETWORK_NIC_SPEC) VirtualNetworkInner(com.microsoft.azure.management.network.implementation.VirtualNetworkInner) DISK_CONTROLLER_NUMBER(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.DISK_CONTROLLER_NUMBER) AzureUriPaths(com.vmware.photon.controller.model.adapters.azure.AzureUriPaths) NetworkInterfaceStateWithDescription(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceStateWithDescription) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) Map(java.util.Map) After(org.junit.After) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) Assert.fail(org.junit.Assert.fail) ServiceDocumentQueryResult(com.vmware.xenon.common.ServiceDocumentQueryResult) ProvisioningUtils(com.vmware.photon.controller.model.tasks.ProvisioningUtils) OSDisk(com.microsoft.azure.management.compute.OSDisk) EnumSet(java.util.EnumSet) ResourceEnumerationTaskService(com.vmware.photon.controller.model.tasks.ResourceEnumerationTaskService) AzureConstants(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants) DEFAULT_NIC_SPEC(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.DEFAULT_NIC_SPEC) ComputeStatsResponse(com.vmware.photon.controller.model.adapterapi.ComputeStatsResponse) ComputeStatsRequest(com.vmware.photon.controller.model.adapterapi.ComputeStatsRequest) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) StatelessService(com.vmware.xenon.common.StatelessService) VMResourceSpec(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.VMResourceSpec) TestUtils(com.vmware.photon.controller.model.tasks.TestUtils) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) UUID(java.util.UUID) AzureTestUtil.createPrivateImageSource(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.createPrivateImageSource) AzureTestUtil.createVMResourceFromSpec(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.createVMResourceFromSpec) Collectors(java.util.stream.Collectors) NO_PUBLIC_IP_NIC_SPEC(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.NO_PUBLIC_IP_NIC_SPEC) List(java.util.List) AzureUtils(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils) AzureTestUtil.createImageSource(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.createImageSource) StorageDescriptionService(com.vmware.photon.controller.model.resources.StorageDescriptionService) UriUtils(com.vmware.xenon.common.UriUtils) Optional(java.util.Optional) NetworkSecurityGroupInner(com.microsoft.azure.management.network.implementation.NetworkSecurityGroupInner) AzureEnumerationAdapterService(com.vmware.photon.controller.model.adapters.azure.enumeration.AzureEnumerationAdapterService) TaskOption(com.vmware.photon.controller.model.tasks.TaskOption) DiskService(com.vmware.photon.controller.model.resources.DiskService) AzureTestUtil.createDefaultResourceGroupState(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.createDefaultResourceGroupState) ComputeProperties(com.vmware.photon.controller.model.ComputeProperties) ResourceGroupStateType(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.ResourceGroupStateType) ResourceGroupInner(com.microsoft.azure.management.resources.implementation.ResourceGroupInner) PhotonModelMetricServices(com.vmware.photon.controller.model.PhotonModelMetricServices) Function(java.util.function.Function) AzureBaseTest(com.vmware.photon.controller.model.adapters.azure.base.AzureBaseTest) ProvisionComputeTaskState(com.vmware.photon.controller.model.tasks.ProvisionComputeTaskService.ProvisionComputeTaskState) AzureTestUtil.createDefaultVMResource(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.createDefaultVMResource) Level(java.util.logging.Level) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) Assume(org.junit.Assume) IMAGE_REFERENCE(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.IMAGE_REFERENCE) VirtualMachineInner(com.microsoft.azure.management.compute.implementation.VirtualMachineInner) AzureNicSpecs(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.AzureNicSpecs) PRIVATE_IP_NIC_SPEC(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.PRIVATE_IP_NIC_SPEC) DataDisk(com.microsoft.azure.management.compute.DataDisk) Assert.assertNotNull(org.junit.Assert.assertNotNull) Operation(com.vmware.xenon.common.Operation) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) ImageSource(com.vmware.photon.controller.model.adapters.util.instance.BaseComputeInstanceContext.ImageSource) Assert.assertNotEquals(org.junit.Assert.assertNotEquals) AZURE_CUSTOM_DATA_DISK_SIZE(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.AZURE_CUSTOM_DATA_DISK_SIZE) Assert.assertNull(org.junit.Assert.assertNull) Ignore(org.junit.Ignore) AzureTestUtil.generateName(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil.generateName) Assert.assertEquals(org.junit.Assert.assertEquals) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)

Example 18 with StorageDescription

use of com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription in project photon-model by vmware.

the class AzureUtils method constructStorageDescription.

private static StorageDescription constructStorageDescription(StorageAccountInner sa, ServiceHost host, String serviceSelfLink, ComputeStateWithDescription parent, StorageAccountInner contextStorage, StorageAccountListKeysResultInner keys) {
    AuthCredentialsServiceState storageAuth = new AuthCredentialsServiceState();
    storageAuth.documentSelfLink = UUID.randomUUID().toString();
    storageAuth.customProperties = new HashMap<>();
    for (StorageAccountKey key : keys.keys()) {
        storageAuth.customProperties.put(getStorageAccountKeyName(storageAuth.customProperties), key.value());
    }
    storageAuth.tenantLinks = parent.tenantLinks;
    if (parent.endpointLink != null) {
        storageAuth.customProperties.put(CUSTOM_PROP_ENDPOINT_LINK, parent.endpointLink);
    }
    Operation storageAuthOp = Operation.createPost(createInventoryUri(host, AuthCredentialsService.FACTORY_LINK)).setBody(storageAuth);
    storageAuthOp.setReferer(UriUtils.buildUri(host.getPublicUri(), serviceSelfLink));
    host.sendRequest(storageAuthOp);
    String storageAuthLink = UriUtils.buildUriPath(AuthCredentialsService.FACTORY_LINK, storageAuth.documentSelfLink);
    StorageDescription storageDescription = new StorageDescription();
    storageDescription.id = contextStorage.id();
    storageDescription.regionId = contextStorage.location();
    storageDescription.name = contextStorage.name();
    storageDescription.authCredentialsLink = storageAuthLink;
    storageDescription.resourcePoolLink = parent.resourcePoolLink;
    storageDescription.documentSelfLink = UUID.randomUUID().toString();
    storageDescription.endpointLink = parent.endpointLink;
    AdapterUtils.addToEndpointLinks(storageDescription, parent.endpointLink);
    storageDescription.computeHostLink = parent.documentSelfLink;
    storageDescription.customProperties = new HashMap<>();
    storageDescription.customProperties.put(AZURE_STORAGE_TYPE, AZURE_STORAGE_ACCOUNTS);
    storageDescription.customProperties.put(AZURE_STORAGE_ACCOUNT_URI, null);
    storageDescription.tenantLinks = parent.tenantLinks;
    storageDescription.type = contextStorage.sku().name().toString();
    if (sa != null && sa.creationTime() != null) {
        storageDescription.creationTimeMicros = TimeUnit.MILLISECONDS.toMicros(sa.creationTime().getMillis());
    }
    return storageDescription;
}
Also used : AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) StorageAccountKey(com.microsoft.azure.management.storage.StorageAccountKey) Operation(com.vmware.xenon.common.Operation) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)

Example 19 with StorageDescription

use of com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription in project photon-model by vmware.

the class DiskContext method populateContextThen.

/**
 * Populates the given initial context and invoke the onSuccess handler when built. At every
 * step, if failure occurs the DiskContext's errorHandler is invoked to cleanup.
 */
public static void populateContextThen(Service service, DiskContext ctx, Consumer<DiskContext> onSuccess) {
    // Step 1: Get disk details
    if (ctx.diskState == null) {
        URI diskUri = createInventoryUri(service.getHost(), DiskService.DiskStateExpanded.buildUri(ctx.diskReference));
        AdapterUtils.getServiceState(service, diskUri, op -> {
            ctx.diskState = op.getBody(DiskService.DiskStateExpanded.class);
            EnumSet<DiskService.DiskType> notSupportedTypes = EnumSet.of(DiskService.DiskType.SSD, DiskService.DiskType.NETWORK);
            if (notSupportedTypes.contains(ctx.diskState.type)) {
                ctx.fail(new IllegalStateException(String.format("Not supported disk type %s.", ctx.diskState.type)));
                return;
            }
            populateContextThen(service, ctx, onSuccess);
        }, ctx.errorHandler);
        return;
    }
    // the disk.
    if (ctx.datastoreName == null && ctx.diskInstanceRequest.requestType == DiskInstanceRequest.DiskRequestType.CREATE) {
        if (ctx.diskState.storageDescription != null) {
            ctx.datastoreName = ctx.diskState.storageDescription.id;
            populateContextThen(service, ctx, onSuccess);
        } else if (ctx.diskState.resourceGroupStates != null && !ctx.diskState.resourceGroupStates.isEmpty()) {
            // There will always be only one resource group state existing for a disk
            ResourceGroupState resource = ctx.diskState.resourceGroupStates.iterator().next();
            ClientUtils.getDatastoresForProfile(service, resource.documentSelfLink, ctx.diskState.endpointLink, ctx.diskState.tenantLinks, ctx.errorHandler, (result) -> {
                if (result.documents != null && result.documents.size() > 0) {
                    // pick the first datastore and proceed.
                    StorageDescription dsStorageDesc = Utils.fromJson(result.documents.values().iterator().next(), StorageDescription.class);
                    ctx.datastoreName = dsStorageDesc.id;
                    ctx.diskState.storageDescriptionLink = dsStorageDesc.documentSelfLink;
                } else {
                    // Since no result found default to the available datastore.
                    ctx.datastoreName = "";
                }
                populateContextThen(service, ctx, onSuccess);
            });
        } else if (CustomProperties.of(ctx.diskState).getString(CustomProperties.DISK_DATASTORE_NAME) != null) {
            ctx.datastoreName = CustomProperties.of(ctx.diskState).getString(CustomProperties.DISK_DATASTORE_NAME);
            populateContextThen(service, ctx, onSuccess);
        } else {
            // Mark empty so that it can fall back to any available datastore from the system.
            ctx.datastoreName = "";
            populateContextThen(service, ctx, onSuccess);
        }
        return;
    }
    // Step 3: Get Credentials
    if (ctx.vSphereCredentials == null) {
        if (IAAS_API_ENABLED) {
            if (ctx.operation == null) {
                ctx.fail(new IllegalArgumentException("Caller operation cannot be empty"));
                return;
            }
            SessionUtil.retrieveExternalToken(service, ctx.operation.getAuthorizationContext()).whenComplete((authCredentialsServiceState, throwable) -> {
                if (throwable != null) {
                    ctx.errorHandler.accept(throwable);
                    return;
                }
                ctx.vSphereCredentials = authCredentialsServiceState;
                populateContextThen(service, ctx, onSuccess);
            });
        } else {
            if (ctx.diskState.authCredentialsLink == null || ctx.diskState.authCredentialsLink.isEmpty()) {
                ctx.fail(new IllegalArgumentException("Auth credentials cannot be empty"));
                return;
            }
            URI credUri = createInventoryUri(service.getHost(), ctx.diskState.authCredentialsLink);
            AdapterUtils.getServiceState(service, credUri, op -> {
                ctx.vSphereCredentials = op.getBody(AuthCredentialsServiceState.class);
                populateContextThen(service, ctx, onSuccess);
            }, ctx.errorHandler);
        }
        return;
    }
    // Step 4: Get the endpoint compute link
    if (ctx.endpointComputeLink == null) {
        URI endpointUri = createInventoryUri(service.getHost(), UriUtils.buildUri(service.getHost(), ctx.diskState.endpointLink));
        AdapterUtils.getServiceState(service, endpointUri, op -> {
            EndpointService.EndpointState endpointState = op.getBody(EndpointService.EndpointState.class);
            ctx.endpointComputeLink = endpointState.computeLink;
            populateContextThen(service, ctx, onSuccess);
        }, ctx.errorHandler);
        return;
    }
    // Step 5: Get the adapter reference to from the endpoint compute link
    if (ctx.adapterManagementReference == null) {
        URI computeUri = createInventoryUri(service.getHost(), UriUtils.buildUri(service.getHost(), ctx.endpointComputeLink));
        AdapterUtils.getServiceState(service, computeUri, op -> {
            ComputeService.ComputeState computeState = op.getBody(ComputeService.ComputeState.class);
            ctx.adapterManagementReference = computeState.adapterManagementReference;
            populateContextThen(service, ctx, onSuccess);
        }, ctx.errorHandler);
        return;
    }
    // Step 6: Obtain reference to the datacenter moref.
    if (ctx.datacenterMoRef == null) {
        try {
            ctx.datacenterMoRef = VimUtils.convertStringToMoRef(ctx.diskState.regionId);
        } catch (IllegalArgumentException ex) {
            ctx.fail(ex);
            return;
        }
    }
    onSuccess.accept(ctx);
}
Also used : AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) Service(com.vmware.xenon.common.Service) AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) SessionUtil(com.vmware.photon.controller.model.resources.SessionUtil) Operation(com.vmware.xenon.common.Operation) TaskManager(com.vmware.photon.controller.model.adapters.util.TaskManager) DiskInstanceRequest(com.vmware.photon.controller.model.adapterapi.DiskInstanceRequest) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) ManagedObjectReference(com.vmware.vim25.ManagedObjectReference) Consumer(java.util.function.Consumer) Utils(com.vmware.xenon.common.Utils) EndpointService(com.vmware.photon.controller.model.resources.EndpointService) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) UriUtils(com.vmware.xenon.common.UriUtils) ComputeService(com.vmware.photon.controller.model.resources.ComputeService) IAAS_API_ENABLED(com.vmware.photon.controller.model.UriPaths.IAAS_API_ENABLED) URI(java.net.URI) DiskService(com.vmware.photon.controller.model.resources.DiskService) OperationJoin(com.vmware.xenon.common.OperationJoin) PhotonModelUriUtils.createInventoryUri(com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri) EnumSet(java.util.EnumSet) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) EndpointService(com.vmware.photon.controller.model.resources.EndpointService) URI(java.net.URI) ComputeService(com.vmware.photon.controller.model.resources.ComputeService) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState)

Example 20 with StorageDescription

use of com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription in project photon-model by vmware.

the class VsphereDatastoreEnumerationHelper method updateStorageDescription.

private static void updateStorageDescription(VSphereIncrementalEnumerationService service, StorageDescription oldDocument, EnumerationProgress enumerationProgress, DatastoreOverlay ds, boolean fullUpdate) {
    ComputeEnumerateResourceRequest request = enumerationProgress.getRequest();
    String regionId = enumerationProgress.getRegionId();
    StorageDescription desc;
    if (fullUpdate) {
        desc = makeStorageFromResults(request, ds, regionId, enumerationProgress);
    } else {
        desc = makeStorageFromChanges(ds, oldDocument);
    }
    desc.documentSelfLink = oldDocument.documentSelfLink;
    desc.resourcePoolLink = null;
    if (oldDocument.tenantLinks == null) {
        desc.tenantLinks = enumerationProgress.getTenantLinks();
    }
    service.logFine(() -> String.format("Syncing Storage %s", ds.getName()));
    Operation.createPatch(PhotonModelUriUtils.createInventoryUri(service.getHost(), desc.documentSelfLink)).setBody(desc).setCompletion((o, e) -> {
        trackDatastore(enumerationProgress, ds).handle(o, e);
        if (e == null) {
            VsphereEnumerationHelper.submitWorkToVSpherePool(service, () -> {
                VsphereEnumerationHelper.updateLocalTags(service, enumerationProgress, ds, o.getBody(ResourceState.class));
                updateStorageStats(service, ds, o.getBody(ServiceDocument.class).documentSelfLink);
            });
        }
    }).sendWith(service);
}
Also used : STORAGE_USED_BYTES(com.vmware.photon.controller.model.constants.PhotonModelConstants.STORAGE_USED_BYTES) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) PhotonModelUriUtils(com.vmware.photon.controller.model.util.PhotonModelUriUtils) ServiceTypeCluster(com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster) QueryTask(com.vmware.xenon.services.common.QueryTask) ObjectUpdateKind(com.vmware.vim25.ObjectUpdateKind) ServiceDocument(com.vmware.xenon.common.ServiceDocument) HashMap(java.util.HashMap) ResourceMetricsService(com.vmware.photon.controller.model.monitoring.ResourceMetricsService) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) CUSTOM_PROP_STORAGE_SHARED(com.vmware.photon.controller.model.ComputeProperties.CUSTOM_PROP_STORAGE_SHARED) Utils(com.vmware.xenon.common.Utils) VsphereEnumerationHelper.convertOnlyResultToDocument(com.vmware.photon.controller.model.adapters.vsphere.VsphereEnumerationHelper.convertOnlyResultToDocument) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) StatsUtil(com.vmware.photon.controller.model.tasks.monitoring.StatsUtil) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) Operation(com.vmware.xenon.common.Operation) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) SingleResourceStatsCollectionTaskService(com.vmware.photon.controller.model.tasks.monitoring.SingleResourceStatsCollectionTaskService) TimeUnit(java.util.concurrent.TimeUnit) ResourceGroupService(com.vmware.photon.controller.model.resources.ResourceGroupService) STORAGE_AVAILABLE_BYTES(com.vmware.photon.controller.model.constants.PhotonModelConstants.STORAGE_AVAILABLE_BYTES) List(java.util.List) ClusterUtil(com.vmware.photon.controller.model.util.ClusterUtil) StorageDescriptionService(com.vmware.photon.controller.model.resources.StorageDescriptionService) CompletionHandler(com.vmware.xenon.common.Operation.CompletionHandler) UriUtils(com.vmware.xenon.common.UriUtils) VsphereEnumerationHelper.withTaskResults(com.vmware.photon.controller.model.adapters.vsphere.VsphereEnumerationHelper.withTaskResults) ResourceMetrics(com.vmware.photon.controller.model.monitoring.ResourceMetricsService.ResourceMetrics) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) ServiceDocument(com.vmware.xenon.common.ServiceDocument) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)

Aggregations

StorageDescription (com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)24 ResourceGroupState (com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState)13 Operation (com.vmware.xenon.common.Operation)13 AdapterUtils (com.vmware.photon.controller.model.adapters.util.AdapterUtils)11 UriUtils (com.vmware.xenon.common.UriUtils)11 Utils (com.vmware.xenon.common.Utils)11 AuthCredentialsServiceState (com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState)11 QueryTask (com.vmware.xenon.services.common.QueryTask)11 List (java.util.List)11 ComputeEnumerateResourceRequest (com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest)10 QueryUtils (com.vmware.photon.controller.model.query.QueryUtils)10 DiskState (com.vmware.photon.controller.model.resources.DiskService.DiskState)10 ResourceState (com.vmware.photon.controller.model.resources.ResourceState)10 StorageDescriptionService (com.vmware.photon.controller.model.resources.StorageDescriptionService)10 CompletionHandler (com.vmware.xenon.common.Operation.CompletionHandler)10 ResourceGroupService (com.vmware.photon.controller.model.resources.ResourceGroupService)9 ServiceTypeCluster (com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster)9 HashMap (java.util.HashMap)9 HashSet (java.util.HashSet)9 TimeUnit (java.util.concurrent.TimeUnit)9