Tidy up error handling
This commit is contained in:
parent
0b0222f41c
commit
a69d65f481
@ -58,19 +58,27 @@ _dns_gcloud_start_tr() {
|
|||||||
gcloud dns record-sets transaction start \
|
gcloud dns record-sets transaction start \
|
||||||
--transaction-file="$tr" \
|
--transaction-file="$tr" \
|
||||||
--zone="$managedZone"
|
--zone="$managedZone"
|
||||||
rc=$?
|
|
||||||
|
rc=$?
|
||||||
|
if $rc != 0; then
|
||||||
_err "_dns_gcloud_start_tr: RC= $rc failed to execute transaction"
|
_err "_dns_gcloud_start_tr: RC= $rc failed to execute transaction"
|
||||||
return 0
|
fi
|
||||||
|
|
||||||
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
_dns_gcloud_execute_tr() {
|
_dns_gcloud_execute_tr() {
|
||||||
gcloud dns record-sets transaction execute \
|
gcloud dns record-sets transaction execute \
|
||||||
--transaction-file="$tr" \
|
--transaction-file="$tr" \
|
||||||
--zone="$managedZone"
|
--zone="$managedZone"
|
||||||
rc=$?
|
rc=$?
|
||||||
|
|
||||||
|
if $rc != 0; then
|
||||||
_debug tr "$(cat "$tr")"
|
_debug tr "$(cat "$tr")"
|
||||||
_err "_dns_gcloud_execute_tr: RC= $rc failed to execute transaction"
|
_err "_dns_gcloud_execute_tr: RC= $rc failed to execute transaction"
|
||||||
|
|
||||||
|
return $rc
|
||||||
|
fi
|
||||||
|
|
||||||
for i in $(seq 1 120); do
|
for i in $(seq 1 120); do
|
||||||
if gcloud dns record-sets changes list \
|
if gcloud dns record-sets changes list \
|
||||||
@ -107,10 +115,14 @@ _dns_gcloud_add_rrs() {
|
|||||||
--type=TXT \
|
--type=TXT \
|
||||||
--zone="$managedZone" \
|
--zone="$managedZone" \
|
||||||
--transaction-file="$tr"
|
--transaction-file="$tr"
|
||||||
rc=$?
|
|
||||||
|
rc=$?
|
||||||
|
if $rc != 0; then
|
||||||
_debug tr "$(cat "$tr")"
|
_debug tr "$(cat "$tr")"
|
||||||
_err "_dns_gcloud_add_rrs: rc=$rc failed to add RRs"
|
_err "_dns_gcloud_add_rrs: rc=$rc failed to add RRs"
|
||||||
return 0
|
fi
|
||||||
|
|
||||||
|
return $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
_dns_gcloud_find_zone() {
|
_dns_gcloud_find_zone() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user