Search in sources :

Example 16 with Operation

use of com.vmware.xenon.common.Operation in project photon-model by vmware.

the class AWSInstanceContext method getInstanceTypeInfo.

private DeferredResult<AWSInstanceContext> getInstanceTypeInfo(AWSInstanceContext context) {
    String instanceType = context.child.description.instanceType;
    if (instanceType == null) {
        instanceType = context.child.description.name;
    }
    if (instanceType == null) {
        String msg = String.format("AWS Instance type not specified for [%s] VM.", context.child.name);
        return DeferredResult.failed(new IllegalStateException(msg));
    }
    URI instanceTypeServiceURI = UriUtils.buildUri(context.service.getHost(), AWSInstanceTypeService.SELF_LINK);
    instanceTypeServiceURI = UriUtils.appendQueryParam(instanceTypeServiceURI, URI_PARAM_ENDPOINT, context.child.endpointLink);
    instanceTypeServiceURI = UriUtils.appendQueryParam(instanceTypeServiceURI, URI_PARAM_INSTANCE_TYPE, instanceType);
    Operation op = Operation.createGet(instanceTypeServiceURI).setReferer(context.service.getHost().getUri());
    DeferredResult<InstanceType> dr = context.service.sendWithDeferredResult(op, InstanceType.class);
    return dr.thenAccept(type -> {
        context.instanceTypeInfo = type;
    }).handle((all, err) -> {
        if (err != null) {
            String msg = String.format("Error getting instance-type info for [%s] VM. Reason [%s]", context.child.name, err.getMessage());
            throw new IllegalStateException(msg, err);
        }
        return context;
    });
}
Also used : InstanceNetworkInterfaceSpecification(com.amazonaws.services.ec2.model.InstanceNetworkInterfaceSpecification) DescribeSubnetsRequest(com.amazonaws.services.ec2.model.DescribeSubnetsRequest) DescribeVpcsRequest(com.amazonaws.services.ec2.model.DescribeVpcsRequest) CREATE_CONTEXT_PROP_NAME(com.vmware.photon.controller.model.ComputeProperties.CREATE_CONTEXT_PROP_NAME) Function(java.util.function.Function) CreateSubnetResult(com.amazonaws.services.ec2.model.CreateSubnetResult) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) DescribeSubnetsResult(com.amazonaws.services.ec2.model.DescribeSubnetsResult) ComputeInstanceRequest(com.vmware.photon.controller.model.adapterapi.ComputeInstanceRequest) SecurityGroupState(com.vmware.photon.controller.model.resources.SecurityGroupService.SecurityGroupState) HashSet(java.util.HashSet) AWSSecurityGroupClient(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSSecurityGroupClient) DescribeVpcsResult(com.amazonaws.services.ec2.model.DescribeVpcsResult) URI_PARAM_INSTANCE_TYPE(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.URI_PARAM_INSTANCE_TYPE) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState) Filter(com.amazonaws.services.ec2.model.Filter) Collections.singletonMap(java.util.Collections.singletonMap) URI(java.net.URI) Subnet(com.amazonaws.services.ec2.model.Subnet) StatelessService(com.vmware.xenon.common.StatelessService) AWS_TAG_NAME(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_TAG_NAME) Vpc(com.amazonaws.services.ec2.model.Vpc) Collection(java.util.Collection) Operation(com.vmware.xenon.common.Operation) Set(java.util.Set) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Collectors(java.util.stream.Collectors) AWS_VPC_ID_FILTER(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_VPC_ID_FILTER) URI_PARAM_ENDPOINT(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.URI_PARAM_ENDPOINT) InstanceType(com.vmware.photon.controller.model.support.InstanceTypeList.InstanceType) List(java.util.List) BaseComputeInstanceContext(com.vmware.photon.controller.model.adapters.util.instance.BaseComputeInstanceContext) AWS_SUBNET_ID_FILTER(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_SUBNET_ID_FILTER) Tag(com.amazonaws.services.ec2.model.Tag) DeferredResult(com.vmware.xenon.common.DeferredResult) UriUtils(com.vmware.xenon.common.UriUtils) DiskService(com.vmware.photon.controller.model.resources.DiskService) AWSDeferredResultAsyncHandler(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSDeferredResultAsyncHandler) CreateSubnetRequest(com.amazonaws.services.ec2.model.CreateSubnetRequest) AmazonEC2AsyncClient(com.amazonaws.services.ec2.AmazonEC2AsyncClient) Operation(com.vmware.xenon.common.Operation) InstanceType(com.vmware.photon.controller.model.support.InstanceTypeList.InstanceType) URI(java.net.URI)

