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);
}
}
Aggregations