Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
64e53927
Commit
64e53927
authored
Apr 02, 2019
by
Kimmax
Browse files
Zone delete also needs new "templateValues" field
parent
987f9522
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_hostingde.sh
View file @
64e53927
...
...
@@ -97,7 +97,7 @@ _hostingde_getZoneConfig() {
zoneConfigDnsServerGroupId
=
$(
echo
"
${
curResult
}
"
| _hostingde_parse
"dnsServerGroupId"
)
zoneConfigEmailAddress
=
$(
echo
"
${
curResult
}
"
| _hostingde_parse
"emailAddress"
)
zoneConfigDnsSecMode
=
$(
echo
"
${
curResult
}
"
| _hostingde_parse
"dnsSecMode"
)
zoneConfigTemplateValues
=
$(
echo
"
${
curResult
}
"
| _hostingde_parse_
object
"templateValues"
)
zoneConfigTemplateValues
=
$(
echo
"
${
curResult
}
"
| _hostingde_parse_
no_strip_whitespace
"templateValues"
)
if
[
"
$zoneConfigTemplateValues
"
!=
"null"
]
;
then
_debug
"Zone is tied to a template."
...
...
@@ -174,7 +174,7 @@ _hostingde_removeRecord() {
_hostingde_getZoneStatus
_debug
"Result of zoneStatus: '
$zoneStatus
'"
done
curData
=
"{
\"
authToken
\"
:
\"
${
HOSTINGDE_APIKEY
}
\"
,
\"
zoneConfig
\"
:{
\"
id
\"
:
${
zoneConfigId
}
,
\"
name
\"
:
${
zoneConfigName
}
,
\"
type
\"
:
${
zoneConfigType
}
,
\"
dnsServerGroupId
\"
:
${
zoneConfigDnsServerGroupId
}
,
\"
dnsSecMode
\"
:
${
zoneConfigDnsSecMode
}
,
\"
emailAddress
\"
:
${
zoneConfigEmailAddress
}
,
\"
soaValues
\"
:{
\"
expire
\"
:
${
zoneConfigExpire
}
,
\"
negativeTtl
\"
:
${
zoneConfigNegativeTtl
}
,
\"
refresh
\"
:
${
zoneConfigRefresh
}
,
\"
retry
\"
:
${
zoneConfigRetry
}
,
\"
ttl
\"
:
${
zoneConfigTtl
}
}},
\"
recordsToDelete
\"
:[{
\"
name
\"
:
\"
${
fulldomain
}
\"
,
\"
type
\"
:
\"
TXT
\"
,
\"
content
\"
:
\"\\\"
${
txtvalue
}
\\\"\"
}]}"
curData
=
"{
\"
authToken
\"
:
\"
${
HOSTINGDE_APIKEY
}
\"
,
\"
zoneConfig
\"
:{
\"
id
\"
:
${
zoneConfigId
}
,
\"
name
\"
:
${
zoneConfigName
}
,
\"
type
\"
:
${
zoneConfigType
}
,
\"
dnsServerGroupId
\"
:
${
zoneConfigDnsServerGroupId
}
,
\"
dnsSecMode
\"
:
${
zoneConfigDnsSecMode
}
,
\"
emailAddress
\"
:
${
zoneConfigEmailAddress
}
,
\"
soaValues
\"
:{
\"
expire
\"
:
${
zoneConfigExpire
}
,
\"
negativeTtl
\"
:
${
zoneConfigNegativeTtl
}
,
\"
refresh
\"
:
${
zoneConfigRefresh
}
,
\"
retry
\"
:
${
zoneConfigRetry
}
,
\"
ttl
\"
:
${
zoneConfigTtl
}
}
,
\"
templateValues
\"
:
${
zoneConfigTemplateValues
}
},
\"
recordsToDelete
\"
:[{
\"
name
\"
:
\"
${
fulldomain
}
\"
,
\"
type
\"
:
\"
TXT
\"
,
\"
content
\"
:
\"\\\"
${
txtvalue
}
\\\"\"
}]}"
curResult
=
"
$(
_post
"
${
curData
}
"
"
${
HOSTINGDE_ENDPOINT
}
/api/dns/v1/json/zoneUpdate"
)
"
_debug
"Calling zoneUpdate: '
${
curData
}
' '
${
HOSTINGDE_ENDPOINT
}
/api/dns/v1/json/zoneUpdate'"
_debug
"Result of zoneUpdate: '
$curResult
'"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment