use of com.microsoft.azure.management.storage.StorageAccountSkuType in project cloudbreak by hortonworks.
the class SkuTypeResolverTest method testResolving.
@Test
public void testResolving() {
StorageAccountSkuType result = underTest.resolveFromAzureDiskType(pair.getAzureDiskType());
Assert.assertEquals(pair.getExpectedStorageAccountSkuType().name(), result.name());
}
use of com.microsoft.azure.management.storage.StorageAccountSkuType in project cloudbreak by hortonworks.
the class SkuTypeResolver method resolveFromAzureDiskType.
public StorageAccountSkuType resolveFromAzureDiskType(AzureDiskType type) {
StorageAccountSkuType result = null;
if (type != null) {
String[] typeComponents = type.value().split("_");
String prefix = "";
if (typeComponents[0].toUpperCase().contains("STANDARD")) {
prefix = "STANDARD";
} else if (typeComponents[0].toUpperCase().contains("PREMIUM")) {
prefix = "PREMIUM";
}
result = StorageAccountSkuType.fromSkuName(SkuName.fromString(prefix + "_" + typeComponents[typeComponents.length - 1]));
}
return result;
}
Aggregations