Search in sources :

Example 1 with ComputeEnumerateAdapterRequest

use of com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest in project photon-model by vmware.

the class AWSEnumerationAdapterService method kickOffEnumerationWorkFlows.

/**
 * Kicks off the enumeration flows for creation and deletion.
 */
public void kickOffEnumerationWorkFlows(EnumerationContext context, AWSEnumerationStages next) {
    List<List<Operation>> enumOperations = new ArrayList<>();
    if (!AWSUtils.isAwsClientMock()) {
        ComputeEnumerateAdapterRequest awsS3EnumerationRequest = new ComputeEnumerateAdapterRequest(context.request, context.endpointAuth, context.parent, Regions.DEFAULT_REGION.getName());
        Operation patchAWSS3StorageAdapterService = Operation.createPatch(this, AWSS3StorageEnumerationAdapterService.SELF_LINK).setBody(awsS3EnumerationRequest).setReferer(getHost().getUri());
        enumOperations.add(Collections.singletonList(patchAWSS3StorageAdapterService));
    }
    for (String regionId : context.regions) {
        List<Operation> enumOperationsForRegion = new ArrayList<>();
        ComputeEnumerateAdapterRequest awsEnumerationRequest = new ComputeEnumerateAdapterRequest(context.request, context.endpointAuth, context.parent, regionId);
        Operation patchAWSCreationAdapterService = Operation.createPatch(this, AWSEnumerationAndCreationAdapterService.SELF_LINK).setBody(awsEnumerationRequest).setReferer(this.getHost().getUri());
        Operation patchAWSDeletionAdapterService = Operation.createPatch(this, AWSEnumerationAndDeletionAdapterService.SELF_LINK).setBody(awsEnumerationRequest).setReferer(getHost().getUri());
        Operation patchAWSEBSStorageAdapterService = Operation.createPatch(this, AWSEBSStorageEnumerationAdapterService.SELF_LINK).setBody(awsEnumerationRequest).setReferer(getHost().getUri());
        enumOperationsForRegion.add(patchAWSCreationAdapterService);
        enumOperationsForRegion.add(patchAWSDeletionAdapterService);
        enumOperationsForRegion.add(patchAWSEBSStorageAdapterService);
        enumOperations.add(enumOperationsForRegion);
    }
    if (enumOperations.size() == 0) {
        logFine(() -> "No enumeration tasks to run");
        context.stage = next;
        handleEnumerationRequest(context);
        return;
    }
    OperationJoin.JoinedCompletionHandler joinCompletion = (ox, exc) -> {
        if (exc != null) {
            logSevere(() -> String.format("Error starting the enumeration workflows for AWS: %s", Utils.toString(exc)));
            context.taskManager.patchTaskToFailure(exc.values().iterator().next());
            return;
        }
        logInfo(() -> "Completed creation and deletion enumeration for compute and storage" + " states");
        context.stage = next;
        handleEnumerationRequest(context);
    };
    OperationSequence enumOp = OperationSequence.create(OperationJoin.create(enumOperations.get(0)));
    for (int i = 1; i < enumOperations.size(); i++) {
        enumOp = enumOp.next(OperationJoin.create(enumOperations.get(i)));
    }
    enumOp.setCompletion(joinCompletion);
    enumOp.sendWith(getHost());
    logFine(() -> "Started creation and deletion enumeration for AWS computes and storage");
}
Also used : AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) Arrays(java.util.Arrays) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) StatelessService(com.vmware.xenon.common.StatelessService) Operation(com.vmware.xenon.common.Operation) BaseAdapterStage(com.vmware.photon.controller.model.adapters.util.BaseAdapterContext.BaseAdapterStage) BaseAdapterContext(com.vmware.photon.controller.model.adapters.util.BaseAdapterContext) AWSUtils(com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) Regions(com.amazonaws.regions.Regions) List(java.util.List) Utils(com.vmware.xenon.common.Utils) GET_REGIONS(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSEnumerationAdapterService.AWSEnumerationStages.GET_REGIONS) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) KICKOFF_ENUMERATION(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSEnumerationAdapterService.AWSEnumerationStages.KICKOFF_ENUMERATION) OperationSequence(com.vmware.xenon.common.OperationSequence) Collections(java.util.Collections) AWSUriPaths(com.vmware.photon.controller.model.adapters.awsadapter.AWSUriPaths) OperationJoin(com.vmware.xenon.common.OperationJoin) PATCH_COMPLETION(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSEnumerationAdapterService.AWSEnumerationStages.PATCH_COMPLETION) OperationSequence(com.vmware.xenon.common.OperationSequence) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) OperationJoin(com.vmware.xenon.common.OperationJoin) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) Operation(com.vmware.xenon.common.Operation)

