More formatting

This commit is contained in:
Jason 2017-03-16 08:52:32 -05:00 committed by GitHub
parent 8fab63689e
commit b30f5c0be7

View File

@ -36,7 +36,7 @@ dns_infoblox_add() {
_info "Error encountered during record addition" _info "Error encountered during record addition"
_info "$result" _info "$result"
_err "$result" _err "$result"
return 1 return 1
fi fi
} }
@ -62,19 +62,19 @@ dns_infoblox_rm() {
if _info "$result" | egrep 'record:txt/.*:.*/default'; then if _info "$result" | egrep 'record:txt/.*:.*/default'; then
# Extract object ref # Extract object ref
objRef=`grep -Po 'record:txt/.*:.*/default' <<< $result` objRef=$(grep -Po 'record:txt/.*:.*/default' <<< $result)
objRmUrl="https://$Infoblox_Server/wapi/v2.2.2/$objRef" objRmUrl="https://$Infoblox_Server/wapi/v2.2.2/$objRef"
rmResult=`curl -k -u $Infoblox_Creds -X DELETE $objRmUrl` rmResult=$(curl -k -u $Infoblox_Creds -X DELETE $objRmUrl)
# Check if rm succeeded # Check if rm succeeded
if _info "$rmResult" | egrep 'record:txt/.*:.*/default'; then if _info "$rmResult" | egrep 'record:txt/.*:.*/default'; then
_info "Successfully deleted $objRef" _info "Successfully deleted $objRef"
return 0 return 0
else else
_info "Error occurred during txt record delete" _info "Error occurred during txt record delete"
_info "$rmResult" _info "$rmResult"
_err "$rmResult" _err "$rmResult"
return 1 return 1
fi fi
else else
_info "Record to delete didn't match an existing record" _info "Record to delete didn't match an existing record"
_info "$result" _info "$result"