Search in sources :

Example 11 with StorageDescription

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

the class VsphereDatastoreEnumerationHelper method makeStorageFromChanges.

private static StorageDescription makeStorageFromChanges(DatastoreOverlay datastore, StorageDescription oldDocument) {
    StorageDescriptionService.StorageDescription storageDescription = new StorageDescriptionService.StorageDescription();
    storageDescription.name = datastore.getNameOrNull();
    storageDescription.id = datastore.getNameOrNull();
    // if free space changes, update used bytes from old capacity.
    if (datastore.getCapacityBytesOrZero() > 0L) {
        storageDescription.capacityBytes = datastore.getCapacityBytesOrZero();
        CustomProperties.of(storageDescription).put(STORAGE_USED_BYTES, datastore.getCapacityBytes() - datastore.getFreeSpaceBytes()).put(STORAGE_AVAILABLE_BYTES, datastore.getFreeSpaceBytes()).put(CustomProperties.DS_FREE_SPACE_IN_GB, AdapterUtils.convertBytesToGB(datastore.getFreeSpaceBytes()));
    } else if (datastore.getFreeSpaceBytes() > 0L) {
        CustomProperties.of(storageDescription).put(STORAGE_USED_BYTES, oldDocument.capacityBytes - datastore.getFreeSpaceBytes()).put(STORAGE_AVAILABLE_BYTES, datastore.getFreeSpaceBytes()).put(CustomProperties.DS_FREE_SPACE_IN_GB, AdapterUtils.convertBytesToGB(datastore.getFreeSpaceBytes()));
    }
    if (null != datastore.getPath()) {
        CustomProperties.of(storageDescription).put(CustomProperties.DS_PATH, datastore.getPath());
    }
    return storageDescription;
}
Also used : StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) StorageDescriptionService(com.vmware.photon.controller.model.resources.StorageDescriptionService) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)

Example 12 with StorageDescription

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

the class TestVSphereComputeDiskDay2Service method createDiskWithDatastore.

private DiskService.DiskState createDiskWithDatastore(String alias, DiskService.DiskType type, long capacityMBytes, HashMap<String, String> customProperties, boolean isPersistent) throws Throwable {
    DiskService.DiskState diskState = constructDiskState(alias, type, 0, null, capacityMBytes, customProperties);
    diskState.persistent = isPersistent;
    StorageDescription sd = new StorageDescription();
    sd.name = sd.id = this.dataStoreId != null ? this.dataStoreId : "testDatastore";
    sd = TestUtils.doPost(this.host, sd, StorageDescription.class, UriUtils.buildUri(this.host, StorageDescriptionService.FACTORY_LINK));
    diskState.storageDescriptionLink = sd.documentSelfLink;
    return postDiskStateWithDetails(diskState);
}
Also used : DiskService(com.vmware.photon.controller.model.resources.DiskService) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)

Example 13 with StorageDescription

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

the class AzureStorageEnumerationAdapterService method getLocalStorageAccountDescriptions.

/**
 * Query all storage descriptions for the cluster filtered by the received set of storage
 * account Ids
 */
