зеркало из https://github.com/Azure/AzureRMR.git
detect resource creation failure
This commit is contained in:
Родитель
483fe1b5cf
Коммит
50dd46b06a
1
NEWS.md
1
NEWS.md
|
@ -1,5 +1,6 @@
|
|||
# AzureRMR 2.1.2.9000
|
||||
|
||||
- Fix a bug where failure to create a resource would not be detected.
|
||||
- Make setting tags more robust (some resources return a null tags field when no tags are present, rather than an empty object).
|
||||
|
||||
# AzureRMR 2.1.2
|
||||
|
|
|
@ -358,10 +358,12 @@ private=list(
|
|||
|
||||
# some resources return from creation before they can be retrieved, let http 404's through
|
||||
res <- private$res_op(http_status_handler="pass")
|
||||
http_stat <- httr::status_code(res)
|
||||
state <- httr::content(res)$properties$provisioningState
|
||||
|
||||
success <- httr::status_code(res) < 300 &&
|
||||
httr::content(res)$properties$provisioningState %in% c("Succeeded", "Error", "Failed")
|
||||
if(success)
|
||||
success <- http_stat < 300 && state == "Succeeded"
|
||||
failure <- http_stat < 300 && state %in% c("Error", "Failed")
|
||||
if(success || failure)
|
||||
break
|
||||
}
|
||||
if(success)
|
||||
|
|
Загрузка…
Ссылка в новой задаче