Search in sources :

Example 1 with Default

use of com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default in project photon-model by vmware.

the class AzureComputeEnumerationAdapterService method patchVMInstanceDetails.

private DeferredResult<ComputeState> patchVMInstanceDetails(EnumerationContext ctx, VirtualMachinesInner vmOps, ComputeState computeState) {
    String resourceGroupName = getResourceGroupName(computeState.id);
    String vmName = computeState.name;
    AzureDeferredResultServiceCallback<VirtualMachineInner> handler = new Default<>(this, "Load virtual machine instance view:" + vmName);
    PhotonModelUtils.runInExecutor(this.executorService, () -> {
        vmOps.getByResourceGroupAsync(resourceGroupName, vmName, InstanceViewTypes.INSTANCE_VIEW, handler);
    }, handler::failure);
    return handler.toDeferredResult().thenApply(vm -> {
        for (InstanceViewStatus status : vm.instanceView().statuses()) {
            if (computeState.creationTimeMicros == null && status.time() != null) {
                computeState.creationTimeMicros = TimeUnit.MILLISECONDS.toMicros(status.time().getMillis());
            }
            if (status.code().equals(AzureConstants.AZURE_VM_POWER_STATE_RUNNING)) {
                computeState.powerState = PowerState.ON;
            } else if (status.code().equals(AzureConstants.AZURE_VM_POWER_STATE_STOPPED)) {
                computeState.powerState = PowerState.OFF;
            } else if (status.code().equals(AzureConstants.AZURE_VM_POWER_STATE_DEALLOCATED)) {
                computeState.powerState = PowerState.SUSPEND;
            }
        }
        if (computeState.customProperties == null) {
            computeState.customProperties = new HashMap<>();
        }
        computeState.customProperties.put(RESOURCE_GROUP_NAME, resourceGroupName);
        computeState.endpointLinks.add(ctx.request.endpointLink);
        computeState.type = ComputeType.VM_GUEST;
        computeState.environmentName = ComputeDescription.ENVIRONMENT_NAME_AZURE;
        return computeState;
    });
}
Also used : InstanceViewStatus(com.microsoft.azure.management.compute.InstanceViewStatus) VirtualMachineInner(com.microsoft.azure.management.compute.implementation.VirtualMachineInner) Default(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default)

Example 2 with Default

use of com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default in project photon-model by vmware.

the class AzureSecurityGroupService method deleteSecurityGroup.

private DeferredResult<AzureSecurityGroupContext> deleteSecurityGroup(AzureSecurityGroupContext context) {
    String rgName = null;
    if (context.securityGroupState.customProperties != null) {
        rgName = context.securityGroupState.customProperties.get(RESOURCE_GROUP_NAME);
    }
    rgName = rgName != null ? rgName : String.format("%s-rg", context.securityGroupState.name);
    ResourceGroupsInner azureClient = context.azureSdkClients.getResourceManagementClientImpl().resourceGroups();
    String msg = "Deleting resource group [" + rgName + "] for [" + context.securityGroupState.name + "] network security group";
    AzureDeferredResultServiceCallback<Void> callback = new Default<>(this, msg);
    azureClient.deleteAsync(rgName, callback);
    return callback.toDeferredResult().thenApply(__ -> context);
}
Also used : ResourceGroupsInner(com.microsoft.azure.management.resources.implementation.ResourceGroupsInner) Default(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default)

Example 3 with Default

use of com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default in project photon-model by vmware.

the class AzureStorageEnumerationAdapterService method createStorageDescription.