private void getLocalStorageAccountDescriptions(StorageEnumContext context, StorageEnumStages next) {
    if (context.storageAccountsToUpdateCreate.isEmpty()) {
        context.subStage = StorageEnumStages.CREATE_STORAGE_DESCRIPTIONS;
        handleSubStage(context);
        return;
    }
    context.storageDescriptions.clear();
    Query.Builder qBuilder = Query.Builder.create().addKindFieldClause(StorageDescription.class);
    Query.Builder instanceIdFilterParentQuery = Query.Builder.create(Occurance.MUST_OCCUR);
    for (Map.Entry<String, StorageAccount> account : context.storageAccountsToUpdateCreate.entrySet()) {
        Query instanceIdFilter = Query.Builder.create(Occurance.SHOULD_OCCUR).addFieldClause(StorageDescription.FIELD_NAME_ID, canonizeId(account.getValue().id)).build();
        instanceIdFilterParentQuery.addClause(instanceIdFilter);
    }
    qBuilder.addClause(instanceIdFilterParentQuery.build());
    QueryByPages<StorageDescription> queryLocalStates = new QueryByPages<>(getHost(), qBuilder.build(), StorageDescription.class, context.parentCompute.tenantLinks, null, /* endpointLink */
    context.parentCompute.documentSelfLink).setMaxPageSize(QueryUtils.MAX_RESULT_LIMIT).setClusterType(ServiceTypeCluster.INVENTORY_SERVICE);
    queryLocalStates.collectDocuments(Collectors.toList()).whenComplete((sds, ex) -> {
        if (ex != null) {
            handleError(context, ex);
            return;
        }
        logFine(() -> String.format("Found %d matching storage descriptions for Azure" + " storage accounts", sds.size()));
        List<DeferredResult<AuthCredentialsServiceState>> results = sds.stream().map(sd -> {
            context.storageDescriptions.put(sd.id, sd);
            // populate connectionStrings
            if (!context.storageConnectionStrings.containsKey(sd.id)) {
                return loadStorageAuth(context, sd);
            } else {
                return DeferredResult.<AuthCredentialsServiceState>completed(null);
            }
        }).collect(Collectors.toList());
        DeferredResult.allOf(results).whenComplete((creds, e) -> {
            if (e != null) {
                logWarning(() -> String.format("Failed to get storage description" + " credentials: %s", e.getMessage()));
            }
            context.subStage = next;
            handleSubStage(context);
        });
    });
}
Also used : STORAGE_ACCOUNT_REST_API_VERSION(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.STORAGE_ACCOUNT_REST_API_VERSION) Arrays(java.util.Arrays) QUERY_PARAM_API_VERSION(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.QUERY_PARAM_API_VERSION) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) AZURE_STORAGE_BLOBS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_BLOBS) ServiceTypeCluster(com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster) StringUtils(org.apache.commons.lang3.StringUtils) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) Azure(com.microsoft.azure.management.Azure) Utils(com.vmware.xenon.common.Utils) Map(java.util.Map) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) COMPUTE_HOST_LINK_PROP_NAME(com.vmware.photon.controller.model.ComputeProperties.COMPUTE_HOST_LINK_PROP_NAME) EnumSet(java.util.EnumSet) ListBlobItem(com.microsoft.azure.storage.blob.ListBlobItem) AZURE_STORAGE_ACCOUNT_KEY1(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_ACCOUNT_KEY1) StorageAccountListKeysResultInner(com.microsoft.azure.management.storage.implementation.StorageAccountListKeysResultInner) StatelessService(com.vmware.xenon.common.StatelessService) Set(java.util.Set) AdapterUtils.getDeletionState(com.vmware.photon.controller.model.adapters.util.AdapterUtils.getDeletionState) AZURE_STORAGE_CONTAINER_LEASE_STATUS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_CONTAINER_LEASE_STATUS) TagService(com.vmware.photon.controller.model.resources.TagService) StorageDescriptionService(com.vmware.photon.controller.model.resources.StorageDescriptionService) CompletionHandler(com.vmware.xenon.common.Operation.CompletionHandler) DeferredResult(com.vmware.xenon.common.DeferredResult) UriUtils(com.vmware.xenon.common.UriUtils) ComputeService(com.vmware.photon.controller.model.resources.ComputeService) AZURE_STORAGE_CONTAINER_LEASE_STATE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_CONTAINER_LEASE_STATE) ComputeProperties(com.vmware.photon.controller.model.ComputeProperties) ResourceGroupStateType(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.ResourceGroupStateType) PhotonModelUtils(com.vmware.photon.controller.model.resources.util.PhotonModelUtils) ArrayList(java.util.ArrayList) StorageException(com.microsoft.azure.storage.StorageException) TagState(com.vmware.photon.controller.model.resources.TagService.TagState) Query(com.vmware.xenon.services.common.QueryTask.Query) AUTH_HEADER_BEARER_PREFIX(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AUTH_HEADER_BEARER_PREFIX) UriPaths(com.vmware.photon.controller.model.UriPaths) EnumerationStages(com.vmware.photon.controller.model.adapters.util.enums.EnumerationStages) CloudBlobContainer(com.microsoft.azure.storage.blob.CloudBlobContainer) StorageErrorCode(com.microsoft.azure.storage.StorageErrorCode) EnumUtils(org.apache.commons.lang3.EnumUtils) AZURE_STORAGE_CONTAINER_LEASE_LAST_MODIFIED(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_CONTAINER_LEASE_LAST_MODIFIED) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) LIST_STORAGE_ACCOUNTS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.LIST_STORAGE_ACCOUNTS) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) ResultSegment(com.microsoft.azure.storage.ResultSegment) EMPTY_STR(com.vmware.photon.controller.model.constants.PhotonModelConstants.EMPTY_STR) ContainerListingDetails(com.microsoft.azure.storage.blob.ContainerListingDetails) UnknownHostException(java.net.UnknownHostException) QueryTop(com.vmware.photon.controller.model.query.QueryUtils.QueryTop) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) QuerySpecification(com.vmware.xenon.services.common.QueryTask.QuerySpecification) PhotonModelUriUtils.createInventoryUri(com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri) AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) ResultContinuation(com.microsoft.azure.storage.ResultContinuation) URISyntaxException(java.net.URISyntaxException) QueryTask(com.vmware.xenon.services.common.QueryTask) AzureUriPaths(com.vmware.photon.controller.model.adapters.azure.AzureUriPaths) DEFAULT_DISK_TYPE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.DEFAULT_DISK_TYPE) AzureSdkClients(com.vmware.photon.controller.model.adapters.azure.utils.AzureSdkClients) CUSTOM_PROP_ENDPOINT_LINK(com.vmware.photon.controller.model.constants.PhotonModelConstants.CUSTOM_PROP_ENDPOINT_LINK) URI(java.net.URI) TagsUtil.newTagState(com.vmware.photon.controller.model.adapters.util.TagsUtil.newTagState) AzureConstants(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants) AzureConstants.getQueryResultLimit(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.getQueryResultLimit) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) AZURE_STORAGE_CONTAINERS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_CONTAINERS) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Occurance(com.vmware.xenon.services.common.QueryTask.Query.Occurance) UUID(java.util.UUID) CloudStorageAccount(com.microsoft.azure.storage.CloudStorageAccount) Collectors(java.util.stream.Collectors) ResourceGroupService(com.vmware.photon.controller.model.resources.ResourceGroupService) List(java.util.List) AzureUtils(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils) AzureUtils.getResourceGroupName(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils.getResourceGroupName) TAG_KEY_TYPE(com.vmware.photon.controller.model.constants.PhotonModelConstants.TAG_KEY_TYPE) QueryOption(com.vmware.xenon.services.common.QueryTask.QuerySpecification.QueryOption) DiskService(com.vmware.photon.controller.model.resources.DiskService) Default(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default) QueryByPages(com.vmware.photon.controller.model.query.QueryUtils.QueryByPages) HashMap(java.util.HashMap) Level(java.util.logging.Level) HashSet(java.util.HashSet) AZURE_STORAGE_TYPE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_TYPE) AuthCredentialsService(com.vmware.xenon.services.common.AuthCredentialsService) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) AzureResourceType(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AzureResourceType) STORAGE_CONNECTION_STRING(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.STORAGE_CONNECTION_STRING) ExecutorService(java.util.concurrent.ExecutorService) StorageAccountResultList(com.vmware.photon.controller.model.adapters.azure.model.storage.StorageAccountResultList) CloudBlobClient(com.microsoft.azure.storage.blob.CloudBlobClient) AdapterUriUtil(com.vmware.photon.controller.model.adapters.util.AdapterUriUtil) Operation(com.vmware.xenon.common.Operation) AZURE_STORAGE_DISKS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_DISKS) StorageAccountsInner(com.microsoft.azure.management.storage.implementation.StorageAccountsInner) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) StorageCredentials(com.microsoft.azure.storage.StorageCredentials) AzureUtils.canonizeId(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils.canonizeId) BlobListingDetails(com.microsoft.azure.storage.blob.BlobListingDetails) AzureDeferredResultServiceCallback(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback) StorageAccountInner(com.microsoft.azure.management.storage.implementation.StorageAccountInner) StorageAccount(com.vmware.photon.controller.model.adapters.azure.model.storage.StorageAccount) OperationJoin(com.vmware.xenon.common.OperationJoin) CloudBlob(com.microsoft.azure.storage.blob.CloudBlob) QueryByPages(com.vmware.photon.controller.model.query.QueryUtils.QueryByPages) Query(com.vmware.xenon.services.common.QueryTask.Query) CloudStorageAccount(com.microsoft.azure.storage.CloudStorageAccount) StorageAccount(com.vmware.photon.controller.model.adapters.azure.model.storage.StorageAccount) Map(java.util.Map) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) DeferredResult(com.vmware.xenon.common.DeferredResult)