Example 17 with Operation

use of com.vmware.xenon.common.Operation in project photon-model by vmware.

the class AWSInstanceContext method createSubnetsIfNotExist.

/**
 * For every NIC create AWS Subnet (as specified by {@code AWSNicContext.subnetState}) if it
 * does not exist.
 *
 * @see #getSubnets(AWSInstanceContext)
 */
private DeferredResult<AWSInstanceContext> createSubnetsIfNotExist(AWSInstanceContext context) {
    if (context.nics.isEmpty()) {
        return DeferredResult.completed(context);
    }
    List<DeferredResult<Void>> createSubnetDRs = new ArrayList<>();
    for (AWSNicContext nicCtx : context.nics) {
        if (nicCtx.subnet != null) {
            // No need to create
            continue;
        }
        // Create AWS subnet and set it to nicCtx.subnet {{
        CreateSubnetRequest subnetRequest = new CreateSubnetRequest().withVpcId(nicCtx.vpc.getVpcId()).withCidrBlock(nicCtx.subnetState.subnetCIDR);
        if (nicCtx.subnetState.zoneId != null) {
            subnetRequest.withAvailabilityZone(nicCtx.subnetState.zoneId);
        }
        String msg = "Create AWS subnet + [" + nicCtx.subnetState.name + "]";
        AWSDeferredResultAsyncHandler<CreateSubnetRequest, CreateSubnetResult> createAWSSubnet = new AWSDeferredResultAsyncHandler<CreateSubnetRequest, CreateSubnetResult>(this.service, msg) {

            @Override
            protected DeferredResult<CreateSubnetResult> consumeSuccess(CreateSubnetRequest request, CreateSubnetResult result) {
                nicCtx.subnet = result.getSubnet();
                AWSUtils.tagResourcesWithName(context.amazonEC2Client, nicCtx.subnetState.name, nicCtx.subnet.getSubnetId());
                return DeferredResult.completed(result);
            }
        };
        context.amazonEC2Client.createSubnetAsync(subnetRequest, createAWSSubnet);
        // }}
        // Once AWS subnet creation is done PATCH SubnetState.id {{
        Function<CreateSubnetResult, DeferredResult<Void>> patchSubnetState = (ignore) -> {
            SubnetState patchSubnet = new SubnetState();
            patchSubnet.id = nicCtx.subnet.getSubnetId();
            patchSubnet.documentSelfLink = nicCtx.subnetState.documentSelfLink;
            patchSubnet.customProperties = singletonMap(CREATE_CONTEXT_PROP_NAME, context.computeRequest.resourceLink());
            Operation op = Operation.createPatch(context.service.getHost(), patchSubnet.documentSelfLink).setBody(patchSubnet);
            return context.service.sendWithDeferredResult(op, SubnetState.class).thenAccept(patchedSubnet -> nicCtx.subnetState = patchedSubnet);
        };
        // }}
        // Chain AWS subnet creation with SubnetState patching
        createSubnetDRs.add(createAWSSubnet.toDeferredResult().thenCompose(patchSubnetState));
    }
    return DeferredResult.allOf(createSubnetDRs).handle((all, exc) -> {
        if (exc != null) {
            String msg = String.format("Error creating Subnets in AWS for [%s] VM.", context.child.name);
            throw new IllegalStateException(msg, exc);
        }
        return context;
    });
}
Also used : InstanceNetworkInterfaceSpecification(com.amazonaws.services.ec2.model.InstanceNetworkInterfaceSpecification) DescribeSubnetsRequest(com.amazonaws.services.ec2.model.DescribeSubnetsRequest) DescribeVpcsRequest(com.amazonaws.services.ec2.model.DescribeVpcsRequest) CREATE_CONTEXT_PROP_NAME(com.vmware.photon.controller.model.ComputeProperties.CREATE_CONTEXT_PROP_NAME) Function(java.util.function.Function) CreateSubnetResult(com.amazonaws.services.ec2.model.CreateSubnetResult) Collections.singletonList(java.util.Collections.singletonList) ArrayList(java.util.ArrayList) DescribeSubnetsResult(com.amazonaws.services.ec2.model.DescribeSubnetsResult) ComputeInstanceRequest(com.vmware.photon.controller.model.adapterapi.ComputeInstanceRequest) SecurityGroupState(com.vmware.photon.controller.model.resources.SecurityGroupService.SecurityGroupState) HashSet(java.util.HashSet) AWSSecurityGroupClient(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSSecurityGroupClient) DescribeVpcsResult(com.amazonaws.services.ec2.model.DescribeVpcsResult) URI_PARAM_INSTANCE_TYPE(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.URI_PARAM_INSTANCE_TYPE) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState) Filter(com.amazonaws.services.ec2.model.Filter) Collections.singletonMap(java.util.Collections.singletonMap) URI(java.net.URI) Subnet(com.amazonaws.services.ec2.model.Subnet) StatelessService(com.vmware.xenon.common.StatelessService) AWS_TAG_NAME(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_TAG_NAME) Vpc(com.amazonaws.services.ec2.model.Vpc) Collection(java.util.Collection) Operation(com.vmware.xenon.common.Operation) Set(java.util.Set) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Collectors(java.util.stream.Collectors) AWS_VPC_ID_FILTER(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_VPC_ID_FILTER) URI_PARAM_ENDPOINT(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.URI_PARAM_ENDPOINT) InstanceType(com.vmware.photon.controller.model.support.InstanceTypeList.InstanceType) List(java.util.List) BaseComputeInstanceContext(com.vmware.photon.controller.model.adapters.util.instance.BaseComputeInstanceContext) AWS_SUBNET_ID_FILTER(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWS_SUBNET_ID_FILTER) Tag(com.amazonaws.services.ec2.model.Tag) DeferredResult(com.vmware.xenon.common.DeferredResult) UriUtils(com.vmware.xenon.common.UriUtils) DiskService(com.vmware.photon.controller.model.resources.DiskService) AWSDeferredResultAsyncHandler(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSDeferredResultAsyncHandler) CreateSubnetRequest(com.amazonaws.services.ec2.model.CreateSubnetRequest) AmazonEC2AsyncClient(com.amazonaws.services.ec2.AmazonEC2AsyncClient) CreateSubnetResult(com.amazonaws.services.ec2.model.CreateSubnetResult) ArrayList(java.util.ArrayList) Operation(com.vmware.xenon.common.Operation) CreateSubnetRequest(com.amazonaws.services.ec2.model.CreateSubnetRequest) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState) AWSDeferredResultAsyncHandler(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSDeferredResultAsyncHandler) DeferredResult(com.vmware.xenon.common.DeferredResult)