Example 2 with ComputeEnumerateAdapterRequest

use of com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest in project photon-model by vmware.

the class AWSEnumerationAndCreationAdapterService method refreshSecurityGroupInformation.

private void refreshSecurityGroupInformation(EnumerationCreationContext aws, AWSEnumerationRefreshSubStage next) {
    ComputeEnumerateAdapterRequest sgEnumeration = new ComputeEnumerateAdapterRequest(aws.request.original, aws.endpointAuth, aws.parentCompute, aws.request.regionId);
    Operation patchSGOperation = Operation.createPatch(this, AWSSecurityGroupEnumerationAdapterService.SELF_LINK).setBody(sgEnumeration).setReferer(UriUtils.buildUri(getHost().getPublicUri(), getSelfLink()));
    this.getHost().sendWithDeferredResult(patchSGOperation, AWSSecurityGroupEnumerationAdapterService.AWSSecurityGroupEnumerationResponse.class).thenAccept(securityGroupEnumerationResponse -> {
        logFine(() -> "Successfully enumerated security group states");
        aws.enumeratedSecurityGroups = securityGroupEnumerationResponse;
        aws.refreshSubStage = next;
        processRefreshSubStages(aws);
    }).exceptionally(throwable -> {
        if (throwable != null) {
            logWarning(() -> String.format("Failed to enumerate security groups: %s ", throwable.getLocalizedMessage()));
            aws.error = throwable;
            aws.refreshSubStage = next;
            processRefreshSubStages(aws);
        }
        return null;
    });
}
Also used : PowerState(com.vmware.photon.controller.model.resources.ComputeService.PowerState) ServiceMetadata(com.vmware.photon.controller.model.util.StartServicesHelper.ServiceMetadata) QueryTask(com.vmware.xenon.services.common.QueryTask) StringUtils(org.apache.commons.lang3.StringUtils) ComputeType(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription.ComputeType) Utils(com.vmware.xenon.common.Utils) StartServicesHelper(com.vmware.photon.controller.model.util.StartServicesHelper) DescribeInstancesRequest(com.amazonaws.services.ec2.model.DescribeInstancesRequest) Map(java.util.Map) AWSClientManager(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSClientManager) ResourceEnumerationTaskService(com.vmware.photon.controller.model.tasks.ResourceEnumerationTaskService) Reservation(com.amazonaws.services.ec2.model.Reservation) DescribeAvailabilityZonesRequest(com.amazonaws.services.ec2.model.DescribeAvailabilityZonesRequest) AWSComputeDescriptionCreationState(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSComputeDescriptionEnumerationAdapterService.AWSComputeDescriptionCreationState) ComputeDescription(com.vmware.photon.controller.model.resources.ComputeDescriptionService.ComputeDescription) NetworkInterfaceState(com.vmware.photon.controller.model.resources.NetworkInterfaceService.NetworkInterfaceState) AWSAsyncHandler(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSAsyncHandler) StatelessService(com.vmware.xenon.common.StatelessService) Collection(java.util.Collection) DescribeInstancesResult(com.amazonaws.services.ec2.model.DescribeInstancesResult) AWSNetworkEnumerationRequest(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSNetworkStateEnumerationAdapterService.AWSNetworkEnumerationRequest) Collectors(java.util.stream.Collectors) AWSConstants.getQueryPageSize(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.getQueryPageSize) List(java.util.List) Stream(java.util.stream.Stream) AWSUtils.getAWSNonTerminatedInstancesFilter(com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils.getAWSNonTerminatedInstancesFilter) SOURCE_TASK_LINK(com.vmware.photon.controller.model.constants.PhotonModelConstants.SOURCE_TASK_LINK) DeferredResult(com.vmware.xenon.common.DeferredResult) UriUtils(com.vmware.xenon.common.UriUtils) ComputeService(com.vmware.photon.controller.model.resources.ComputeService) QueryOption(com.vmware.xenon.services.common.QueryTask.QuerySpecification.QueryOption) ZoneData(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSEnumerationUtils.ZoneData) AWSLoadBalancerEnumerationRequest(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSLoadBalancerEnumerationAdapterService.AWSLoadBalancerEnumerationRequest) OperationContext(com.vmware.xenon.common.OperationContext) DescribeAvailabilityZonesResult(com.amazonaws.services.ec2.model.DescribeAvailabilityZonesResult) HashMap(java.util.HashMap) ComputeDescriptionService(com.vmware.photon.controller.model.resources.ComputeDescriptionService) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) AWSConstants(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants) ServiceStateCollectionUpdateRequest(com.vmware.xenon.common.ServiceStateCollectionUpdateRequest) AuthCredentialsService(com.vmware.xenon.services.common.AuthCredentialsService) Query(com.vmware.xenon.services.common.QueryTask.Query) ComputeState(com.vmware.photon.controller.model.resources.ComputeService.ComputeState) Filter(com.amazonaws.services.ec2.model.Filter) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) OperationSequence(com.vmware.xenon.common.OperationSequence) Instance(com.amazonaws.services.ec2.model.Instance) AWSSecurityGroupEnumerationResponse(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSSecurityGroupEnumerationAdapterService.AWSSecurityGroupEnumerationResponse) AWSConstants.getQueryResultLimit(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.getQueryResultLimit) AdapterUtils(com.vmware.photon.controller.model.adapters.util.AdapterUtils) ResourceState(com.vmware.photon.controller.model.resources.ResourceState) Operation(com.vmware.xenon.common.Operation) QueryUtils(com.vmware.photon.controller.model.query.QueryUtils) AWSNetworkEnumerationResponse(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSNetworkStateEnumerationAdapterService.AWSNetworkEnumerationResponse) AWSUtils(com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils) ServiceMetadata.service(com.vmware.photon.controller.model.util.StartServicesHelper.ServiceMetadata.service) Consumer(java.util.function.Consumer) ConcurrentSkipListMap(java.util.concurrent.ConcurrentSkipListMap) AvailabilityZone(com.amazonaws.services.ec2.model.AvailabilityZone) ComputeStateWithDescription(com.vmware.photon.controller.model.resources.ComputeService.ComputeStateWithDescription) AsyncHandler(com.amazonaws.handlers.AsyncHandler) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) AWSComputeStateCreationRequest(com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSComputeStateCreationAdapterService.AWSComputeStateCreationRequest) AWSClientManagerFactory(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSClientManagerFactory) Collections(java.util.Collections) AWSUriPaths(com.vmware.photon.controller.model.adapters.awsadapter.AWSUriPaths) OperationJoin(com.vmware.xenon.common.OperationJoin) AmazonEC2AsyncClient(com.amazonaws.services.ec2.AmazonEC2AsyncClient) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) Operation(com.vmware.xenon.common.Operation)

