Moving Terraform to this repo
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
###
|
||||
try:
|
||||
input = raw_input
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
import ovh
|
||||
import json
|
||||
|
||||
# create a client using configuration from ovh.conf file
|
||||
client = ovh.Client()
|
||||
|
||||
# Request RO, /me API access
|
||||
ck = client.new_consumer_key_request()
|
||||
ck.add_recursive_rules(ovh.API_READ_ONLY, "/")
|
||||
|
||||
# Request token
|
||||
validation = ck.request()
|
||||
|
||||
print("Please visit %s to authenticate" % validation['validationUrl'])
|
||||
input("and press Enter to continue...")
|
||||
|
||||
# Print nice welcome message
|
||||
print("Welcome", client.get('/me')['firstname'])
|
||||
print("Btw, your 'consumerKey' is '%s'" % validation['consumerKey'])
|
||||
Reference in New Issue
Block a user