helper script to add OVH customer key
This commit is contained in:
parent
7950a9ea6b
commit
df4c58989a
20
register_ovh_account
Executable file
20
register_ovh_account
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from ovh import ovh
|
||||
|
||||
domain = 'example.com'
|
||||
|
||||
client = ovh.Client()
|
||||
|
||||
ck = client.new_consumer_key_request()
|
||||
ck.add_rules(ovh.API_READ_WRITE_SAFE, '/domain/zone/%s/record' % domain)
|
||||
ck.add_rules(ovh.API_READ_WRITE_SAFE, '/domain/zone/%s/record/*' % domain)
|
||||
ck.add_rules(ovh.API_READ_WRITE_SAFE, '/domain/zone/%s/refresh' % domain)
|
||||
|
||||
validation = ck.request()
|
||||
|
||||
print("Please visit %s to authenticate" % validation['validationUrl'])
|
||||
input("and press Enter to continue...")
|
||||
|
||||
# Print nice welcome message
|
||||
print("'consumerKey' is '%s'" % validation['consumerKey'])
|
Loading…
Reference in New Issue
Block a user