private DeferredResult<StorageDescription> createStorageDescription(StorageEnumContext context, StorageAccount storageAccount, StorageAccountsInner stOps) {
    String resourceGroupName = getResourceGroupName(storageAccount.id);
    AzureDeferredResultServiceCallback<StorageAccountListKeysResultInner> handler = new Default<>(this, "Load account keys for storage: " + storageAccount.name);
    PhotonModelUtils.runInExecutor(this.executorService, () -> {
        stOps.listKeysAsync(resourceGroupName, storageAccount.name, handler);
    }, handler::failure);
    return handler.toDeferredResult().thenCompose(keys -> AzureUtils.storeKeys(getHost(), keys, context.request.endpointLink, context.parentCompute.tenantLinks)).thenApply(auth -> {
        String connectionString = String.format(STORAGE_CONNECTION_STRING, storageAccount.name, auth.customProperties.get(AZURE_STORAGE_ACCOUNT_KEY1));
        context.storageConnectionStrings.put(storageAccount.id, connectionString);
        return auth;
    }).thenApply(auth -> {
        StorageDescription storageDesc = AzureUtils.constructStorageDescription(context.parentCompute, context.request, storageAccount, auth.documentSelfLink);
        return storageDesc;
    }).thenCompose(sd -> sendWithDeferredResult(Operation.createPost(context.request.buildUri(StorageDescriptionService.FACTORY_LINK)).setBody(sd).setCompletion((o, e) -> {
        if (e != null) {
            logWarning("Unable to store storage description for storage account:[%s], reason: %s", storageAccount.name, Utils.toJsonHtml(e));
        } else {
            StorageDescription storageDescription = o.getBody(StorageDescription.class);
            context.storageDescriptionsForPatching.put(storageDescription.id, storageDescription);
        }
    }), StorageDescription.class));
}
Also used : StorageAccountListKeysResultInner(com.microsoft.azure.management.storage.implementation.StorageAccountListKeysResultInner) 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) Default(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)

Example 4 with Default

use of com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default in project photon-model by vmware.

the class AzureInstanceService method updateDiskStates.

/**
 * Update {@code computeState.diskState[i].id} with Azure Disks' VHD URI.
 */
