Skip to content

Command line interface and miscellaneous refactoring #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
15911d8
Start of dyntm command line tool.
apathor Jan 7, 2018
a54fe4b
A few more commands.
apathor Jan 12, 2018
2d07360
Roll logic into parent command. Recursively generate subcommands.
apathor Jan 14, 2018
e6a9dc0
Comments and some record classes.
apathor Jan 14, 2018
05b010c
Generate record type command classes.
apathor Jan 16, 2018
42fe34e
Working record list, update, delete.
apathor Jan 20, 2018
8e742f9
Dry up TTL option. More sensible order for record list/get output.
apathor Jan 20, 2018
4e72cf0
Refactor DNSRecord rdata method. Print rdata as JSON in record list c…
apathor Jan 21, 2018
9959d85
Implement session token reuse.
apathor Jan 21, 2018
0c62c7c
Tiny cleanup.
apathor Jan 23, 2018
44e40a7
Push _meta_update down. Saner auth failure error. Comments.
apathor Jan 29, 2018
6073deb
Session refactor. Clean up retries, polling, and history.
apathor Feb 5, 2018
78c4423
Actual zone changeset support. Refactoring!
apathor Feb 6, 2018
47a32db
Support discarding pending changes too.
apathor Feb 6, 2018
c0a4c50
*** empty log message ***
apathor Feb 7, 2018
f955351
Setup command line entry point for package.
apathor Feb 7, 2018
2d68693
Fix passcmd choking on newlines.
apathor Feb 9, 2018
2d73d22
Meet stylistic requirements.
apathor Feb 10, 2018
a673ca7
Refactor main dyntm command action.
apathor Feb 11, 2018
39f346a
Shut up pycodestyle errors in sphix script.
apathor Feb 11, 2018
7d0e20a
Backoff exponentially on retry. Retry simultaneous tasks too.
apathor Feb 11, 2018
23e1129
Fix get_all_secondary_zones. Add secondary/primary zone list commands.
apathor Feb 11, 2018
d1460d0
Make flake8 happy.
apathor Feb 12, 2018
e83d7d3
Python 3 compatibility mostly?
apathor Feb 12, 2018
04e8ca9
Add pycodestyle check to CI target.
apathor Feb 12, 2018
1d56615
sed -i s/publsh/publish/ Makefile
apathor Feb 12, 2018
6e2bc9c
Fix output of some commands.
apathor Feb 12, 2018
3752c6c
Fix misencoded password from passcmd under Python 3.
apathor Feb 12, 2018
4cc95cc
Add dyntm command to create secondary zones.
apathor Feb 13, 2018
351e32a
Add redirect creation command.
apathor Feb 15, 2018
a416e29
Use only official interface of argparse. Fix subcommand option confus…
apathor Feb 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix output of some commands.
  • Loading branch information
apathor committed Feb 12, 2018
commit 6e2bc9c370820216ba824f09f14c28ceacbde35b
10 changes: 5 additions & 5 deletions dyn/cli/dyntm.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def action(cls, *rest, **args):
session = cls.session()
# print each permission available to current session
for perm in sorted(session.permissions):
sys.stdout.write(perm)
sys.stdout.write("{}\n".format(str(perm)))

# log out

Expand Down Expand Up @@ -331,7 +331,7 @@ def action(cls, *rest, **args):
new = {k: args[k] for k in spec if args[k] is not None}
# make a new zone
zone = Zone(**new)
sys.stdout.write(zone)
sys.stdout.write("{}".format(str(zone)))


# delete zone
Expand Down Expand Up @@ -448,7 +448,7 @@ def action(cls, *rest, **args):
ttl = change["ttl"]
rtype = change["rdata_type"]
rdata = change["rdata"].get("rdata_{}".format(rtype.lower()), {})
msg = "{} {} {} {}".format(fqdn, rtype, ttl, json.dumps(rdata))
msg = "{} {} {} {}\n".format(fqdn, rtype, ttl, json.dumps(rdata))
sys.stdout.write(msg)


Expand All @@ -464,7 +464,7 @@ class CommandZonePublish(DyntmCommand):
def action(cls, *rest, **args):
# get the zone
zone = Zone(args['zone'])
sys.stdout.write(zone.publish(notes=args.get('note', None)))
zone.publish(notes=args.get('note', None))


# zone change reset
Expand Down Expand Up @@ -736,7 +736,7 @@ def action(cls, *rest, **args):
if args['publish']:
zone.publish()
# output the new record
sys.stdout.write(rec)
sys.stdout.write("{}\n".format(rec))


# setup record creation command subclass for each record type
Expand Down