use of com.microsoft.azure.management.storage.implementation.SkuInner in project photon-model by vmware.
the class AzureInstanceService method createStorageAccount.
private DeferredResult<AzureInstanceContext> createStorageAccount(AzureInstanceContext ctx) {
if (ctx.reuseExistingStorageAccount() || ctx.useManagedDisks()) {
// no need to create a storage account
logInfo("Not Creating any new storage Account. Reusing existing ones or using managed" + " disks.");
return DeferredResult.completed(ctx);
}
String msg = "Create Azure Storage Account [" + ctx.storageAccountName + "] for [" + ctx.vmName + "] VM";
StorageAccountCreateParametersInner storageParameters = new StorageAccountCreateParametersInner();
storageParameters.withLocation(ctx.child.description.regionId);
storageParameters.withSku(new SkuInner().withName(SkuName.STANDARD_LRS));
storageParameters.withKind(Kind.STORAGE);
StorageAccountProvisioningCallback handler = new StorageAccountProvisioningCallback(ctx, msg);
getStorageManagementClientImpl(ctx).storageAccounts().createAsync(ctx.storageAccountRGName, ctx.storageAccountName, storageParameters, handler);
return handler.toDeferredResult().thenApply(ignore -> ctx);
}
Aggregations