Example 3 with ComputeEnumerateAdapterRequest

use of com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest in project photon-model by vmware.

the class AzureStorageEnumerationServiceTest method kickOffStorageAccountEnumeration.

private void kickOffStorageAccountEnumeration() throws Throwable {
    // Create Compute Enumerate Adapter Request
    ComputeEnumerateResourceRequest resourceRequest = new ComputeEnumerateResourceRequest();
    resourceRequest.endpointLink = this.endpointState.documentSelfLink;
    resourceRequest.enumerationAction = EnumerationAction.START;
    resourceRequest.adapterManagementReference = UriUtils.buildUri(AzureEnumerationAdapterService.SELF_LINK);
    resourceRequest.resourcePoolLink = this.resourcePool.documentSelfLink;
    resourceRequest.resourceReference = UriUtils.buildUri(getHost(), "");
    resourceRequest.isMockRequest = this.isMock;
    ComputeEnumerateAdapterRequest request = new ComputeEnumerateAdapterRequest(resourceRequest, this.authState, this.computeHost);
    // patch synchronously to enumeration service
    patchServiceSynchronously(AzureStorageEnumerationAdapterService.SELF_LINK, request);
}
Also used : ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest)

Example 4 with ComputeEnumerateAdapterRequest

use of com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest in project photon-model by vmware.

