From 6f3d4a9890789f16ffa5f5580ce0e22035d5541a Mon Sep 17 00:00:00 2001 From: William Colmenares Date: Wed, 15 May 2019 18:49:00 -0400 Subject: [PATCH] fix and add the dev vm --- ungleich_dns.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ungleich_dns.py b/ungleich_dns.py index cd47685..14c5349 100644 --- a/ungleich_dns.py +++ b/ungleich_dns.py @@ -14,10 +14,20 @@ class ungleichDNS(object): self.parser['dns'].add_argument('--user', help='Your ungleich username', metavar='', required=True) self.parser['dns'].add_argument('--token', help='Your ungleich 6 digit OTP generated token', metavar='', type=int, required=True) self.parser['dns'].add_argument('--name', help='Hostname', metavar='', required=True) + self.parser['dns'].add_argument('--email', help='registered email', metavar='', required=True) + self.parser['dns'].add_argument('--realm', help='Otp realm', metavar='', required=True) + self.parser['dns'].set_defaults(func=self._handle_dns) - def _handle_dns(self): - """A dummy endpoint, to check what endpoint will be reverse-dns service.""" + def _handle_dns(self, args): + """A dev endpoint for reverse-dns service.""" r = requests.post( - 'https://en53kfc0hydpg.x.pipedream.net', - json={'username': args.user, 'token': args.token, 'ipaddress': args.set_reverse, 'name': args.name}) - return r.text + 'https://dev.william.ungleich.cloud', + json={ + 'username': args.user, + 'token': args.token, + 'ipaddress': args.set_reverse, + 'name': args.name, + 'email': args.email, + 'realm': args.realm + }) + print(r.text)