Example 14 with StorageDescription

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

the class AzureStorageEnumerationAdapterService method createResourceGroupStateHelper.

private DeferredResult<Operation> createResourceGroupStateHelper(StorageEnumContext context, CloudBlobContainer container, ResourceGroupState oldResourceGroup) {
    // Associate resource group with storage account
    String storageAcctName = getStorageAccountNameFromUri(container.getStorageUri().getPrimaryUri().getHost());
    Query.Builder qBuilder = Query.Builder.create().addKindFieldClause(StorageDescription.class).addFieldClause(StorageDescription.FIELD_NAME_NAME, storageAcctName);
    QueryTop<StorageDescription> queryLocalStates = new QueryTop<>(getHost(), qBuilder.build(), StorageDescription.class, context.parentCompute.tenantLinks, // endpointLink
    null, context.parentCompute.documentSelfLink).setClusterType(ServiceTypeCluster.INVENTORY_SERVICE);
    return queryLocalStates.collectLinks(Collectors.toSet()).thenCompose(sdls -> {
        logFine(() -> String.format("Found %d matching storage descriptions", sdls.size()));
        // the storage account names are unique so we should only get 1 result back
        if (sdls.isEmpty()) {
            return DeferredResult.completed((Operation) null);
        }
        String storageDescSelfLink = sdls.iterator().next();
        if (sdls.size() > 1) {
            logWarning(() -> String.format("Found multiple instances of the same" + " storage description %s", storageAcctName));
        }
        ResourceGroupState resourceGroupState = createResourceGroupStateObject(context, container, storageDescSelfLink, oldResourceGroup);
        if (oldResourceGroup != null) {
            return updateResourceGroupState(context, resourceGroupState);
        } else {
            return createResourceGroupState(context, resourceGroupState);
        }
    });
}
Also used : Query(com.vmware.xenon.services.common.QueryTask.Query) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)

