Make digital_ocean ssh command use API v2

This commit is contained in:
Tor Åke Fransson 2015-03-26 09:57:35 +01:00 committed by Matt Clay
parent 15235a718d
commit 02883a460b

View file

@ -101,8 +101,7 @@ options:
- The public SSH key you want to add to your account. - The public SSH key you want to add to your account.
notes: notes:
- Two environment variables can be used, DO_CLIENT_ID and DO_API_KEY. - Two environment variables can be used, DO_API_KEY and DO_API_TOKEN. They both refer to the v2 token.
- Version 1 of DigitalOcean API is used.
requirements: [ dopy ] requirements: [ dopy ]
''' '''
@ -117,7 +116,6 @@ EXAMPLES = '''
command=ssh command=ssh
name=my_ssh_key name=my_ssh_key
ssh_pub_key='ssh-rsa AAAA...' ssh_pub_key='ssh-rsa AAAA...'
client_id=XXX
api_key=XXX api_key=XXX
# Create a new Droplet # Create a new Droplet
@ -145,7 +143,6 @@ EXAMPLES = '''
command=droplet command=droplet
id=123 id=123
name=mydroplet name=mydroplet
client_id=XXX
api_key=XXX api_key=XXX
size_id=2gb size_id=2gb
region_id=ams2 region_id=ams2
@ -161,7 +158,6 @@ EXAMPLES = '''
state=present state=present
ssh_key_ids=[id1,id2] ssh_key_ids=[id1,id2]
name=mydroplet name=mydroplet
client_id=XXX
api_key=XXX api_key=XXX
size_id=2gb size_id=2gb
region_id=ams2 region_id=ams2
@ -285,7 +281,7 @@ class SSH(JsonfyMixIn):
@classmethod @classmethod
def setup(cls, client_id, api_key): def setup(cls, client_id, api_key):
cls.manager = DoManager(client_id, api_key) cls.manager = DoManager(client_id, api_key, api_version=2)
@classmethod @classmethod
def find(cls, name): def find(cls, name):