Search in sources :

Example 1 with AWSStorageType

use of com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWSStorageType in project photon-model by vmware.

the class AWSComputeDiskDay2ServiceTest method assertDeviceName.

protected void assertDeviceName(Instance awsInstance, DiskState diskState, List<String> existingNames) {
    if (!this.isMock) {
        AWSSupportedOS os = AWSSupportedOS.get(awsInstance.getPlatform());
        AWSSupportedVirtualizationTypes virtualizationType = AWSSupportedVirtualizationTypes.get(awsInstance.getVirtualizationType());
        AWSStorageType storageType = AWSStorageType.get(diskState.customProperties.get(DEVICE_TYPE));
        List<String> expectedNames = AWSBlockDeviceNameMapper.getAvailableNames(os, virtualizationType, storageType, awsInstance.getInstanceType(), existingNames);
        String expectedName = expectedNames.get(0);
        assertEquals(expectedName, diskState.customProperties.get(DEVICE_NAME));
        existingNames.add(expectedName);
    }
}
Also used : AWSSupportedVirtualizationTypes(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWSSupportedVirtualizationTypes) AWSSupportedOS(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWSSupportedOS) AWSStorageType(com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWSStorageType)

Aggregations

AWSStorageType (com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWSStorageType)1 AWSSupportedOS (com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWSSupportedOS)1 AWSSupportedVirtualizationTypes (com.vmware.photon.controller.model.adapters.awsadapter.AWSConstants.AWSSupportedVirtualizationTypes)1