Skip to content

Commit

Permalink
Update dns_huaweicloud.sh
Browse files Browse the repository at this point in the history
fix #5261
  • Loading branch information
i18nsite authored Aug 23, 2024
1 parent 1d59d43 commit 00bbe68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dnsapi/dns_huaweicloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ _get_recordset_id() {
_zoneid=$3
export _H1="X-Auth-Token: ${_token}"

response=$(_get "${dns_api}/v2/zones/${_zoneid}/recordsets?name=${_domain}")
response=$(_get "${dns_api}/v2/zones/${_zoneid}/recordsets?name=${_domain}&status=ACTIVE")
if _contains "${response}" '"id"'; then
_id="$(echo "${response}" | _egrep_o "\"id\": *\"[^\"]*\"" | cut -d : -f 2 | tr -d \" | tr -d " ")"
printf "%s" "${_id}"
Expand All @@ -227,7 +227,7 @@ _add_record() {

# Get Existing Records
export _H1="X-Auth-Token: ${_token}"
response=$(_get "${dns_api}/v2/zones/${zoneid}/recordsets?name=${_domain}")
response=$(_get "${dns_api}/v2/zones/${zoneid}/recordsets?name=${_domain}&status=ACTIVE")

_debug2 "${response}"
_exist_record=$(echo "${response}" | _egrep_o '"records":[^]]*' | sed 's/\"records\"\:\[//g')
Expand Down

0 comments on commit 00bbe68

Please sign in to comment.