This commit is contained in:
yueguoguo 2017-07-24 10:35:18 +08:00
Родитель ec486f06be
Коммит 80902a6644
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -49,9 +49,16 @@ addExtensionDSVM <- function(context,
storage_account <- paste0(hostname, "sa")
existing_storage_accounts <- azureListSA(context, resource.group)
if(!storage_account %in% existing_storage_accounts$name)
stop("No default storage account associated with the DSVM. You need to
manually create one before trying again.")
if(!storage_account %in% existing_storage_accounts$name) {
# create a new storage account.
storage_account <- "extensionsa"
AzureSMR::azureCreateStorageAccount(context,
storageAccount=storage_account,
location=location,
resourceGroup=resource.group)
}
storage_key <- azureSAGetKey(context,
storage_account,