private DeferredResult<AzureInstanceContext> updateDiskStates(AzureInstanceContext ctx) {
    if (ctx.provisionedVm == null) {
        // Do nothing.
        return DeferredResult.completed(ctx);
    }
    List<DeferredResult<Operation>> diskStateDRs = new ArrayList<>();
    // Update boot DiskState with Azure osDisk VHD URI in case of unmanaged disks and
    // disks id in case of managed disks
    {
        final OSDisk azureOsDisk = ctx.provisionedVm.storageProfile().osDisk();
        final DiskState diskStateToUpdate = new DiskState();
        diskStateToUpdate.documentSelfLink = ctx.bootDiskState.documentSelfLink;
        diskStateToUpdate.persistent = ctx.bootDiskState.persistent;
        diskStateToUpdate.regionId = ctx.provisionedVm.location();
        diskStateToUpdate.endpointLink = ctx.endpoint.documentSelfLink;
        AdapterUtils.addToEndpointLinks(diskStateToUpdate, ctx.endpoint.documentSelfLink);
        // The actual value being updated
        if (ctx.useManagedDisks()) {
            diskStateToUpdate.id = azureOsDisk.managedDisk().id();
        } else {
            diskStateToUpdate.id = AzureUtils.canonizeId(azureOsDisk.vhd().uri());
        }
        diskStateToUpdate.status = DiskService.DiskStatus.ATTACHED;
        Operation updateDiskState = Operation.createPatch(ctx.service, diskStateToUpdate.documentSelfLink).setBody(diskStateToUpdate);
        DeferredResult<Operation> updateDR = ctx.service.sendWithDeferredResult(updateDiskState).whenComplete((op, exc) -> {
            if (exc != null) {
                logSevere(() -> String.format("Updating boot DiskState [%s] with VHD URI [%s]: FAILED with %s", ctx.bootDiskState.name, diskStateToUpdate.id, Utils.toString(exc)));
            } else {
                logFine(() -> String.format("Updating boot DiskState [%s] with VHD URI [%s]: SUCCESS", ctx.bootDiskState.name, diskStateToUpdate.id));
            }
        });
        diskStateDRs.add(updateDR);
    }
    for (DataDisk azureDataDisk : ctx.provisionedVm.storageProfile().dataDisks()) {
        // Find corresponding DiskState by name
        Optional<DiskState> dataDiskOpt = ctx.dataDiskStates.stream().map(DiskState.class::cast).filter(dS -> azureDataDisk.name().equals(dS.name)).findFirst();
        Optional<DiskState> externalDiskOpt = ctx.externalDataDisks.stream().map(DiskState.class::cast).filter(dS -> azureDataDisk.name().equals(dS.name)).findFirst();
        // update disk state
        if (dataDiskOpt.isPresent()) {
            diskStateDRs.add(createDiskToUpdate(ctx, dataDiskOpt, azureDataDisk));
        } else if (externalDiskOpt.isPresent()) {
            diskStateDRs.add(createDiskToUpdate(ctx, externalDiskOpt, azureDataDisk));
        } else {
            // additional disks were created by the custom image. Will always be of
            // managed disk type. Create new disk state.
            DiskState diskStateToCreate = new DiskState();
            diskStateToCreate.id = azureDataDisk.managedDisk().id();
            diskStateToCreate.name = azureDataDisk.name();
            diskStateToCreate.regionId = ctx.provisionedVm.location();
            diskStateToCreate.customProperties = new HashMap<>();
            diskStateToCreate.customProperties.put(DISK_CONTROLLER_NUMBER, String.valueOf(azureDataDisk.lun()));
            if (azureDataDisk.managedDisk().storageAccountType() != null) {
                diskStateToCreate.customProperties.put(AZURE_MANAGED_DISK_TYPE, azureDataDisk.managedDisk().storageAccountType().toString());
            } else {
                // set to Standard_LRS default
                diskStateToCreate.customProperties.put(AZURE_MANAGED_DISK_TYPE, StorageAccountTypes.STANDARD_LRS.toString());
            }
            diskStateToCreate.customProperties.put(AZURE_DATA_DISK_CACHING, azureDataDisk.caching().toString());
            if (azureDataDisk.diskSizeGB() != null) {
                diskStateToCreate.capacityMBytes = azureDataDisk.diskSizeGB() * 1024;
            }
            diskStateToCreate.status = DiskService.DiskStatus.ATTACHED;
            diskStateToCreate.persistent = ctx.bootDiskState.persistent;
            diskStateToCreate.endpointLink = ctx.endpoint.documentSelfLink;
            AdapterUtils.addToEndpointLinks(diskStateToCreate, ctx.endpoint.documentSelfLink);
            Operation createDiskState = Operation.createPost(ctx.service, DiskService.FACTORY_LINK).setBody(diskStateToCreate);
            DeferredResult<Operation> createDR = ctx.service.sendWithDeferredResult(createDiskState).whenComplete((op, exc) -> {
                if (exc != null) {
                    logSevere(() -> String.format("Creating data DiskState [%s] with disk id [%s]: FAILED " + "with %s", azureDataDisk.name(), azureDataDisk.managedDisk().id(), Utils.toString(exc)));
                } else {
                    logFine(() -> String.format("Creating data DiskState [%s] with disk id [%s]: SUCCESS", azureDataDisk.name(), azureDataDisk.managedDisk().id()));
                    // update compute state with data disks present on custom image
                    ComputeState cs = new ComputeState();
                    List<String> disksLinks = new ArrayList<>();
                    DiskState diskState = op.getBody(DiskState.class);
                    disksLinks.add(diskState.documentSelfLink);
                    cs.diskLinks = disksLinks;
                    Operation.CompletionHandler completionHandler = (ox, ex) -> {
                        if (ex != null) {
                            handleError(ctx, ex);
                            return;
                        }
                    };
                    sendRequest(Operation.createPatch(ctx.computeRequest.resourceReference).setBody(cs).setCompletion(completionHandler));
                }
            });
            diskStateDRs.add(createDR);
        }
    }
    return DeferredResult.allOf(diskStateDRs).thenApply(ignored -> ctx);
}
Also used : VirtualMachine(com.microsoft.azure.management.compute.VirtualMachine) NetworkManagementClientImpl(com.microsoft.azure.management.network.implementation.NetworkManagementClientImpl) PROVISIONING_STATE_SUCCEEDED(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.PROVISIONING_STATE_SUCCEEDED) ComputeManager(com.microsoft.azure.management.compute.implementation.ComputeManager) IpAssignment(com.vmware.photon.controller.model.resources.NetworkInterfaceDescriptionService.IpAssignment) VirtualNetworkInner(com.microsoft.azure.management.network.implementation.VirtualNetworkInner) LifecycleState(com.vmware.photon.controller.model.resources.ComputeService.LifecycleState) COMPUTE_NAMESPACE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.COMPUTE_NAMESPACE) DISK_CONTROLLER_NUMBER(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.DISK_CONTROLLER_NUMBER) StorageManagementClientImpl(com.microsoft.azure.management.storage.implementation.StorageManagementClientImpl) AzureDiagnosticSettings(com.vmware.photon.controller.model.adapters.azure.model.diagnostics.AzureDiagnosticSettings) INVALID_RESOURCE_GROUP(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.INVALID_RESOURCE_GROUP) Utils(com.vmware.xenon.common.Utils) Map(java.util.Map) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) ProvisioningState(com.microsoft.azure.management.storage.ProvisioningState) OSDisk(com.microsoft.azure.management.compute.OSDisk) AZURE_STORAGE_ACCOUNT_KEY1(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_ACCOUNT_KEY1) ProviderInner(com.microsoft.azure.management.resources.implementation.ProviderInner) CachingTypes(com.microsoft.azure.management.compute.CachingTypes) Indexable(com.microsoft.azure.management.resources.fluentcore.model.Indexable) StorageAccountListKeysResultInner(com.microsoft.azure.management.storage.implementation.StorageAccountListKeysResultInner) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) StatelessService(com.vmware.xenon.common.StatelessService) AZURE_STORAGE_ACCOUNT_DEFAULT_RG_NAME(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_ACCOUNT_DEFAULT_RG_NAME) Disk(com.microsoft.azure.management.compute.Disk) AzureProvisioningCallback(com.vmware.photon.controller.model.adapters.azure.utils.AzureProvisioningCallback) CompletionStage(java.util.concurrent.CompletionStage) AzureSecurityGroupUtils(com.vmware.photon.controller.model.adapters.azure.utils.AzureSecurityGroupUtils) StorageAccountTypes(com.microsoft.azure.management.compute.StorageAccountTypes) SkuInner(com.microsoft.azure.management.storage.implementation.SkuInner) StorageDescriptionService(com.vmware.photon.controller.model.resources.StorageDescriptionService) DeferredResult(com.vmware.xenon.common.DeferredResult) UriUtils(com.vmware.xenon.common.UriUtils) STATUS_CODE_UNAUTHORIZED(com.vmware.xenon.common.Operation.STATUS_CODE_UNAUTHORIZED) InvalidKeyException(java.security.InvalidKeyException) StorageAccountCreateParametersInner(com.microsoft.azure.management.storage.implementation.StorageAccountCreateParametersInner) DiskCreateOptionTypes(com.microsoft.azure.management.compute.DiskCreateOptionTypes) ResourceGroupsInner(com.microsoft.azure.management.resources.implementation.ResourceGroupsInner) AzureProvisioningCallbackWithRetry(com.vmware.photon.controller.model.adapters.azure.utils.AzureProvisioningCallbackWithRetry) AZURE_DATA_DISK_CACHING(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_DATA_DISK_CACHING) INVALID_PARAMETER(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.INVALID_PARAMETER) STORAGE_ACCOUNT_ALREADY_EXIST(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.STORAGE_ACCOUNT_ALREADY_EXIST) VirtualNetworksInner(com.microsoft.azure.management.network.implementation.VirtualNetworksInner) ImageReferenceInner(com.microsoft.azure.management.compute.implementation.ImageReferenceInner) OperationContext(com.vmware.xenon.common.OperationContext) PROVISIONING_STATE_FAILED_NO_SUBNET(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.PROVISIONING_STATE_FAILED_NO_SUBNET) ComputeDescriptionService(com.vmware.photon.controller.model.resources.ComputeDescriptionService) ArrayList(java.util.ArrayList) OSProfile(com.microsoft.azure.management.compute.OSProfile) ComputeInstanceRequest(com.vmware.photon.controller.model.adapterapi.ComputeInstanceRequest) SecurityGroupState(com.vmware.photon.controller.model.resources.SecurityGroupService.SecurityGroupState) StorageException(com.microsoft.azure.storage.StorageException) AzureAsyncCallback(com.vmware.photon.controller.model.adapters.azure.AzureAsyncCallback) AzureImageSource(com.vmware.photon.controller.model.adapters.azure.instance.AzureInstanceContext.AzureImageSource) MISSING_SUBSCRIPTION_CODE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.MISSING_SUBSCRIPTION_CODE) StorageProfile(com.microsoft.azure.management.compute.StorageProfile) CloudBlobContainer(com.microsoft.azure.storage.blob.CloudBlobContainer) BiConsumer(java.util.function.BiConsumer) CloudPageBlob(com.microsoft.azure.storage.blob.CloudPageBlob) OperationStatusResponseInner(com.microsoft.azure.management.compute.implementation.OperationStatusResponseInner) VirtualMachineInner(com.microsoft.azure.management.compute.implementation.VirtualMachineInner) PublicIPAddressInner(com.microsoft.azure.management.network.implementation.PublicIPAddressInner) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) ServiceErrorResponse(com.vmware.xenon.common.ServiceErrorResponse) DataDisk(com.microsoft.azure.management.compute.DataDisk) ServiceCallback(com.microsoft.rest.ServiceCallback) STORAGE_NAMESPACE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.STORAGE_NAMESPACE) SubnetInner(com.microsoft.azure.management.network.implementation.SubnetInner) ImageSource(com.vmware.photon.controller.model.adapters.util.instance.BaseComputeInstanceContext.ImageSource) File(java.io.File) ManagedDiskParametersInner(com.microsoft.azure.management.compute.implementation.ManagedDiskParametersInner) NETWORK_NAMESPACE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.NETWORK_NAMESPACE) AzureUtils.getStorageAccountKeyName(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils.getStorageAccountKeyName) ApplicationTokenCredentials(com.microsoft.azure.credentials.ApplicationTokenCredentials) PhotonModelUriUtils.createInventoryUri(com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri) AuthCredentialsServiceState(com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState) IPAllocationMethod(com.microsoft.azure.management.network.IPAllocationMethod) CloudError(com.microsoft.azure.CloudError) HardwareProfile(com.microsoft.azure.management.compute.HardwareProfile) AzureNicContext(com.vmware.photon.controller.model.adapters.azure.instance.AzureInstanceContext.AzureNicContext) URISyntaxException(java.net.URISyntaxException) NetworkProfile(com.microsoft.azure.management.compute.NetworkProfile) VirtualMachineImageResourceInner(com.microsoft.azure.management.compute.implementation.VirtualMachineImageResourceInner) AzureUriPaths(com.vmware.photon.controller.model.adapters.azure.AzureUriPaths) SubscriptionInner(com.microsoft.azure.management.resources.implementation.SubscriptionInner) AZURE_MANAGED_DISK_TYPE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_MANAGED_DISK_TYPE) ComputeType(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription.ComputeType) Creatable(com.microsoft.azure.management.resources.fluentcore.model.Creatable) AzureSdkClients(com.vmware.photon.controller.model.adapters.azure.utils.AzureSdkClients) ResourceManagementClientImpl(com.microsoft.azure.management.resources.implementation.ResourceManagementClientImpl) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) URI(java.net.URI) AzureConstants(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants) AvailabilitySet(com.microsoft.azure.management.compute.AvailabilitySet) ComputeDescription(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription) SkuName(com.microsoft.azure.management.storage.SkuName) AddressSpace(com.microsoft.azure.management.network.AddressSpace) COMPUTER_NAME(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.COMPUTER_NAME) Predicate(java.util.function.Predicate) Collection(java.util.Collection) DiskConfiguration(com.vmware.photon.controller.model.resources.ImageService.ImageState.DiskConfiguration) AvailabilitySetInner(com.microsoft.azure.management.compute.implementation.AvailabilitySetInner) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) CloudStorageAccount(com.microsoft.azure.storage.CloudStorageAccount) InstanceRequestType(com.vmware.photon.controller.model.adapterapi.ComputeInstanceRequest.InstanceRequestType) Collectors(java.util.stream.Collectors) Base64(java.util.Base64) List(java.util.List) VirtualHardDisk(com.microsoft.azure.management.compute.VirtualHardDisk) AzureUtils(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils) NetworkSecurityGroupsInner(com.microsoft.azure.management.network.implementation.NetworkSecurityGroupsInner) NetworkInterfacesInner(com.microsoft.azure.management.network.implementation.NetworkInterfacesInner) Optional(java.util.Optional) NetworkSecurityGroupInner(com.microsoft.azure.management.network.implementation.NetworkSecurityGroupInner) DiskService(com.vmware.photon.controller.model.resources.DiskService) UnsupportedEncodingException(java.io.UnsupportedEncodingException) Default(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default) SubResource(com.microsoft.azure.SubResource) AZURE_OSDISK_CACHING(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_OSDISK_CACHING) ResourceGroupInner(com.microsoft.azure.management.resources.implementation.ResourceGroupInner) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Region(com.microsoft.azure.management.resources.fluentcore.arm.Region) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) AzureDeferredResultServiceCallbackWithRetry(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallbackWithRetry) VirtualMachineSizeTypes(com.microsoft.azure.management.compute.VirtualMachineSizeTypes) SubscriptionClientImpl(com.microsoft.azure.management.resources.implementation.SubscriptionClientImpl) Kind(com.microsoft.azure.management.storage.Kind) Level(java.util.logging.Level) FileUtils(com.vmware.xenon.common.FileUtils) AZURE_STORAGE_ACCOUNT_RG_NAME(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_ACCOUNT_RG_NAME) AuthCredentialsService(com.vmware.xenon.services.common.AuthCredentialsService) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) PublicIPAddressesInner(com.microsoft.azure.management.network.implementation.PublicIPAddressesInner) STORAGE_CONNECTION_STRING(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.STORAGE_CONNECTION_STRING) AzureDecommissionCallback(com.vmware.photon.controller.model.adapters.azure.utils.AzureDecommissionCallback) ComputeManagementClientImpl(com.microsoft.azure.management.compute.implementation.ComputeManagementClientImpl) NetworkInterfaceIPConfigurationInner(com.microsoft.azure.management.network.implementation.NetworkInterfaceIPConfigurationInner) EncryptionUtils(com.vmware.photon.controller.model.security.util.EncryptionUtils) CloudBlobClient(com.microsoft.azure.storage.blob.CloudBlobClient) Operation(com.vmware.xenon.common.Operation) AvailabilitySetSkuTypes(com.microsoft.azure.management.compute.AvailabilitySetSkuTypes) StorageAccountKey(com.microsoft.azure.management.storage.StorageAccountKey) BaseAdapterStage(com.vmware.photon.controller.model.adapters.util.BaseAdapterContext.BaseAdapterStage) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) NetworkInterfaceReferenceInner(com.microsoft.azure.management.compute.implementation.NetworkInterfaceReferenceInner) AzureDeferredResultServiceCallback(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback) AZURE_STORAGE_ACCOUNT_NAME(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_ACCOUNT_NAME) CloudException(com.microsoft.azure.CloudException) ImageState(com.vmware.photon.controller.model.resources.ImageService.ImageState) StorageAccountInner(com.microsoft.azure.management.storage.implementation.StorageAccountInner) NetworkInterfaceDescription(com.vmware.photon.controller.model.resources.NetworkInterfaceDescriptionService.NetworkInterfaceDescription) NetworkInterfaceInner(com.microsoft.azure.management.network.implementation.NetworkInterfaceInner) CLOUD_CONFIG_DEFAULT_FILE_INDEX(com.vmware.photon.controller.model.constants.PhotonModelConstants.CLOUD_CONFIG_DEFAULT_FILE_INDEX) Collections(java.util.Collections) OperationJoin(com.vmware.xenon.common.OperationJoin) RESOURCE_GROUP_NAME(com.vmware.photon.controller.model.ComputeProperties.RESOURCE_GROUP_NAME) PROVIDER_REGISTRED_STATE(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.PROVIDER_REGISTRED_STATE) OSDisk(com.microsoft.azure.management.compute.OSDisk) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) HashMap(java.util.HashMap) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) ArrayList(java.util.ArrayList) Operation(com.vmware.xenon.common.Operation) DataDisk(com.microsoft.azure.management.compute.DataDisk) ArrayList(java.util.ArrayList) List(java.util.List) DeferredResult(com.vmware.xenon.common.DeferredResult)