the class AzureDiskEnumerationServiceTest method testVMAndDiskEnumeration.

@Test
public void testVMAndDiskEnumeration() throws Throwable {
    // Exit if it is mock
    if (this.isMock) {
        return;
    }
    this.resourceGroup = SdkContext.randomResourceName(RESOURCE_GROUP_NAME, RESOURCE_GROUP_NAME.length() + 5);
    // Create a vm with one additional disk
    VirtualMachine vm = getAzureSdkClients().getComputeManager().virtualMachines().define("TestVM").withRegion(Region.US_WEST).withNewResourceGroup(this.resourceGroup).withNewPrimaryNetwork("10.0.0.0/28").withPrimaryPrivateIPAddressDynamic().withoutPrimaryPublicIPAddress().withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS).withRootUsername(AzureTestUtil.AZURE_ADMIN_USERNAME).withRootPassword(AzureTestUtil.AZURE_ADMIN_PASSWORD).withNewDataDisk(5).create();
    assertNotNull(vm);
    DataDisk dataDisk = vm.storageProfile().dataDisks().get(0);
    assertNotNull(dataDisk);
    ComputeEnumerateResourceRequest resourceRequest = kickOffEnumeration();
    ComputeEnumerateAdapterRequest request = new ComputeEnumerateAdapterRequest(resourceRequest, this.authState, this.computeHost);
    // Run VM enumeration
    patchServiceSynchronously(AzureComputeEnumerationAdapterService.SELF_LINK, request);
    // Run disk enumeration
    patchServiceSynchronously(AzureDiskEnumerationAdapterService.SELF_LINK, request);
    // Verify disk state is created in local store
    Map<String, DiskState> diskStateMap = ProvisioningUtils.getResourceStates(getHost(), DiskService.FACTORY_LINK, DiskState.class);
    assertTrue(diskStateMap.keySet().stream().anyMatch(s -> s.equalsIgnoreCase(dataDisk.managedDisk().id())));
    // Detach disk
    vm.update().withoutDataDisk(dataDisk.lun()).apply();
    // Run Disk enumeration
    patchServiceSynchronously(AzureDiskEnumerationAdapterService.SELF_LINK, request);
    // Verify if the status of disk state is updated to Available state or not
    diskStateMap = ProvisioningUtils.getResourceStates(getHost(), DiskService.FACTORY_LINK, DiskState.class);
    diskStateMap.values().forEach(diskState -> {
        if (diskState.name.equalsIgnoreCase(dataDisk.name())) {
            assertTrue("Status of disk state should be Available", diskState.status.equals(DiskService.DiskStatus.AVAILABLE));
        }
    });
}
Also used : VirtualMachine(com.microsoft.azure.management.compute.VirtualMachine) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) Region(com.microsoft.azure.management.resources.fluentcore.arm.Region) AzureBaseTest(com.vmware.photon.controller.model.adapters.azure.base.AzureBaseTest) TagsUtil(com.vmware.photon.controller.model.adapters.util.TagsUtil) Level(java.util.logging.Level) TagState(com.vmware.photon.controller.model.resources.TagService.TagState) Map(java.util.Map) After(org.junit.After) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) ProvisioningUtils(com.vmware.photon.controller.model.tasks.ProvisioningUtils) AzureTestUtil(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil) AzureConstants(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants) DataDisk(com.microsoft.azure.management.compute.DataDisk) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Test(org.junit.Test) TimeUnit(java.util.concurrent.TimeUnit) Disk(com.microsoft.azure.management.compute.Disk) UriUtils(com.vmware.xenon.common.UriUtils) PhotonModelConstants(com.vmware.photon.controller.model.constants.PhotonModelConstants) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) KnownLinuxVirtualMachineImage(com.microsoft.azure.management.compute.KnownLinuxVirtualMachineImage) DiskService(com.vmware.photon.controller.model.resources.DiskService) SdkContext(com.microsoft.azure.management.resources.fluentcore.utils.SdkContext) DataDisk(com.microsoft.azure.management.compute.DataDisk) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) VirtualMachine(com.microsoft.azure.management.compute.VirtualMachine) AzureBaseTest(com.vmware.photon.controller.model.adapters.azure.base.AzureBaseTest) Test(org.junit.Test)

