You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2019/06/28 17:25:52 UTC
[libcloud] 04/07: Valid attribute name on the API side is
"ssh_keys" (https://developers.maxihost.com/reference#post_devices).
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 2fe5304b681b81584ece8a0ebfb61e752a6a2fd3
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Fri Jun 28 19:08:43 2019 +0200
Valid attribute name on the API side is "ssh_keys"
(https://developers.maxihost.com/reference#post_devices).
---
libcloud/compute/drivers/maxihost.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/libcloud/compute/drivers/maxihost.py b/libcloud/compute/drivers/maxihost.py
index 1eab3c8..4af24a1 100644
--- a/libcloud/compute/drivers/maxihost.py
+++ b/libcloud/compute/drivers/maxihost.py
@@ -35,8 +35,11 @@ class MaxihostNodeDriver(NodeDriver):
"""
attr = {'hostname': name, 'plan': size.id,
'operating_system': image.id,
- 'facility': location.id.lower(), 'billing_cycle': 'monthly',
- 'ex_ssh_key_ids': ex_ssh_key_ids}
+ 'facility': location.id.lower(), 'billing_cycle': 'monthly'}
+
+ if ex_ssh_key_ids:
+ attr['ssh_keys'] = ex_ssh_key_ids
+
try:
res = self.connection.request('/devices',
params=attr, method='POST')
@@ -123,7 +126,7 @@ class MaxihostNodeDriver(NodeDriver):
"""
List locations
- If ex_available is True, show only locations which are available.
+ If ex_available is True, show only locations which are available
"""
locations = []
data = self.connection.request('/regions')