Example 5 with Default

use of com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default in project photon-model by vmware.

the class AzureStorageEnumerationAdapterService method createInternalTypeTags.

private void createInternalTypeTags(StorageEnumContext context, StorageEnumStages next) {
    TagState blobTypeTag = newTagState(TAG_KEY_TYPE, AzureResourceType.azure_blob.name(), false, context.parentCompute.tenantLinks);
    TagState vhdTypeTag = newTagState(TAG_KEY_TYPE, AzureResourceType.azure_vhd.name(), false, context.parentCompute.tenantLinks);
    Collection<Operation> opCollection = new ArrayList<>();
    Operation blobTypeTagOp = Operation.createPost(getHost(), TagService.FACTORY_LINK).setBody(blobTypeTag);
    opCollection.add(blobTypeTagOp);
    Operation vhdTypeTagOp = Operation.createPost(getHost(), TagService.FACTORY_LINK).setBody(vhdTypeTag);
    opCollection.add(vhdTypeTagOp);
    OperationJoin.create(opCollection).setCompletion((ops, exs) -> {
        if (exs != null) {
            exs.values().forEach(ex -> logWarning(() -> String.format("Error: %s", ex.getMessage())));
        } else {
            for (Operation taskOp : ops.values()) {
                TagState state = taskOp.getBody(TagState.class);
                if (EnumUtils.isValidEnum(AzureResourceType.class, state.value)) {
                    switch(AzureResourceType.valueOf(state.value)) {
                        case azure_vhd:
                            context.internalVhdTypeTag = vhdTypeTag.documentSelfLink;
                            break;
                        case azure_blob:
                            context.internalBlobTypeTag = blobTypeTag.documentSelfLink;
                            break;
                        default:
                            break;
                    }
                }
            }
        }
        context.subStage = next;
        handleSubStage(context);
    }).sendWith(this);
}
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) AzureResourceType(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AzureResourceType) ArrayList(java.util.ArrayList) Operation(com.vmware.xenon.common.Operation) TagState(com.vmware.photon.controller.model.resources.TagService.TagState) TagsUtil.newTagState(com.vmware.photon.controller.model.adapters.util.TagsUtil.newTagState)

