File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ dns_infoblox_uddi_add() {
7373 return 1
7474 fi
7575
76- zone_id=$( echo " $zone_result " | jq -r ' (.results // .)[] | select(.fqdn == " ' " $zone_fqdn " ' " or .fqdn == " ' " $zone_fqdn " ' .") | .id ' | head - 1)
76+ zone_id=$( echo " $zone_result " | _egrep_o ' "id":"dns/auth_zone/[^"]*" ' | _egrep_o ' dns/auth_zone/[^"]* ' | _head_n 1)
7777
7878 _debug " zone_id: $zone_id "
7979
@@ -164,7 +164,7 @@ dns_infoblox_uddi_rm() {
164164 return 1
165165 fi
166166
167- zone_id=$( echo " $zone_result " | jq -r ' (.results // .)[] | select(.fqdn == " ' " $zone_fqdn " ' " or .fqdn == " ' " $zone_fqdn " ' .") | .id ' | head - 1)
167+ zone_id=$( echo " $zone_result " | _egrep_o ' "id":"dns/auth_zone/[^"]*" ' | _egrep_o ' dns/auth_zone/[^"]* ' | _head_n 1)
168168
169169 _debug " zone_id: $zone_id "
170170
@@ -186,10 +186,8 @@ dns_infoblox_uddi_rm() {
186186 _debug " GET result: $result "
187187
188188 if echo " $result " | grep -q ' "results":' ; then
189- record_count=$( echo " $result " | jq -r ' .results | length' )
190- _debug " Found $record_count result(s)"
191-
192- record_id=$( echo " $result " | jq -r ' .results[] | select(.rdata.text == "' " $txtvalue " ' ") | .id' | head -1)
189+ record_id=$( echo " $result " | _egrep_o ' "id":"dns/record/[^"]*"' | _egrep_o ' dns/record/[^"]*' | _head_n 1)
190+ _debug " Found record_id: $record_id "
193191
194192 if [ -n " $record_id " ]; then
195193 record_uuid=$( echo " $record_id " | sed ' s/.*\/\([a-f0-9-]*\)$/\1/' )
You can’t perform that action at this time.
0 commit comments