Example 5 with ComputeEnumerateAdapterRequest

use of com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest in project photon-model by vmware.

the class AzureDiskEnumerationServiceTest method testManagedDiskEnumeration.

@Test
public void testManagedDiskEnumeration() throws Throwable {
    // Exit if it is mock
    if (this.isMock) {
        return;
    }
    // create a disk in Azure
    Disk disk = createDisk("disk");
    assertNotNull(disk);
    ComputeEnumerateResourceRequest resourceRequest = kickOffEnumeration();
    ComputeEnumerateAdapterRequest request = new ComputeEnumerateAdapterRequest(resourceRequest, this.authState, this.computeHost);
    // Run disk enumeration
    patchServiceSynchronously(AzureDiskEnumerationAdapterService.SELF_LINK, request);
    // Fetch disks from local store to verify if diskState is created after enumeration
    Map<String, DiskState> diskStateMap = ProvisioningUtils.getResourceStates(getHost(), DiskService.FACTORY_LINK, DiskState.class);
    assertTrue("Newly created disk state is not found.", diskStateMap.keySet().stream().anyMatch(s -> s.equalsIgnoreCase(disk.id())));
    // verify internal tag links
    DiskState createdDisk = diskStateMap.entrySet().stream().filter(en -> en.getKey().equalsIgnoreCase(disk.id())).findFirst().get().getValue();
    assertNotNull(createdDisk.tagLinks);
    TagState typeTag = TagsUtil.newTagState(PhotonModelConstants.TAG_KEY_TYPE, AzureConstants.AzureResourceType.azure_managed_disk.toString(), false, this.computeHost.tenantLinks);
    assertTrue("internal tag not found", createdDisk.tagLinks.stream().anyMatch(s -> s.equalsIgnoreCase(typeTag.documentSelfLink)));
    // verify regionId
    assertNotNull("regionId not found", createdDisk.regionId);
    // Delete disk from Azure
    getAzureSdkClients().getComputeManager().disks().deleteById(disk.id());
    // Run enumeration to sync local disk states with disks in Azure
    patchServiceSynchronously(AzureDiskEnumerationAdapterService.SELF_LINK, request);
    // Need to wait for completion of patch operation on disk states
    TimeUnit.SECONDS.sleep(5);
    // After sync, query local disk states to verify endpoint links of disk state are disassociated
    diskStateMap = ProvisioningUtils.getResourceStates(getHost(), DiskService.FACTORY_LINK, DiskState.class);
    diskStateMap.values().forEach(diskState -> {
        if (diskState.id.equalsIgnoreCase(disk.id())) {
            assertTrue("Endpoint link must be null", diskState.endpointLink.isEmpty());
            assertTrue("Endpoint links in DiskState must be empty", diskState.endpointLinks.isEmpty());
        }
    });
}
Also used : VirtualMachine(com.microsoft.azure.management.compute.VirtualMachine) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) Region(com.microsoft.azure.management.resources.fluentcore.arm.Region) AzureBaseTest(com.vmware.photon.controller.model.adapters.azure.base.AzureBaseTest) TagsUtil(com.vmware.photon.controller.model.adapters.util.TagsUtil) Level(java.util.logging.Level) TagState(com.vmware.photon.controller.model.resources.TagService.TagState) Map(java.util.Map) After(org.junit.After) EnumerationAction(com.vmware.photon.controller.model.adapterapi.EnumerationAction) ProvisioningUtils(com.vmware.photon.controller.model.tasks.ProvisioningUtils) AzureTestUtil(com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil) AzureConstants(com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants) DataDisk(com.microsoft.azure.management.compute.DataDisk) Assert.assertNotNull(org.junit.Assert.assertNotNull) Assert.assertTrue(org.junit.Assert.assertTrue) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) Test(org.junit.Test) TimeUnit(java.util.concurrent.TimeUnit) Disk(com.microsoft.azure.management.compute.Disk) UriUtils(com.vmware.xenon.common.UriUtils) PhotonModelConstants(com.vmware.photon.controller.model.constants.PhotonModelConstants) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) KnownLinuxVirtualMachineImage(com.microsoft.azure.management.compute.KnownLinuxVirtualMachineImage) DiskService(com.vmware.photon.controller.model.resources.DiskService) SdkContext(com.microsoft.azure.management.resources.fluentcore.utils.SdkContext) ComputeEnumerateResourceRequest(com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest) ComputeEnumerateAdapterRequest(com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest) DiskState(com.vmware.photon.controller.model.resources.DiskService.DiskState) DataDisk(com.microsoft.azure.management.compute.DataDisk) Disk(com.microsoft.azure.management.compute.Disk) TagState(com.vmware.photon.controller.model.resources.TagService.TagState) AzureBaseTest(com.vmware.photon.controller.model.adapters.azure.base.AzureBaseTest) Test(org.junit.Test)