Example 18 with Operation

use of com.vmware.xenon.common.Operation in project photon-model by vmware.

the class AWSLoadBalancerService method provisionSecurityGroup.

private DeferredResult<AWSLoadBalancerContext> provisionSecurityGroup(AWSLoadBalancerContext context) {
    SecurityGroupInstanceRequest req = buildSecurityGroupInstanceRequest(context.provisionedSecurityGroupState, InstanceRequestType.CREATE, context);
    Operation operation = Operation.createPatch(this, AWSSecurityGroupService.SELF_LINK).setBody(req);
    return sendWithDeferredResult(operation, SecurityGroupState.class).thenApply(sgs -> {
        context.provisionedSecurityGroupState = sgs;
        return context;
    });
}
Also used : SecurityGroupInstanceRequest(com.vmware.photon.controller.model.adapterapi.SecurityGroupInstanceRequest) SecurityGroupState(com.vmware.photon.controller.model.resources.SecurityGroupService.SecurityGroupState) Operation(com.vmware.xenon.common.Operation)

Example 19 with Operation

use of com.vmware.xenon.common.Operation in project photon-model by vmware.

the class AWSLoadBalancerService method updateLoadBalancerState.

private DeferredResult<AWSLoadBalancerContext> updateLoadBalancerState(AWSLoadBalancerContext context) {
    LoadBalancerState loadBalancerState = new LoadBalancerState();
    loadBalancerState.address = context.loadBalancerStateExpanded.address;
    loadBalancerState.name = context.loadBalancerStateExpanded.name;
    if (context.provisionedSecurityGroupState != null) {
        loadBalancerState.securityGroupLinks = Collections.singletonList(context.provisionedSecurityGroupState.documentSelfLink);
    }
    Operation op = Operation.createPatch(this, context.loadBalancerStateExpanded.documentSelfLink);
    op.setBody(loadBalancerState);
    return this.sendWithDeferredResult(op).thenApply(ignore -> context);
}
Also used : Operation(com.vmware.xenon.common.Operation) LoadBalancerState(com.vmware.photon.controller.model.resources.LoadBalancerService.LoadBalancerState)

