зеркало из https://github.com/Azure/AzureStor.git
fix listing
This commit is contained in:
Родитель
a01953e96a
Коммит
8aa57c41f1
|
@ -135,16 +135,16 @@ AzureRMR::az_subscription$set("public", "list_storage_accounts", function(name)
|
|||
|
||||
op <- file.path("providers", provider, path)
|
||||
|
||||
cont <- call_azure_rm(self$token, self$subscription, op, api_version=api_version)
|
||||
cont <- call_azure_rm(self$token, self$id, op, api_version=api_version)
|
||||
lst <- lapply(cont$value,
|
||||
function(parms) az_storage$new(self$token, self$subscription, deployed_properties=parms))
|
||||
function(parms) az_storage$new(self$token, self$id, deployed_properties=parms))
|
||||
|
||||
# keep going until paging is complete
|
||||
while(!is_empty(cont$nextLink))
|
||||
{
|
||||
cont <- call_azure_url(self$token, cont$nextLink)
|
||||
lst <- lapply(cont$value,
|
||||
function(parms) az_storage$new(self$token, self$subscription, deployed_properties=parms))
|
||||
function(parms) az_storage$new(self$token, self$id, deployed_properties=parms))
|
||||
}
|
||||
named_list(lst)
|
||||
})
|
||||
|
|
|
@ -52,7 +52,8 @@ public=list(
|
|||
kind="Storage", sku=list(name="Standard_LRS", tier="Standard"), ...)
|
||||
{
|
||||
if(missing(location) && missing(kind) && missing(sku))
|
||||
super$initialize(token, subscription, resource_group, type="Microsoft.Storage/storageAccounts", name=name)
|
||||
super$initialize(token, subscription, resource_group, type="Microsoft.Storage/storageAccounts", name=name,
|
||||
...)
|
||||
else super$initialize(token, subscription, resource_group, type="Microsoft.Storage/storageAccounts", name=name,
|
||||
location=location, kind=kind, sku=sku, ...)
|
||||
},
|
||||
|
@ -102,12 +103,15 @@ public=list(
|
|||
|
||||
endp <- self$properties$primaryEndpoints
|
||||
endp <- paste0(" ", names(endp), ": ", endp, collapse="\n")
|
||||
sku <- unlist(self$sku)
|
||||
|
||||
cat(" Account type:", self$kind, "\n")
|
||||
cat(" SKU:", paste0(names(sku), "=", sku, collapse=", "), "\n")
|
||||
cat(" Endpoints:\n")
|
||||
cat(endp, "\n")
|
||||
cat("---\n")
|
||||
|
||||
cat(format_public_fields(self, exclude=c("subscription", "resource_group", "type", "name", "kind")))
|
||||
cat(format_public_fields(self, exclude=c("subscription", "resource_group", "type", "name", "kind", "sku")))
|
||||
cat(format_public_methods(self))
|
||||
invisible(NULL)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче