fix and add the dev vm

This commit is contained in:
wcolmenares 2019-05-15 18:49:00 -04:00
parent 672418af19
commit 6f3d4a9890

View file

@ -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)