You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2016/12/02 10:32:23 UTC
[1/9] libcloud git commit: An initial implementation for the
cloudscale.ch API.
Repository: libcloud
Updated Branches:
refs/heads/trunk 75b129e8b -> b2662d529
An initial implementation for the cloudscale.ch API.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/c6ad7015
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/c6ad7015
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/c6ad7015
Branch: refs/heads/trunk
Commit: c6ad7015a7adb181b867c6b1e848262d2ba52cf3
Parents: fe34a54
Author: Dave Halter <da...@gmail.com>
Authored: Tue Nov 22 13:50:41 2016 +0100
Committer: Dave Halter <da...@gmail.com>
Committed: Tue Nov 22 13:50:41 2016 +0100
----------------------------------------------------------------------
libcloud/compute/drivers/cloudscale.py | 211 +++++++++++++++++++
libcloud/compute/providers.py | 2 +
libcloud/compute/types.py | 2 +
.../fixtures/cloudscale/create_node.json | 46 ++++
.../fixtures/cloudscale/list_images.json | 1 +
.../compute/fixtures/cloudscale/list_nodes.json | 48 +++++
.../compute/fixtures/cloudscale/list_sizes.json | 2 +
libcloud/test/compute/test_cloudscale.py | 122 +++++++++++
libcloud/test/secrets.py-dist | 3 +-
9 files changed, 436 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/compute/drivers/cloudscale.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudscale.py b/libcloud/compute/drivers/cloudscale.py
new file mode 100644
index 0000000..a439b12
--- /dev/null
+++ b/libcloud/compute/drivers/cloudscale.py
@@ -0,0 +1,211 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""
+A driver for cloudscale.ch.
+"""
+
+import json
+
+from libcloud.utils.py3 import httplib
+
+from libcloud.common.base import ConnectionKey, JsonResponse
+from libcloud.compute.types import Provider, NodeState
+from libcloud.common.types import InvalidCredsError
+from libcloud.compute.base import NodeDriver
+from libcloud.compute.base import Node, NodeImage, NodeSize
+
+
+class CloudscaleResponse(JsonResponse):
+ valid_response_codes = [httplib.OK, httplib.ACCEPTED, httplib.CREATED,
+ httplib.NO_CONTENT]
+
+ def parse_error(self):
+ body = self.parse_body()
+ if self.status == httplib.UNAUTHORIZED:
+ raise InvalidCredsError(body['detail'])
+ else:
+ # We are taking the first issue here. There might be multiple ones,
+ # but that doesn't really matter. It's nicer if the error is just
+ # one error (because it's a Python API and there's only one
+ # exception.
+ return next(iter(body.values()))
+
+ def success(self):
+ return self.status in self.valid_response_codes
+
+
+class CloudscaleConnection(ConnectionKey):
+ """
+ Connection class for the Vultr driver.
+ """
+ host = 'api.cloudscale.ch'
+ responseCls = CloudscaleResponse
+
+ def add_default_headers(self, headers):
+ """
+ Add headers that are necessary for every request
+
+ This method adds ``token`` to the request.
+ """
+ headers['Authorization'] = 'Bearer %s' % (self.key)
+ headers['Content-Type'] = 'application/json'
+ return headers
+
+
+class CloudscaleNodeDriver(NodeDriver):
+ """
+ Cloudscale's node driver.
+ """
+
+ connectionCls = CloudscaleConnection
+
+ type = Provider.CLOUDSCALE
+ name = 'Cloudscale'
+ website = 'https://www.cloudscale.ch'
+
+ NODE_STATE_MAP = dict(
+ changing=NodeState.PENDING,
+ running=NodeState.RUNNING,
+ stopped=NodeState.STOPPED,
+ paused=NodeState.PAUSED,
+ )
+
+ def __init__(self, key, **kwargs):
+ super(CloudscaleNodeDriver, self).__init__(key, **kwargs)
+
+ def list_nodes(self):
+ return self._list_resources('/v1/servers', self._to_node)
+
+ def list_sizes(self):
+ return self._list_resources('/v1/flavors', self._to_size)
+
+ def list_images(self):
+ return self._list_resources('/v1/images', self._to_image)
+
+ def create_node(self, name, size, image, location=None, ex_create_attr={}):
+ """
+ Create a node.
+
+ The `ex_create_attr` parameter can include the following dictionary
+ key and value pairs:
+
+ * `ssh_keys`: ``list`` of ``str`` ssh public keys
+ * `volume_size_gb`: ``int`` defaults to 10.
+ * `bulk_volume_size_gb`: defaults to None.
+ * `use_public_network`: ``bool`` defaults to True
+ * `use_private_network`: ``bool`` defaults to False
+ * `use_ipv6`: ``bool`` defaults to True
+ * `anti_affinity_with`: ``uuid`` of a server to create an anti-affinity
+ group with that server or add it to the same group as that server.
+ * `user_data`: ``str`` for optional cloud-config data
+
+ :keyword ex_create_attr: A dictionary of optional attributes for
+ droplet creation
+ :type ex_create_attr: ``dict``
+
+ :keyword ex_user_data: User data to be added to the node on create.
+ (optional)
+ :type ex_user_data: ``str``
+
+ :return: The newly created node.
+ :rtype: :class:`Node`
+ """
+ attr = dict(ex_create_attr)
+ attr.update(
+ name=name,
+ image=image.id,
+ flavor=size.id,
+ )
+ result = self.connection.request(
+ '/v1/servers',
+ data=json.dumps(attr),
+ method='POST'
+ )
+ return self._to_node(result.object)
+
+ def reboot_node(self, node):
+ return self._action(node, 'reboot')
+
+ def ex_start_node(self, node):
+ return self._action(node, 'start')
+
+ def ex_stop_node(self, node):
+ return self._action(node, 'stop')
+
+ def ex_node_by_uuid(self, uuid):
+ res = self.connection.request(self._get_server_url(uuid))
+ return self._to_node(res.object)
+
+ def destroy_node(self, node):
+ res = self.connection.request(self._get_server_url(node.id), method='DELETE')
+ return res.status == httplib.NO_CONTENT
+
+ def _get_server_url(self, uuid):
+ return '/v1/servers/%s' % uuid
+
+ def _action(self, node, action_name):
+ response = self.connection.request(
+ self._get_server_url(node.id) + '/' + action_name,
+ method='POST'
+ )
+ return response.status == httplib.OK
+
+ def _list_resources(self, url, tranform_func):
+ data = self.connection.request(url, method='GET').object
+ return [tranform_func(obj) for obj in data]
+
+ def _to_node(self, data):
+ state = self.NODE_STATE_MAP.get(data['status'], NodeState.UNKNOWN)
+ extra_keys = ['volumes', 'inferfaces', 'anti_affinity_with']
+ extra = {}
+ for key in extra_keys:
+ if key in data:
+ extra[key] = data[key]
+
+ public_ips = []
+ private_ips = []
+ for interface in data['interfaces']:
+ if interface['type'] == 'public':
+ ips = public_ips
+ else:
+ ips = private_ips
+ for address_obj in interface['addresses']:
+ ips.append(address_obj['address'])
+
+ return Node(
+ id=data['uuid'],
+ name=data['name'],
+ state=state,
+ public_ips=public_ips,
+ private_ips=private_ips,
+ extra=extra,
+ driver=self,
+ image=self._to_image(data['image']),
+ size=self._to_size(data['flavor']),
+ )
+
+ def _to_size(self, data):
+ extra = {'vcpu_count': data['vcpu_count']}
+ ram = data['memory_gb'] * 1024
+
+ return NodeSize(id=data['slug'], name=data['name'],
+ ram=ram, disk=10,
+ bandwidth=0, price=0,
+ extra=extra, driver=self)
+
+ def _to_image(self, data):
+ extra = {'operating_system': data['operating_system']}
+ return NodeImage(id=data['slug'], name=data['name'], extra=extra,
+ driver=self)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/compute/providers.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/providers.py b/libcloud/compute/providers.py
index ccdebc8..2d5127e 100644
--- a/libcloud/compute/providers.py
+++ b/libcloud/compute/providers.py
@@ -141,6 +141,8 @@ DRIVERS = {
('libcloud.compute.drivers.ntta', 'NTTAmericaNodeDriver'),
Provider.ALIYUN_ECS:
('libcloud.compute.drivers.ecs', 'ECSDriver'),
+ Provider.CLOUDSCALE:
+ ('libcloud.compute.drivers.cloudscale', 'CloudscaleNodeDriver'),
}
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/compute/types.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/types.py b/libcloud/compute/types.py
index 3b63b9e..658907e 100644
--- a/libcloud/compute/types.py
+++ b/libcloud/compute/types.py
@@ -70,6 +70,7 @@ class Provider(Type):
:cvar AZURE_ARM: Azure Resource Manager (modern) driver.
:cvar BLUEBOX: Bluebox
:cvar CLOUDSIGMA: CloudSigma
+ :cvar CLOUDSCALE: cloudscale.ch
:cvar CLOUDSTACK: CloudStack
:cvar DIMENSIONDATA: Dimension Data Cloud
:cvar EC2: Amazon AWS.
@@ -115,6 +116,7 @@ class Provider(Type):
CISCOCCS = 'ciscoccs'
CLOUDFRAMES = 'cloudframes'
CLOUDSIGMA = 'cloudsigma'
+ CLOUDSCALE = 'cloudscale'
CLOUDSTACK = 'cloudstack'
CLOUDWATT = 'cloudwatt'
DIGITAL_OCEAN = 'digitalocean'
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/test/compute/fixtures/cloudscale/create_node.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/cloudscale/create_node.json b/libcloud/test/compute/fixtures/cloudscale/create_node.json
new file mode 100644
index 0000000..a40e80c
--- /dev/null
+++ b/libcloud/test/compute/fixtures/cloudscale/create_node.json
@@ -0,0 +1,46 @@
+{
+ "href": "https://api.cloudscale.ch/v1/servers/47cec963-fcd2-482f-bdb6-24461b2d47b1",
+ "uuid": "47cec963-fcd2-482f-bdb6-24461b2d47b1",
+ "name": "db-master",
+ "status": "changing",
+ "flavor": {
+ "slug": "flex-4",
+ "name": "Flex-4",
+ "vcpu_count": 2,
+ "memory_gb": 4
+ },
+ "image": {
+ "slug": "debian-8",
+ "name": "Debian 8 (2016-10-20)",
+ "operating_system": "Debian"
+ },
+ "volumes": [
+ {
+ "type": "ssd",
+ "device_path": "",
+ "size_gb": 50
+ }
+ ],
+ "interfaces": [
+ {
+ "type": "public",
+ "addresses": [
+ {
+ "version": 4,
+ "address": "185.98.122.176",
+ "prefix_length": 24,
+ "gateway": "185.98.122.1",
+ "reverse_ptr": "185-98-122-176.cust.cloudscale.ch"
+ },
+ {
+ "version": 6,
+ "address": "2a06:c01:1:1902::7ab0:176",
+ "prefix_length": 64,
+ "gateway": "fe80::1",
+ "reverse_ptr": "185-98-122-176.cust.cloudscale.ch"
+ }
+ ]
+ }
+ ],
+ "anti_affinity_with": []
+}
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/test/compute/fixtures/cloudscale/list_images.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/cloudscale/list_images.json b/libcloud/test/compute/fixtures/cloudscale/list_images.json
new file mode 100644
index 0000000..e8ed55c
--- /dev/null
+++ b/libcloud/test/compute/fixtures/cloudscale/list_images.json
@@ -0,0 +1 @@
+[{"slug":"ubuntu-16.10","name":"Ubuntu 16.10 (2016-10-17)","operating_system": "Ubuntu"}]
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/test/compute/fixtures/cloudscale/list_nodes.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/cloudscale/list_nodes.json b/libcloud/test/compute/fixtures/cloudscale/list_nodes.json
new file mode 100644
index 0000000..95f861c
--- /dev/null
+++ b/libcloud/test/compute/fixtures/cloudscale/list_nodes.json
@@ -0,0 +1,48 @@
+[
+ {
+ "href": "https://api.cloudscale.ch/v1/servers/47cec963-fcd2-482f-bdb6-24461b2d47b1",
+ "uuid": "47cec963-fcd2-482f-bdb6-24461b2d47b1",
+ "name": "db-master",
+ "status": "running",
+ "flavor": {
+ "slug": "flex-4",
+ "name": "Flex-4",
+ "vcpu_count": 2,
+ "memory_gb": 4
+ },
+ "image": {
+ "slug": "debian-8",
+ "name": "Debian 8 (2016-10-20)",
+ "operating_system": "Debian"
+ },
+ "volumes": [
+ {
+ "type": "ssd",
+ "device_path": "/dev/vda",
+ "size_gb": 50
+ }
+ ],
+ "interfaces": [
+ {
+ "type": "public",
+ "addresses": [
+ {
+ "version": 4,
+ "address": "185.98.122.176",
+ "prefix_length": 24,
+ "gateway": "185.98.122.1",
+ "reverse_ptr": "185-98-122-176.cust.cloudscale.ch"
+ },
+ {
+ "version": 6,
+ "address": "2a06:c01:1:1902::7ab0:176",
+ "prefix_length": 64,
+ "gateway": "fe80::1",
+ "reverse_ptr": "185-98-122-176.cust.cloudscale.ch"
+ }
+ ]
+ }
+ ],
+ "anti_affinity_with": []
+ }
+]
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/test/compute/fixtures/cloudscale/list_sizes.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/cloudscale/list_sizes.json b/libcloud/test/compute/fixtures/cloudscale/list_sizes.json
new file mode 100644
index 0000000..8952a5e
--- /dev/null
+++ b/libcloud/test/compute/fixtures/cloudscale/list_sizes.json
@@ -0,0 +1,2 @@
+[{"slug":"flex-2","name":"Flex-2","vcpu_count":1,"memory_gb":2},
+ {"slug":"flex-4","name":"Flex-4","vcpu_count":2,"memory_gb": 4}]
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/test/compute/test_cloudscale.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_cloudscale.py b/libcloud/test/compute/test_cloudscale.py
new file mode 100644
index 0000000..fc1cabb
--- /dev/null
+++ b/libcloud/test/compute/test_cloudscale.py
@@ -0,0 +1,122 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+import sys
+import unittest
+
+try:
+ import simplejson as json
+except ImportError:
+ import json # NOQA
+
+from libcloud.utils.py3 import httplib
+
+from libcloud.compute.drivers.cloudscale import CloudscaleNodeDriver
+
+from libcloud.test import LibcloudTestCase, MockHttpTestCase
+from libcloud.test.file_fixtures import ComputeFileFixtures
+from libcloud.test.secrets import CLOUDSCALE_PARAMS
+
+
+class CloudscaleTests(LibcloudTestCase):
+
+ def setUp(self):
+ CloudscaleNodeDriver.connectionCls.conn_classes = \
+ (None, CloudscaleMockHttp)
+ self.driver = CloudscaleNodeDriver(*CLOUDSCALE_PARAMS)
+
+ def test_list_images_success(self):
+ images = self.driver.list_images()
+ image, = images
+ self.assertTrue(image.id is not None)
+ self.assertTrue(image.name is not None)
+
+ def test_list_sizes_success(self):
+ sizes = self.driver.list_sizes()
+ self.assertEqual(len(sizes), 2)
+
+ size = sizes[0]
+ self.assertTrue(size.id is not None)
+ self.assertEqual(size.name, 'Flex-2')
+ self.assertEqual(size.ram, 2048)
+
+ size = sizes[1]
+ self.assertTrue(size.id is not None)
+ self.assertEqual(size.name, 'Flex-4')
+ self.assertEqual(size.ram, 4096)
+
+ def test_list_locations_not_existing(self):
+ # assertRaises doesn't exist in Python 2.5?!
+ try:
+ self.driver.list_locations()
+ except NotImplementedError:
+ pass
+ else:
+ assert False, 'Did not raise the wished error.'
+
+ def test_list_nodes_success(self):
+ nodes = self.driver.list_nodes()
+ self.assertEqual(len(nodes), 1)
+ self.assertEqual(nodes[0].id, '47cec963-fcd2-482f-bdb6-24461b2d47b1')
+ self.assertEqual(
+ nodes[0].public_ips,
+ ['185.98.122.176', '2a06:c01:1:1902::7ab0:176']
+ )
+
+ def test_reboot_node_success(self):
+ node = self.driver.list_nodes()[0]
+ result = self.driver.reboot_node(node)
+ self.assertTrue(result)
+
+ def test_create_node_success(self):
+ test_size = self.driver.list_sizes()[0]
+ test_image = self.driver.list_images()[0]
+ created_node = self.driver.create_node('node-name', test_size, test_image)
+ self.assertEqual(created_node.id, "47cec963-fcd2-482f-bdb6-24461b2d47b1")
+
+ def test_destroy_node_success(self):
+ node = self.driver.list_nodes()[0]
+ result = self.driver.destroy_node(node)
+ self.assertTrue(result)
+
+
+class CloudscaleMockHttp(MockHttpTestCase):
+ fixtures = ComputeFileFixtures('cloudscale')
+
+ def _v1_images(self, method, url, body, headers):
+ body = self.fixtures.load('list_images.json')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+ def _v1_flavors(self, method, url, body, headers):
+ body = self.fixtures.load('list_sizes.json')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+ def _v1_servers(self, method, url, body, headers):
+ if method == 'GET':
+ body = self.fixtures.load('list_nodes.json')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+ else:
+ body = self.fixtures.load('create_node.json')
+ response = httplib.responses[httplib.CREATED]
+ return (httplib.CREATED, body, {}, response)
+
+ def _v1_servers_47cec963_fcd2_482f_bdb6_24461b2d47b1(self, method, url, body, headers):
+ assert method == 'DELETE'
+ return (httplib.NO_CONTENT, "", {}, httplib.responses[httplib.NO_CONTENT])
+
+ def _v1_servers_47cec963_fcd2_482f_bdb6_24461b2d47b1_reboot(self, method, url, body, headers):
+ return (httplib.OK, "", {}, httplib.responses[httplib.OK])
+
+if __name__ == '__main__':
+ sys.exit(unittest.main())
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c6ad7015/libcloud/test/secrets.py-dist
----------------------------------------------------------------------
diff --git a/libcloud/test/secrets.py-dist b/libcloud/test/secrets.py-dist
index 8c73f54..2c21f84 100644
--- a/libcloud/test/secrets.py-dist
+++ b/libcloud/test/secrets.py-dist
@@ -51,6 +51,7 @@ PROFIT_BRICKS_PARAMS = ('user', 'key')
VULTR_PARAMS = ('key')
PACKET_PARAMS = ('api_key')
ECS_PARAMS = ('access_key', 'access_secret')
+CLOUDSCALE_PARAMS = ('token',)
# Storage
STORAGE_S3_PARAMS = ('key', 'secret')
@@ -94,4 +95,4 @@ DNS_PARAMS_DNSPOD = ('key', )
CONTAINER_PARAMS_DOCKER = ('user', 'password')
CONTAINER_PARAMS_ECS = ('user', 'password', 'region')
CONTAINER_PARAMS_KUBERNETES = ('user', 'password')
-CONTAINER_PARAMS_RANCHER = ('user', 'password')
\ No newline at end of file
+CONTAINER_PARAMS_RANCHER = ('user', 'password')
[6/9] libcloud git commit: Remove a space to please @feuermurmel.
Posted by an...@apache.org.
Remove a space to please @feuermurmel.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5bf298fa
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5bf298fa
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5bf298fa
Branch: refs/heads/trunk
Commit: 5bf298fabc77c77e043d6f13af9eb979f69c5bc6
Parents: 8f11620
Author: Dave Halter <da...@gmail.com>
Authored: Mon Nov 28 14:00:14 2016 +0100
Committer: Dave Halter <da...@gmail.com>
Committed: Mon Nov 28 14:00:14 2016 +0100
----------------------------------------------------------------------
libcloud/test/compute/fixtures/cloudscale/list_images.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/5bf298fa/libcloud/test/compute/fixtures/cloudscale/list_images.json
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/cloudscale/list_images.json b/libcloud/test/compute/fixtures/cloudscale/list_images.json
index e8ed55c..785886a 100644
--- a/libcloud/test/compute/fixtures/cloudscale/list_images.json
+++ b/libcloud/test/compute/fixtures/cloudscale/list_images.json
@@ -1 +1 @@
-[{"slug":"ubuntu-16.10","name":"Ubuntu 16.10 (2016-10-17)","operating_system": "Ubuntu"}]
+[{"slug":"ubuntu-16.10","name":"Ubuntu 16.10 (2016-10-17)","operating_system":"Ubuntu"}]
[4/9] libcloud git commit: Improved the documentation in a few places.
Posted by an...@apache.org.
Improved the documentation in a few places.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/d1b7d786
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/d1b7d786
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/d1b7d786
Branch: refs/heads/trunk
Commit: d1b7d78604767b4f446865da63e625cf1c48f0d5
Parents: fd9fefd
Author: Dave Halter <da...@gmail.com>
Authored: Wed Nov 23 15:55:53 2016 +0100
Committer: Dave Halter <da...@gmail.com>
Committed: Wed Nov 23 15:55:53 2016 +0100
----------------------------------------------------------------------
docs/compute/drivers/cloudscale.rst | 20 ++++++++++----------
.../cloudscale/cloudscale_compute_simple.py | 3 ++-
libcloud/compute/drivers/cloudscale.py | 2 +-
3 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/d1b7d786/docs/compute/drivers/cloudscale.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/cloudscale.rst b/docs/compute/drivers/cloudscale.rst
index 5fbcdfc..f98981d 100644
--- a/docs/compute/drivers/cloudscale.rst
+++ b/docs/compute/drivers/cloudscale.rst
@@ -12,8 +12,8 @@ Cloudscale Compute Driver Documentation
How to get an API Key
---------------------
-Simply visit `<https://control.cloudscale.ch/user/api-tokens>`_ and start
-having fun!
+Simply visit `<https://control.cloudscale.ch/user/api-tokens>`_ and generate
+your key.
You can generate read and read/write API keys. These token types give you more
access control. Revoking an API token is also possible.
@@ -37,14 +37,14 @@ In our :ref:`example <cloudscale-examples>` below you can see how you use
``ex_create_attr`` when creating servers. Possible dictionary entries in
``ex_create_attr`` are:
-- ``ssh_keys``: ``list`` of ``strings``; A list of SSH public keys.
-- ``volume_size_gb``: ``integer``; The size in GB of the root volume.
-- ``bulk_volume_size_gb``: ``integer``; The size in GB of the bulk storage volume.
-- ``use_public_network``: ``boolean`` Attaching/Detaching the public network interface.
-- ``use_private_network``: ``boolean`` Attaching/Detaching the private network interface.
-- ``use_ipv6``: ``boolean`` Enabling/Disabling IPv6.
-- ``anti_affinity_with``: ``string``; Pass the UUID of another server.
-- ``user_data``: ``string``; Cloud-init configuration (cloud-config). Provide YAML.
+- ``ssh_keys`` (``list`` of ``str``) - A list of SSH public keys.
+- ``volume_size_gb`` (``int``) - The size in GB of the root volume.
+- ``bulk_volume_size_gb`` (``int``) - The size in GB of the bulk storage volume.
+- ``use_public_network`` (``bool``) - Attaching/Detaching the public network interface.
+- ``use_private_network`` (``bool``) - Attaching/Detaching the private network interface.
+- ``use_ipv6`` (``bool``) - Enabling/Disabling IPv6.
+- ``anti_affinity_with`` (``str``) - Pass the UUID of another server.
+- ``user_data`` (``str``) - Cloud-init configuration (cloud-config). Provide YAML.
There's more extensive documentation on these parameters in our
http://git-wip-us.apache.org/repos/asf/libcloud/blob/d1b7d786/docs/examples/compute/cloudscale/cloudscale_compute_simple.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/cloudscale/cloudscale_compute_simple.py b/docs/examples/compute/cloudscale/cloudscale_compute_simple.py
index eb2f99d..872f093 100644
--- a/docs/examples/compute/cloudscale/cloudscale_compute_simple.py
+++ b/docs/examples/compute/cloudscale/cloudscale_compute_simple.py
@@ -7,7 +7,8 @@ cls = libcloud.get_driver(
libcloud.DriverType.COMPUTE.CLOUDSCALE
)
-driver = cls('3pjzjh3h3rfynqa4iemvtvc33pyfzss2')
+TOKEN = '3pjzjh3h3rfynqa4iemvtvc33pyfzss2'
+driver = cls(TOKEN)
sizes = driver.list_sizes()
images = driver.list_images()
http://git-wip-us.apache.org/repos/asf/libcloud/blob/d1b7d786/libcloud/compute/drivers/cloudscale.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudscale.py b/libcloud/compute/drivers/cloudscale.py
index e654e57..a998975 100644
--- a/libcloud/compute/drivers/cloudscale.py
+++ b/libcloud/compute/drivers/cloudscale.py
@@ -48,7 +48,7 @@ class CloudscaleResponse(JsonResponse):
class CloudscaleConnection(ConnectionKey):
"""
- Connection class for the Vultr driver.
+ Connection class for the cloudscale.ch driver.
"""
host = 'api.cloudscale.ch'
responseCls = CloudscaleResponse
[3/9] libcloud git commit: Create documentation for the cloudscale
driver.
Posted by an...@apache.org.
Create documentation for the cloudscale driver.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/fd9fefdf
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/fd9fefdf
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/fd9fefdf
Branch: refs/heads/trunk
Commit: fd9fefdf1a381328809e5f7329c755fa6eb5ee6c
Parents: 588cb0c
Author: Dave Halter <da...@gmail.com>
Authored: Tue Nov 22 16:26:04 2016 +0100
Committer: Dave Halter <da...@gmail.com>
Committed: Tue Nov 22 16:26:04 2016 +0100
----------------------------------------------------------------------
.../images/provider_logos/cloudscale.png | Bin 0 -> 61533 bytes
docs/compute/_supported_methods_main.rst | 2 +
docs/compute/_supported_providers.rst | 2 +
docs/compute/drivers/cloudscale.rst | 75 +++++++++++++++++++
.../cloudscale/cloudscale_compute_simple.py | 26 +++++++
libcloud/compute/drivers/cloudscale.py | 40 +++++++++-
6 files changed, 141 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/fd9fefdf/docs/_static/images/provider_logos/cloudscale.png
----------------------------------------------------------------------
diff --git a/docs/_static/images/provider_logos/cloudscale.png b/docs/_static/images/provider_logos/cloudscale.png
new file mode 100644
index 0000000..c4de9c4
Binary files /dev/null and b/docs/_static/images/provider_logos/cloudscale.png differ
http://git-wip-us.apache.org/repos/asf/libcloud/blob/fd9fefdf/docs/compute/_supported_methods_main.rst
----------------------------------------------------------------------
diff --git a/docs/compute/_supported_methods_main.rst b/docs/compute/_supported_methods_main.rst
index d369cb7..23ca5d8 100644
--- a/docs/compute/_supported_methods_main.rst
+++ b/docs/compute/_supported_methods_main.rst
@@ -10,6 +10,7 @@ Provider list nodes create node reboot node destroy
`Bluebox Blocks`_ yes yes yes yes yes yes yes
`Brightbox`_ yes yes no yes yes yes no
`BSNL`_ yes yes yes yes yes yes yes
+`cloudscale.ch`_ yes yes yes yes yes yes no
`CloudSigma (API v2.0)`_ yes yes no yes yes yes no
`CloudStack`_ yes yes yes yes yes yes yes
`Cloudwatt`_ yes yes yes yes yes yes yes
@@ -66,6 +67,7 @@ Provider list nodes create node reboot node destroy
.. _`Bluebox Blocks`: http://bluebox.net
.. _`Brightbox`: http://www.brightbox.co.uk/
.. _`BSNL`: http://www.bsnlcloud.com/
+.. _`cloudscale.ch`: https://www.cloudscale.ch/
.. _`CloudSigma (API v2.0)`: http://www.cloudsigma.com/
.. _`CloudStack`: http://cloudstack.org/
.. _`Cloudwatt`: https://www.cloudwatt.com/
http://git-wip-us.apache.org/repos/asf/libcloud/blob/fd9fefdf/docs/compute/_supported_providers.rst
----------------------------------------------------------------------
diff --git a/docs/compute/_supported_providers.rst b/docs/compute/_supported_providers.rst
index 377a046..63313d1 100644
--- a/docs/compute/_supported_providers.rst
+++ b/docs/compute/_supported_providers.rst
@@ -10,6 +10,7 @@ Provider Documentation
`Bluebox Blocks`_ BLUEBOX single region driver :mod:`libcloud.compute.drivers.bluebox` :class:`BlueboxNodeDriver`
`Brightbox`_ BRIGHTBOX single region driver :mod:`libcloud.compute.drivers.brightbox` :class:`BrightboxNodeDriver`
`BSNL`_ :doc:`Click </compute/drivers/bsnl>` BSNL single region driver :mod:`libcloud.compute.drivers.bsnl` :class:`BSNLNodeDriver`
+`cloudscale.ch`_ :doc:`Click </compute/drivers/cloudscale` CLOUDSCALE single region driver :mod:`libcloud.compute.drivers.cloudscale` :class:`CloudscaleNodeDriver`
`CloudSigma (API v2.0)`_ :doc:`Click </compute/drivers/cloudsigma>` CLOUDSIGMA single region driver :mod:`libcloud.compute.drivers.cloudsigma` :class:`CloudSigmaNodeDriver`
`CloudStack`_ :doc:`Click </compute/drivers/cloudstack>` CLOUDSTACK single region driver :mod:`libcloud.compute.drivers.cloudstack` :class:`CloudStackNodeDriver`
`Cloudwatt`_ :doc:`Click </compute/drivers/cloudwatt>` CLOUDWATT single region driver :mod:`libcloud.compute.drivers.cloudwatt` :class:`CloudwattNodeDriver`
@@ -66,6 +67,7 @@ Provider Documentation
.. _`Bluebox Blocks`: http://bluebox.net
.. _`Brightbox`: http://www.brightbox.co.uk/
.. _`BSNL`: http://www.bsnlcloud.com/
+.. _`cloudscale.ch`: https://www.cloudscale.ch/
.. _`CloudSigma (API v2.0)`: http://www.cloudsigma.com/
.. _`CloudStack`: http://cloudstack.org/
.. _`Cloudwatt`: https://www.cloudwatt.com/
http://git-wip-us.apache.org/repos/asf/libcloud/blob/fd9fefdf/docs/compute/drivers/cloudscale.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/cloudscale.rst b/docs/compute/drivers/cloudscale.rst
new file mode 100644
index 0000000..5fbcdfc
--- /dev/null
+++ b/docs/compute/drivers/cloudscale.rst
@@ -0,0 +1,75 @@
+Cloudscale Compute Driver Documentation
+=======================================
+
+`cloudscale.ch`_ is a public cloud provider based in Switzerland.
+
+.. figure:: /_static/images/provider_logos/cloudscale.png
+ :align: center
+ :width: 200
+ :target: http://www.cloudscale.ch
+
+
+How to get an API Key
+---------------------
+
+Simply visit `<https://control.cloudscale.ch/user/api-tokens>`_ and start
+having fun!
+
+You can generate read and read/write API keys. These token types give you more
+access control. Revoking an API token is also possible.
+
+Using the API to the full extent
+--------------------------------
+
+Most of the `cloudscale.ch` API is covered by the simple commands:
+
+- ``driver.list_sizes()``
+- ``driver.list_images()``
+- ``driver.list_sizes()``
+- ``driver.reboot_node(node)``
+- ``driver.ex_start_node(node)``
+- ``driver.ex_stop_node(node)``
+- ``driver.ex_node_by_uuid(server_uuid)``
+- ``driver.destroy_node(node)``
+- ``driver.create_node(name, size, image, ex_create_attr={})``
+
+In our :ref:`example <cloudscale-examples>` below you can see how you use
+``ex_create_attr`` when creating servers. Possible dictionary entries in
+``ex_create_attr`` are:
+
+- ``ssh_keys``: ``list`` of ``strings``; A list of SSH public keys.
+- ``volume_size_gb``: ``integer``; The size in GB of the root volume.
+- ``bulk_volume_size_gb``: ``integer``; The size in GB of the bulk storage volume.
+- ``use_public_network``: ``boolean`` Attaching/Detaching the public network interface.
+- ``use_private_network``: ``boolean`` Attaching/Detaching the private network interface.
+- ``use_ipv6``: ``boolean`` Enabling/Disabling IPv6.
+- ``anti_affinity_with``: ``string``; Pass the UUID of another server.
+- ``user_data``: ``string``; Cloud-init configuration (cloud-config). Provide YAML.
+
+
+There's more extensive documentation on these parameters in our
+`Server-Create API Documentation`_.
+
+.. _cloudscale-examples:
+
+Examples
+--------
+
+Create a cloudscale.ch server
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. literalinclude:: /examples/compute/cloudscale/cloudscale_compute_simple.py
+ :language: python
+
+API Docs
+--------
+
+.. autoclass:: libcloud.compute.drivers.cloudscale.CloudscaleNodeDriver
+ :members: create_node, list_images, list_nodes, list_sizes,
+ wait_until_running, reboot_node, ex_start_node, ex_stop_node,
+ ex_node_by_uuid, destroy_node
+ :undoc-members:
+
+.. _`cloudscale.ch`: https://www.cloudscale.ch
+.. _`cloudscale.ch API`: https://www.cloudscale.ch/en/api/v1
+.. _`Server-Create API Documentation`: https://www.cloudscale.ch/en/api/v1#servers-create
http://git-wip-us.apache.org/repos/asf/libcloud/blob/fd9fefdf/docs/examples/compute/cloudscale/cloudscale_compute_simple.py
----------------------------------------------------------------------
diff --git a/docs/examples/compute/cloudscale/cloudscale_compute_simple.py b/docs/examples/compute/cloudscale/cloudscale_compute_simple.py
new file mode 100644
index 0000000..eb2f99d
--- /dev/null
+++ b/docs/examples/compute/cloudscale/cloudscale_compute_simple.py
@@ -0,0 +1,26 @@
+from pprint import pprint
+
+import libcloud
+
+cls = libcloud.get_driver(
+ libcloud.DriverType.COMPUTE,
+ libcloud.DriverType.COMPUTE.CLOUDSCALE
+)
+
+driver = cls('3pjzjh3h3rfynqa4iemvtvc33pyfzss2')
+
+sizes = driver.list_sizes()
+images = driver.list_images()
+pprint(sizes)
+pprint(images)
+
+new_node = driver.create_node(
+ name='hello-darkness-my-old-friend',
+ size=sizes[0],
+ image=images[0],
+ ex_create_attr=dict(
+ ssh_keys=['ssh-rsa AAAAB3Nza...'],
+ use_private_network=True,
+ )
+)
+pprint(new_node)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/fd9fefdf/libcloud/compute/drivers/cloudscale.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudscale.py b/libcloud/compute/drivers/cloudscale.py
index 156f249..e654e57 100644
--- a/libcloud/compute/drivers/cloudscale.py
+++ b/libcloud/compute/drivers/cloudscale.py
@@ -86,12 +86,25 @@ class CloudscaleNodeDriver(NodeDriver):
super(CloudscaleNodeDriver, self).__init__(key, **kwargs)
def list_nodes(self):
+ '''
+ List all your existing compute nodes.
+ '''
return self._list_resources('/v1/servers', self._to_node)
def list_sizes(self):
+ '''
+ Lists all available sizes. On cloudscale these are known as flavors.
+ '''
return self._list_resources('/v1/flavors', self._to_size)
def list_images(self):
+ '''
+ List all images.
+
+ Images are identified by slugs on cloudscale.ch. This means that minor
+ version upgrades (e.g. Ubuntu 16.04.1 to Ubuntu 16.04.2) will be
+ possible within the same id ``ubuntu-16.04``.
+ '''
return self._list_resources('/v1/images', self._to_image)
def create_node(self, name, size, image, location=None, ex_create_attr={}):
@@ -115,10 +128,6 @@ class CloudscaleNodeDriver(NodeDriver):
droplet creation
:type ex_create_attr: ``dict``
- :keyword ex_user_data: User data to be added to the node on create.
- (optional)
- :type ex_user_data: ``str``
-
:return: The newly created node.
:rtype: :class:`Node`
"""
@@ -136,19 +145,42 @@ class CloudscaleNodeDriver(NodeDriver):
return self._to_node(result.object)
def reboot_node(self, node):
+ '''
+ Reboot a node. It's also possible to use ``node.reboot()``.
+ '''
return self._action(node, 'reboot')
def ex_start_node(self, node):
+ '''
+ Start a node. This is only possible if the node is stopped.
+ '''
return self._action(node, 'start')
def ex_stop_node(self, node):
+ '''
+ Stop a specific node. Similar to ``shutdown -h now``. This is only
+ possible if the node is running.
+ '''
return self._action(node, 'stop')
def ex_node_by_uuid(self, uuid):
+ '''
+ :param str ex_user_data: A valid uuid that references your exisiting
+ cloudscale.ch server.
+ :type ex_user_data: ``str``
+
+ :return: The server node you asked for.
+ :rtype: :class:`Node`
+ '''
res = self.connection.request(self._get_server_url(uuid))
return self._to_node(res.object)
def destroy_node(self, node):
+ '''
+ Delete a node. It's also possible to use ``node.destroy()``.
+ This will irreversibly delete the cloudscale.ch server and all its
+ volumes. So please be cautious.
+ '''
res = self.connection.request(
self._get_server_url(node.id),
method='DELETE'
[2/9] libcloud git commit: Fix a pep8 linter issue.
Posted by an...@apache.org.
Fix a pep8 linter issue.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/588cb0c6
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/588cb0c6
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/588cb0c6
Branch: refs/heads/trunk
Commit: 588cb0c646f9bca2be09f47816f9a3e09c84449c
Parents: c6ad701
Author: Dave Halter <da...@gmail.com>
Authored: Tue Nov 22 15:35:36 2016 +0100
Committer: Dave Halter <da...@gmail.com>
Committed: Tue Nov 22 15:35:36 2016 +0100
----------------------------------------------------------------------
libcloud/compute/drivers/cloudscale.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/588cb0c6/libcloud/compute/drivers/cloudscale.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudscale.py b/libcloud/compute/drivers/cloudscale.py
index a439b12..156f249 100644
--- a/libcloud/compute/drivers/cloudscale.py
+++ b/libcloud/compute/drivers/cloudscale.py
@@ -149,7 +149,10 @@ class CloudscaleNodeDriver(NodeDriver):
return self._to_node(res.object)
def destroy_node(self, node):
- res = self.connection.request(self._get_server_url(node.id), method='DELETE')
+ res = self.connection.request(
+ self._get_server_url(node.id),
+ method='DELETE'
+ )
return res.status == httplib.NO_CONTENT
def _get_server_url(self, uuid):
[8/9] libcloud git commit: Merge branch 'github-951' into trunk
closes #951
Posted by an...@apache.org.
Merge branch 'github-951' into trunk
closes #951
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/28dc1c32
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/28dc1c32
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/28dc1c32
Branch: refs/heads/trunk
Commit: 28dc1c32d33bef847ff93cac6cd5b7878eeca164
Parents: 75b129e 75300c5
Author: Anthony Shaw <an...@apache.org>
Authored: Fri Dec 2 21:31:33 2016 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Fri Dec 2 21:31:33 2016 +1100
----------------------------------------------------------------------
.../images/provider_logos/cloudscale.png | Bin 0 -> 61533 bytes
docs/compute/_supported_methods_main.rst | 2 +
docs/compute/_supported_providers.rst | 2 +
docs/compute/drivers/cloudscale.rst | 75 ++++++
.../cloudscale/cloudscale_compute_simple.py | 27 ++
libcloud/compute/drivers/cloudscale.py | 246 +++++++++++++++++++
libcloud/compute/providers.py | 2 +
libcloud/compute/types.py | 2 +
.../fixtures/cloudscale/create_node.json | 46 ++++
.../fixtures/cloudscale/list_images.json | 1 +
.../compute/fixtures/cloudscale/list_nodes.json | 48 ++++
.../compute/fixtures/cloudscale/list_sizes.json | 2 +
libcloud/test/compute/test_cloudscale.py | 122 +++++++++
libcloud/test/secrets.py-dist | 1 +
14 files changed, 576 insertions(+)
----------------------------------------------------------------------
[5/9] libcloud git commit: Fix a small typo.
Posted by an...@apache.org.
Fix a small typo.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8f116200
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8f116200
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8f116200
Branch: refs/heads/trunk
Commit: 8f116200c5597e7d99dc77cb7911012635eb300e
Parents: d1b7d78
Author: Dave Halter <da...@gmail.com>
Authored: Wed Nov 23 17:27:42 2016 +0100
Committer: Dave Halter <da...@gmail.com>
Committed: Wed Nov 23 17:27:42 2016 +0100
----------------------------------------------------------------------
libcloud/compute/drivers/cloudscale.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8f116200/libcloud/compute/drivers/cloudscale.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudscale.py b/libcloud/compute/drivers/cloudscale.py
index a998975..98034ec 100644
--- a/libcloud/compute/drivers/cloudscale.py
+++ b/libcloud/compute/drivers/cloudscale.py
@@ -203,7 +203,7 @@ class CloudscaleNodeDriver(NodeDriver):
def _to_node(self, data):
state = self.NODE_STATE_MAP.get(data['status'], NodeState.UNKNOWN)
- extra_keys = ['volumes', 'inferfaces', 'anti_affinity_with']
+ extra_keys = ['volumes', 'interfaces', 'anti_affinity_with']
extra = {}
for key in extra_keys:
if key in data:
[9/9] libcloud git commit: change for #951
Posted by an...@apache.org.
change for #951
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b2662d52
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b2662d52
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b2662d52
Branch: refs/heads/trunk
Commit: b2662d529b7b931c82195f1a5667dd0c273fdc37
Parents: 28dc1c3
Author: Anthony Shaw <an...@apache.org>
Authored: Fri Dec 2 21:32:11 2016 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Fri Dec 2 21:32:11 2016 +1100
----------------------------------------------------------------------
CHANGES.rst | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b2662d52/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 4932d8d..1ad7da0 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -8,6 +8,8 @@ Changes in current version of Apache Libcloud
Compute
~~~~~~~
+- Added new CloudScale.ch driver
+
- [dimensiondata] Added support for 2.4 API, added support for image import, cloning. Add feature for changing NIC VLANs, add feature for changing
NIC order for a server.
(GITHUB-953)
[7/9] libcloud git commit: Change the duplicate of list_sizes and
rename it to list_nodes.
Posted by an...@apache.org.
Change the duplicate of list_sizes and rename it to list_nodes.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/75300c55
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/75300c55
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/75300c55
Branch: refs/heads/trunk
Commit: 75300c556b6100545f13e561839460c23b001aeb
Parents: 5bf298f
Author: Dave Halter <da...@gmail.com>
Authored: Tue Nov 29 10:52:44 2016 +0100
Committer: Dave Halter <da...@gmail.com>
Committed: Tue Nov 29 10:52:44 2016 +0100
----------------------------------------------------------------------
docs/compute/drivers/cloudscale.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/75300c55/docs/compute/drivers/cloudscale.rst
----------------------------------------------------------------------
diff --git a/docs/compute/drivers/cloudscale.rst b/docs/compute/drivers/cloudscale.rst
index f98981d..2f3bc79 100644
--- a/docs/compute/drivers/cloudscale.rst
+++ b/docs/compute/drivers/cloudscale.rst
@@ -25,7 +25,7 @@ Most of the `cloudscale.ch` API is covered by the simple commands:
- ``driver.list_sizes()``
- ``driver.list_images()``
-- ``driver.list_sizes()``
+- ``driver.list_nodes()``
- ``driver.reboot_node(node)``
- ``driver.ex_start_node(node)``
- ``driver.ex_stop_node(node)``