Example 20 with Operation

use of com.vmware.xenon.common.Operation in project photon-model by vmware.

the class AzureComputeEnumerationAdapterService method collectRegions.

private void collectRegions(EnumerationContext ctx, ComputeEnumerationSubStages next) {
    Operation getEndpoint = Operation.createGet(this, ctx.request.endpointLink);
    DeferredResult<EndpointState> getEndpointDR = sendWithDeferredResult(getEndpoint, EndpointState.class);
    getEndpointDR.thenCompose(endpoint -> {
        Operation getRegions = Operation.createPost(this, AzureRegionEnumerationAdapterService.SELF_LINK).setBody(endpoint);
        return sendWithDeferredResult(getRegions, RegionEnumerationResponse.class);
    }).whenComplete((regionsResponse, e) -> {
        if (e != null) {
            logWarning("Resource enumeration failed at stage %s with exception %s", ctx.stage, Utils.toString(e));
            handleError(ctx, e);
        } else {
            ctx.regions.putAll(regionsResponse.regions.stream().collect(Collectors.toMap(r -> r.regionId, r -> r)));
            ctx.regionIds.addAll(ctx.regions.keySet());
            ctx.subStage = next;
            handleSubStage(ctx);
        }
    });
}
Also used : EndpointState(com.vmware.photon.controller.model.resources.EndpointService.EndpointState) PowerState(com.vmware.photon.controller.model.resources.ComputeService.PowerState) Arrays(java.util.Arrays) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) ServiceTypeCluster(com.vmware.photon.controller.model.util.ClusterUtil.ServiceTypeCluster) LifecycleState(com.vmware.photon.controller.model.resources.ComputeService.LifecycleState) DISK_CONTROLLER_NUMBER(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.DISK_CONTROLLER_NUMBER) Action1(rx.functions.Action1) StringUtils(org.apache.commons.lang3.StringUtils) Azure(com.microsoft.azure.management.Azure) Utils(com.vmware.xenon.common.Utils) Pair(org.apache.commons.lang3.tuple.Pair) SubnetState(com.vmware.photon.controller.model.resources.SubnetService.SubnetState) Map(java.util.Map) StorageDescription(com.vmware.photon.controller.model.resources.StorageDescriptionService.StorageDescription) OSDisk(com.microsoft.azure.management.compute.OSDisk) ResourceEnumerationTaskService(com.vmware.photon.controller.model.tasks.ResourceEnumerationTaskService) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) StatelessService(com.vmware.xenon.common.StatelessService) Set(java.util.Set) NetworkInterfaceService(com.vmware.photon.controller.model.resources.NetworkInterfaceService) StorageAccountTypes(com.microsoft.azure.management.compute.StorageAccountTypes) TagService(com.vmware.photon.controller.model.resources.TagService) CompletionHandler(com.vmware.xenon.common.Operation.CompletionHandler) SOURCE_TASK_LINK(com.vmware.photon.controller.model.constants.PhotonModelConstants.SOURCE_TASK_LINK) InstanceViewStatus(com.microsoft.azure.management.compute.InstanceViewStatus) DeferredResult(com.vmware.xenon.common.DeferredResult) UriUtils(com.vmware.xenon.common.UriUtils) ComputeService(com.vmware.photon.controller.model.resources.ComputeService) NumericRange(com.vmware.xenon.services.common.QueryTask.NumericRange) AZURE_DATA_DISK_CACHING(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_DATA_DISK_CACHING) ImageReferenceInner(com.microsoft.azure.management.compute.implementation.ImageReferenceInner) VirtualMachinesInner(com.microsoft.azure.management.compute.implementation.VirtualMachinesInner) ComputeDescriptionService(com.vmware.photon.controller.model.resources.ComputeDescriptionService) PhotonModelUtils(com.vmware.photon.controller.model.resources.util.PhotonModelUtils) RegionInfo(com.vmware.photon.controller.model.adapterapi.RegionEnumerationResponse.RegionInfo) TagsUtil(com.vmware.photon.controller.model.adapters.util.TagsUtil) ArrayList(java.util.ArrayList) TagState(com.vmware.photon.controller.model.resources.TagService.TagState) ServiceStateCollectionUpdateRequest(com.vmware.xenon.common.ServiceStateCollectionUpdateRequest) Query(com.vmware.xenon.services.common.QueryTask.Query) EnumerationStages(com.vmware.photon.controller.model.adapters.util.enums.EnumerationStages) OperatingSystemTypes(com.microsoft.azure.management.compute.OperatingSystemTypes) BiConsumer(java.util.function.BiConsumer) AZURE_DIAGNOSTIC_STORAGE_ACCOUNT_LINK(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_DIAGNOSTIC_STORAGE_ACCOUNT_LINK) AZURE_STORAGE_ACCOUNT_URI(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_STORAGE_ACCOUNT_URI) VirtualMachineInner(com.microsoft.azure.management.compute.implementation.VirtualMachineInner) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) DataDisk(com.microsoft.azure.management.compute.DataDisk) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) ENVIRONMENT_NAME_AZURE(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription.ENVIRONMENT_NAME_AZURE) QueryTop(com.vmware.photon.controller.model.query.QueryUtils.QueryTop) CUSTOM_OS_TYPE(com.vmware.photon.controller.model.ComputeProperties.CUSTOM_OS_TYPE) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) PhotonModelConstants(com.vmware.photon.controller.model.constants.PhotonModelConstants) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) RegionEnumerationResponse(com.vmware.photon.controller.model.adapterapi.RegionEnumerationResponse) 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) QueryTask(com.vmware.xenon.services.common.QueryTask) AZURE_RESOURCE_GROUP_NAME(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_RESOURCE_GROUP_NAME) OSType(com.vmware.photon.controller.model.ComputeProperties.OSType) AzureUriPaths(com.vmware.photon.controller.model.adapters.azure.AzureUriPaths) 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) AzureSdkClients(com.vmware.photon.controller.model.adapters.azure.utils.AzureSdkClients) AzureUtils.injectOperationContext(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils.injectOperationContext) 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) EndpointState(com.vmware.photon.controller.model.resources.EndpointService.EndpointState) AzureConstants(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants) AzureConstants.getQueryResultLimit(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.getQueryResultLimit) ComputeDescription(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Occurance(com.vmware.xenon.services.common.QueryTask.Query.Occurance) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) 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) Entry(java.util.Map.Entry) NetworkInterfacesInner(com.microsoft.azure.management.network.implementation.NetworkInterfacesInner) QueryOption(com.vmware.xenon.services.common.QueryTask.QuerySpecification.QueryOption) InstanceViewTypes(com.microsoft.azure.management.compute.InstanceViewTypes) TagsUtil.setTagLinksToResourceState(com.vmware.photon.controller.model.adapters.util.TagsUtil.setTagLinksToResourceState) Builder(com.vmware.xenon.services.common.QueryTask.Query.Builder) DiskService(com.vmware.photon.controller.model.resources.DiskService) AzureUtils.isDiskManaged(com.vmware.photon.controller.model.adapters.azure.utils.AzureUtils.isDiskManaged) Default(com.vmware.photon.controller.model.adapters.azure.utils.AzureDeferredResultServiceCallback.Default) QueryByPages(com.vmware.photon.controller.model.query.QueryUtils.QueryByPages) AZURE_OSDISK_CACHING(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AZURE_OSDISK_CACHING) PublicIPAddress(com.microsoft.azure.management.network.PublicIPAddress) HashMap(java.util.HashMap) HashSet(java.util.HashSet) AuthCredentialsService(com.vmware.xenon.services.common.AuthCredentialsService) TagsUtil.updateLocalTagStates(com.vmware.photon.controller.model.adapters.util.TagsUtil.updateLocalTagStates) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) AzureResourceType(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants.AzureResourceType) ExecutorService(java.util.concurrent.ExecutorService) Iterator(java.util.Iterator) NetworkInterfaceIPConfigurationInner(com.microsoft.azure.management.network.implementation.NetworkInterfaceIPConfigurationInner) Operation(com.vmware.xenon.common.Operation) Page(com.microsoft.azure.Page) 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) NetworkInterfaceInner(com.microsoft.azure.management.network.implementation.NetworkInterfaceInner) Collections(java.util.Collections) OperationJoin(com.vmware.xenon.common.OperationJoin) RESOURCE_GROUP_NAME(com.vmware.photon.controller.model.ComputeProperties.RESOURCE_GROUP_NAME) RegionEnumerationResponse(com.vmware.photon.controller.model.adapterapi.RegionEnumerationResponse) Operation(com.vmware.xenon.common.Operation)

Aggregations

Operation (com.vmware.xenon.common.Operation)391 URI (java.net.URI)142 ArrayList (java.util.ArrayList)132 QueryTask (com.vmware.xenon.services.common.QueryTask)118 List (java.util.List)118 Utils (com.vmware.xenon.common.Utils)111 StatelessService (com.vmware.xenon.common.StatelessService)108 UriUtils (com.vmware.xenon.common.UriUtils)106 ComputeState (com.vmware.photon.controller.model.resources.ComputeService.ComputeState)98 Map (java.util.Map)92 HashMap (java.util.HashMap)90 OperationJoin (com.vmware.xenon.common.OperationJoin)86 Query (com.vmware.xenon.services.common.QueryTask.Query)86 QueryUtils (com.vmware.photon.controller.model.query.QueryUtils)82 Collectors (java.util.stream.Collectors)79 HashSet (java.util.HashSet)78 AuthCredentialsServiceState (com.vmware.xenon.services.common.AuthCredentialsService.AuthCredentialsServiceState)73 AdapterUtils (com.vmware.photon.controller.model.adapters.util.AdapterUtils)70 DeferredResult (com.vmware.xenon.common.DeferredResult)69 Consumer (java.util.function.Consumer)69