Aggregations

ComputeEnumerateAdapterRequest (com.vmware.photon.controller.model.adapters.util.ComputeEnumerateAdapterRequest)6 ComputeEnumerateResourceRequest (com.vmware.photon.controller.model.adapterapi.ComputeEnumerateResourceRequest)5 EnumerationAction (com.vmware.photon.controller.model.adapterapi.EnumerationAction)3 AdapterUtils (com.vmware.photon.controller.model.adapters.util.AdapterUtils)3 Operation (com.vmware.xenon.common.Operation)3 StatelessService (com.vmware.xenon.common.StatelessService)3 UriUtils (com.vmware.xenon.common.UriUtils)3 Utils (com.vmware.xenon.common.Utils)3 Map (java.util.Map)3 DataDisk (com.microsoft.azure.management.compute.DataDisk)2 Disk (com.microsoft.azure.management.compute.Disk)2 KnownLinuxVirtualMachineImage (com.microsoft.azure.management.compute.KnownLinuxVirtualMachineImage)2 VirtualMachine (com.microsoft.azure.management.compute.VirtualMachine)2 Region (com.microsoft.azure.management.resources.fluentcore.arm.Region)2 SdkContext (com.microsoft.azure.management.resources.fluentcore.utils.SdkContext)2 AzureBaseTest (com.vmware.photon.controller.model.adapters.azure.base.AzureBaseTest)2 AzureConstants (com.vmware.photon.controller.model.adapters.azure.constants.AzureConstants)2 AzureTestUtil (com.vmware.photon.controller.model.adapters.azure.instance.AzureTestUtil)2 TagsUtil (com.vmware.photon.controller.model.adapters.util.TagsUtil)2 PhotonModelConstants (com.vmware.photon.controller.model.constants.PhotonModelConstants)2