|
|
|
@ -419,7 +419,6 @@ def main() -> int:
|
|
|
|
|
updatecmd.add_argument(
|
|
|
|
|
"-a",
|
|
|
|
|
"--argument",
|
|
|
|
|
nargs="*",
|
|
|
|
|
action="append",
|
|
|
|
|
metavar="KEY=VALUE",
|
|
|
|
|
help="Specify key - value pairs to be updated: name=dns1.example.com. or data=127.0.0.1 for example. --argument can be repeated",
|
|
|
|
@ -473,6 +472,7 @@ def main() -> int:
|
|
|
|
|
headers = {"Authorization": "Bearer {}".format(token)}
|
|
|
|
|
|
|
|
|
|
# Route based on command
|
|
|
|
|
url = ""
|
|
|
|
|
ttl = None
|
|
|
|
|
if "ttl" in args:
|
|
|
|
|
ttl = args.ttl
|
|
|
|
@ -486,7 +486,7 @@ def main() -> int:
|
|
|
|
|
soa_url = setup_url(baseurl, None, None, zname, "SOA", None, args.zone)
|
|
|
|
|
soa_json = run_list(soa_url, True, headers, ret=True)
|
|
|
|
|
ttl = soa_json[0]["ttl"]
|
|
|
|
|
elif args.command in ["auditlog", "changelog"]:
|
|
|
|
|
if args.command in ["auditlog", "changelog"]:
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|
try:
|
|
|
|
@ -520,7 +520,7 @@ def main() -> int:
|
|
|
|
|
run_log(url, args.json, headers)
|
|
|
|
|
else:
|
|
|
|
|
parser.print_help(sys.stderr)
|
|
|
|
|
return 1
|
|
|
|
|
return 2
|
|
|
|
|
except requests.exceptions.RequestException as e:
|
|
|
|
|
output(error(e, "Could not connect to server"))
|
|
|
|
|
except (RequestsJSONDecodeError, SimplejsonJSONDecodeError):
|
|
|
|
|