Aggregations

Default (com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default)9 ArrayList (java.util.ArrayList)6 List (java.util.List)6 AzureUriPaths (com.vmware.photon.controller.model.adapters.azure.AzureUriPaths)5 AzureConstants (com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants)5 AzureDeferredResultServiceCallback (com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback)5 AzureSdkClients (com.vmware.photon.controller.model.adapters.azure.utils.AzureSdkClients)5 AzureUtils (com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils)5 AdapterUtils (com.vmware.photon.controller.model.adapters.util.AdapterUtils)5 DiskService (com.vmware.photon.controller.model.resources.DiskService)5 DiskState (com.vmware.photon.controller.model.resources.DiskService.DiskState)5 StorageDescription (com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription)5 PhotonModelUriUtils.createInventoryUri (com.vmware.photon.controller.model.util.PhotonModelUriUtils.createInventoryUri)5 DeferredResult (com.vmware.xenon.common.DeferredResult)5 Operation (com.vmware.xenon.common.Operation)5 OperationJoin (com.vmware.xenon.common.OperationJoin)5 StatelessService (com.vmware.xenon.common.StatelessService)5 UriUtils (com.vmware.xenon.common.UriUtils)5 Utils (com.vmware.xenon.common.Utils)5 AuthCredentialsService (com.vmware.xenon.services.common.AuthCredentialsService)5