Skip to content

Commit

Permalink
Allow to configure default TTL for created records
Browse files Browse the repository at this point in the history
  • Loading branch information
Programie authored and miesi committed Jul 26, 2024
1 parent 9f641b1 commit 4691a53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ndcli/dimcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,10 @@ def create_simple_rr(self, args):
options.set_if(overwrite=args.overwrite)
if rr_type != 'PTR' and '.' in args.name and not args.name.endswith('.'):
self.warning("The left hand side of this record contains '.'. This will probably not do what you expect it to do.")

if "ttl" not in options and "default-ttl" in config:
options["ttl"] = config["default-ttl"]

result = self.client.rr_create(**options)
_print_messages(result)
return create_simple_rr
Expand Down

0 comments on commit 4691a53

Please sign in to comment.