Example 15 with StorageDescription

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

the class AzureStorageEnumerationAdapterService method updateStorageDescriptions.

/**
 * Updates matching storage descriptions for given storage accounts.
 */
private void updateStorageDescriptions(StorageEnumContext context, StorageEnumStages next) {
    if (context.storageDescriptions.size() == 0) {
        logFine(() -> "No storage descriptions available for update");
        context.subStage = next;
        handleSubStage(context);
        return;
    }
    List<DeferredResult<Operation>> updates = context.storageDescriptions.values().stream().map(sd -> {
        StorageAccount storageAccount = context.storageAccountsToUpdateCreate.remove(sd.id);
        StorageDescription storageDescriptionToUpdate = new StorageDescription();
        storageDescriptionToUpdate.name = storageAccount.name;
        storageDescriptionToUpdate.authCredentialsLink = sd.authCredentialsLink;
        storageDescriptionToUpdate.regionId = storageAccount.location;
        storageDescriptionToUpdate.documentSelfLink = sd.documentSelfLink;
        if (StringUtils.isEmpty(storageDescriptionToUpdate.endpointLink)) {
            storageDescriptionToUpdate.endpointLink = sd.endpointLink;
        }
        storageDescriptionToUpdate.computeHostLink = sd.computeHostLink;
        // first copy
        storageDescriptionToUpdate.endpointLinks = sd.endpointLinks;
        // then update it
        AdapterUtils.addToEndpointLinks(storageDescriptionToUpdate, context.request.endpointLink);
        storageDescriptionToUpdate.tenantLinks = sd.tenantLinks;
        storageDescriptionToUpdate.regionId = storageAccount.location;
        // Check if SSE (encryption) is enable on azure storage account
        storageDescriptionToUpdate.supportsEncryption = storageAccount.properties.encryption != null ? storageAccount.properties.encryption.services.blob.enabled : false;
        // Set type of azure storage account
        storageDescriptionToUpdate.type = storageAccount.sku.name;
        context.storageDescriptionsForPatching.put(sd.id, sd);
        return storageDescriptionToUpdate;
    }).map(sd -> Operation.createPatch(this, sd.documentSelfLink).setBody(sd).setCompletion((o, e) -> {
        if (e != null) {
            logWarning(() -> String.format("Failed to update storage description:" + " %s", e.getMessage()));
        }
    })).map(o -> sendWithDeferredResult(o)).collect(java.util.stream.Collectors.toList());
    DeferredResult.allOf(updates).whenComplete((ignore, e) -> {
        logFine(() -> "Finished updating storage descriptions");
        context.subStage = next;
        handleSubStage(context);
    });
}
Also used : STORAGE_ACCOUNT_REST_API_VERSION(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.STORAGE_ACCOUNT_REST_API_VERSION) Arrays(java.util.Arrays) QUERY_PARAM_API_VERSION(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.QUERY_PARAM_API_VERSION) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) AZURE_STORAGE_BLOBS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_BLOBS) ServiceTypeCluster(com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster) StringUtils(org.apache.commons.lang3.StringUtils) ResourceGroupState(com.vmware.photon.controller.model.resources.ResourceGroupService.ResourceGroupState) Azure(com.microsoft.azure.management.Azure) Utils(com.vmware.xenon.common.Utils) Map(java.util.Map) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) COMPUTE_HOST_LINK_PROP_NAME(com.vmware.photon.controller.model.ComputeProperties.COMPUTE_HOST_LINK_PROP_NAME) EnumSet(java.util.EnumSet) ListBlobItem(com.microsoft.azure.storage.blob.ListBlobItem) AZURE_STORAGE_ACCOUNT_KEY1(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_ACCOUNT_KEY1) StorageAccountListKeysResultInner(com.microsoft.azure.management.storage.implementation.StorageAccountListKeysResultInner) StatelessService(com.vmware.xenon.common.StatelessService) Set(java.util.Set) AdapterUtils.getDeletionState(com.vmware.photon.controller.model.adapters.util.AdapterUtils.getDeletionState) AZURE_STORAGE_CONTAINER_LEASE_STATUS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_CONTAINER_LEASE_STATUS) TagService(com.vmware.photon.controller.model.resources.TagService) StorageDescriptionService(com.vmware.photon.controller.model.resources.StorageDescriptionService) CompletionHandler(com.vmware.xenon.common.Operation.CompletionHandler) DeferredResult(com.vmware.xenon.common.DeferredResult) UriUtils(com.vmware.xenon.common.UriUtils) ComputeService(com.vmware.photon.controller.model.resources.ComputeService) AZURE_STORAGE_CONTAINER_LEASE_STATE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_CONTAINER_LEASE_STATE) ComputeProperties(com.vmware.photon.controller.model.ComputeProperties) ResourceGroupStateType(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.ResourceGroupStateType) PhotonModelUtils(com.vmware.photon.controller.model.resources.util.PhotonModelUtils) ArrayList(java.util.ArrayList) StorageException(com.microsoft.azure.storage.StorageException) TagState(com.vmware.photon.controller.model.resources.TagService.TagState) Query(com.vmware.xenon.services.common.QueryTask.Query) AUTH_HEADER_BEARER_PREFIX(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AUTH_HEADER_BEARER_PREFIX) UriPaths(com.vmware.photon.controller.model.UriPaths) EnumerationStages(com.vmware.photon.controller.model.adapters.util.enums.EnumerationStages) CloudBlobContainer(com.microsoft.azure.storage.blob.CloudBlobContainer) StorageErrorCode(com.microsoft.azure.storage.StorageErrorCode) EnumUtils(org.apache.commons.lang3.EnumUtils) AZURE_STORAGE_CONTAINER_LEASE_LAST_MODIFIED(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_CONTAINER_LEASE_LAST_MODIFIED) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) LIST_STORAGE_ACCOUNTS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.LIST_STORAGE_ACCOUNTS) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) ResultSegment(com.microsoft.azure.storage.ResultSegment) EMPTY_STR(com.vmware.photon.controller.model.constants.PhotonModelConstants.EMPTY_STR) ContainerListingDetails(com.microsoft.azure.storage.blob.ContainerListingDetails) UnknownHostException(java.net.UnknownHostException) QueryTop(com.vmware.photon.controller.model.query.QueryUtils.QueryTop) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) QuerySpecification(com.vmware.xenon.services.common.QueryTask.QuerySpecification) PhotonModelUriUtils.createInventoryUri(com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri) AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) ResultContinuation(com.microsoft.azure.storage.ResultContinuation) URISyntaxException(java.net.URISyntaxException) QueryTask(com.vmware.xenon.services.common.QueryTask) AzureUriPaths(com.vmware.photon.controller.model.adapters.azure.AzureUriPaths) DEFAULT_DISK_TYPE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.DEFAULT_DISK_TYPE) AzureSdkClients(com.vmware.photon.controller.model.adapters.azure.utils.AzureSdkClients) CUSTOM_PROP_ENDPOINT_LINK(com.vmware.photon.controller.model.constants.PhotonModelConstants.CUSTOM_PROP_ENDPOINT_LINK) URI(java.net.URI) TagsUtil.newTagState(com.vmware.photon.controller.model.adapters.util.TagsUtil.newTagState) AzureConstants(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants) AzureConstants.getQueryResultLimit(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.getQueryResultLimit) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) AZURE_STORAGE_CONTAINERS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_CONTAINERS) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Occurance(com.vmware.xenon.services.common.QueryTask.Query.Occurance) UUID(java.util.UUID) CloudStorageAccount(com.microsoft.azure.storage.CloudStorageAccount) Collectors(java.util.stream.Collectors) ResourceGroupService(com.vmware.photon.controller.model.resources.ResourceGroupService) List(java.util.List) AzureUtils(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils) AzureUtils.getResourceGroupName(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils.getResourceGroupName) TAG_KEY_TYPE(com.vmware.photon.controller.model.constants.PhotonModelConstants.TAG_KEY_TYPE) QueryOption(com.vmware.xenon.services.common.QueryTask.QuerySpecification.QueryOption) DiskService(com.vmware.photon.controller.model.resources.DiskService) Default(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default) QueryByPages(com.vmware.photon.controller.model.query.QueryUtils.QueryByPages) HashMap(java.util.HashMap) Level(java.util.logging.Level) HashSet(java.util.HashSet) AZURE_STORAGE_TYPE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_TYPE) AuthCredentialsService(com.vmware.xenon.services.common.AuthCredentialsService) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) AzureResourceType(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AzureResourceType) STORAGE_CONNECTION_STRING(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.STORAGE_CONNECTION_STRING) ExecutorService(java.util.concurrent.ExecutorService) StorageAccountResultList(com.vmware.photon.controller.model.adapters.azure.model.storage.StorageAccountResultList) CloudBlobClient(com.microsoft.azure.storage.blob.CloudBlobClient) AdapterUriUtil(com.vmware.photon.controller.model.adapters.util.AdapterUriUtil) Operation(com.vmware.xenon.common.Operation) AZURE_STORAGE_DISKS(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_DISKS) StorageAccountsInner(com.microsoft.azure.management.storage.implementation.StorageAccountsInner) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) StorageCredentials(com.microsoft.azure.storage.StorageCredentials) AzureUtils.canonizeId(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils.canonizeId) BlobListingDetails(com.microsoft.azure.storage.blob.BlobListingDetails) AzureDeferredResultServiceCallback(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback) StorageAccountInner(com.microsoft.azure.management.storage.implementation.StorageAccountInner) StorageAccount(com.vmware.photon.controller.model.adapters.azure.model.storage.StorageAccount) OperationJoin(com.vmware.xenon.common.OperationJoin) CloudBlob(com.microsoft.azure.storage.blob.CloudBlob) CloudStorageAccount(com.microsoft.azure.storage.CloudStorageAccount) StorageAccount(com.vmware.photon.controller.model.adapters.azure.model.storage.StorageAccount) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) DeferredResult(com.vmware.xenon.common.DeferredResult)

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