fix and add the dev vm
This commit is contained in:
parent
672418af19
commit
6f3d4a9890
1 changed files with 15 additions and 5 deletions
|
@ -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('--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('--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('--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):
|
def _handle_dns(self, args):
|
||||||
"""A dummy endpoint, to check what endpoint will be reverse-dns service."""
|
"""A dev endpoint for reverse-dns service."""
|
||||||
r = requests.post(
|
r = requests.post(
|
||||||
'https://en53kfc0hydpg.x.pipedream.net',
|
'https://dev.william.ungleich.cloud',
|
||||||
json={'username': args.user, 'token': args.token, 'ipaddress': args.set_reverse, 'name': args.name})
|
json={
|
||||||
return r.text
|
'username': args.user,
|
||||||
|
'token': args.token,
|
||||||
|
'ipaddress': args.set_reverse,
|
||||||
|
'name': args.name,
|
||||||
|
'email': args.email,
|
||||||
|
'realm': args.realm
|
||||||
|
})
|
||||||
|
print(r.text)
|
||||||
|
|
Loading…
Reference in a new issue