Kami commented on a change in pull request #1298: Maxihost provider URL: https://github.com/apache/libcloud/pull/1298#discussion_r298675131
########## File path: libcloud/compute/drivers/maxihost.py ########## @@ -0,0 +1,218 @@ +import json +import re + +from libcloud.compute.base import Node, NodeDriver, NodeLocation +from libcloud.compute.base import NodeSize, NodeImage +from libcloud.compute.base import KeyPair +from libcloud.common.maxihost import MaxihostConnection +from libcloud.compute.types import Provider, NodeState +from libcloud.common.exceptions import BaseHTTPError +from libcloud.utils.py3 import httplib + + +__all__ = [ + "MaxihostNodeDriver" +] + + +class MaxihostNodeDriver(NodeDriver): + """ + Base Maxihost node driver. + """ + + connectionCls = MaxihostConnection + type = Provider.MAXIHOST + name = 'Maxihost' + website = 'https://www.maxihost.com/' + + def create_node(self, name, size, image, location, + ex_ssh_key_ids=None): + """ + Create a node. + + :return: The newly created node. + :rtype: :class:`Node` + """ + 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} Review comment: Looking at the docs (https://developers.maxihost.com/reference#post_devices), the attribute name on the API side should be ``ssh_keys``, right? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
