libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [6/9] libcloud git commit: [LIBCLOUD-873] Updated ProfitBricks Compute Driver (REST api v3)
Date Mon, 14 Nov 2016 04:18:06 GMT
[LIBCLOUD-873] Updated ProfitBricks Compute Driver (REST api v3)

Refactoring the compute  driver to remove support for the EOL SOAP api and modifying api calls
to use the REST api (v3).

Removing XML test fixtures and replacing them with JSON fixtures.

Providing wrappers for all new functionality provided in v3 of the Cloud API.

Addressing an issue in libcloud/common/base.py where a http status code of 202 would not be
flagged as a successful request.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2569a5f2
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2569a5f2
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2569a5f2

Branch: refs/heads/trunk
Commit: 2569a5f2a953314483712667a964e5463990f617
Parents: 3b515f4
Author: Matt Finucane <matfin@gmail.com>
Authored: Mon Oct 10 13:17:10 2016 +0200
Committer: Matt Finucane <matfin@gmail.com>
Committed: Thu Nov 3 23:44:32 2016 +0100

----------------------------------------------------------------------
 libcloud/common/base.py                         |    2 +-
 libcloud/compute/drivers/profitbricks.py        | 4101 ++++++++++---
 .../fixtures/profitbricks/attach_volume.json    |   34 +
 .../fixtures/profitbricks/attach_volume.xml     |   12 -
 .../fixtures/profitbricks/create_node.json      |   37 +
 .../fixtures/profitbricks/create_node.xml       |   13 -
 .../fixtures/profitbricks/create_volume.json    |   35 +
 .../fixtures/profitbricks/create_volume.xml     |   13 -
 .../profitbricks/create_volume_snapshot.json    |   30 +
 .../fixtures/profitbricks/destroy_node.xml      |   12 -
 .../fixtures/profitbricks/destroy_volume.xml    |   12 -
 .../fixtures/profitbricks/detach_volume.xml     |   12 -
 .../profitbricks/ex_clear_datacenter.xml        |   12 -
 .../profitbricks/ex_create_datacenter.json      |   20 +
 .../profitbricks/ex_create_datacenter.xml       |   13 -
 .../profitbricks/ex_create_firewall_rule.json   |   24 +
 .../profitbricks/ex_create_ip_block.json        |   22 +
 .../fixtures/profitbricks/ex_create_lan.json    |   17 +
 .../profitbricks/ex_create_load_balancer.json   |   18 +
 .../ex_create_network_interface.json            |   22 +
 .../ex_create_network_interface.xml             |   13 -
 .../profitbricks/ex_describe_datacenter.json    |  401 ++
 .../profitbricks/ex_describe_datacenter.xml     |   15 -
 .../profitbricks/ex_describe_firewall_rule.json |   24 +
 .../profitbricks/ex_describe_image.json         |   32 +
 .../profitbricks/ex_describe_ip_block.json      |   21 +
 .../fixtures/profitbricks/ex_describe_lan.json  |   24 +
 .../profitbricks/ex_describe_load_balancer.json |   25 +
 .../profitbricks/ex_describe_location.json      |   12 +
 .../ex_describe_network_interface.json          |   31 +
 .../ex_describe_network_interface.xml           |   26 -
 .../fixtures/profitbricks/ex_describe_node.json |  111 +
 .../fixtures/profitbricks/ex_describe_node.xml  |   77 -
 .../profitbricks/ex_describe_snapshot.json      |   30 +
 .../profitbricks/ex_describe_volume.json        |   35 +
 .../profitbricks/ex_describe_volume.xml         |   22 -
 .../profitbricks/ex_destroy_datacenter.xml      |   10 -
 .../ex_destroy_network_interface.xml            |   12 -
 .../profitbricks/ex_list_attached_volumes.json  |  112 +
 .../profitbricks/ex_list_datacenters.json       |   52 +
 .../profitbricks/ex_list_datacenters.xml        |   19 -
 .../profitbricks/ex_list_firewall_rules.json    |   79 +
 .../profitbricks/ex_list_ip_blocks.json         |   50 +
 .../fixtures/profitbricks/ex_list_lans.json     |  157 +
 .../ex_list_load_balanced_nics.json             |   69 +
 .../profitbricks/ex_list_load_balancers.json    |  216 +
 .../ex_list_network_interfaces.json             |   69 +
 .../profitbricks/ex_list_network_interfaces.xml |   75 -
 .../profitbricks/ex_rename_datacenter.json      |   46 +
 .../profitbricks/ex_set_inet_access.json        |   31 +
 .../fixtures/profitbricks/ex_start_node.xml     |   10 -
 .../fixtures/profitbricks/ex_stop_node.xml      |   10 -
 .../profitbricks/ex_update_datacenter.xml       |   12 -
 .../profitbricks/ex_update_firewall_rule.json   |   25 +
 .../fixtures/profitbricks/ex_update_image.json  |   32 +
 .../fixtures/profitbricks/ex_update_lan.json    |   24 +
 .../profitbricks/ex_update_load_balancer.json   |   18 +
 .../ex_update_network_interface.json            |   31 +
 .../ex_update_network_interface.xml             |   12 -
 .../fixtures/profitbricks/ex_update_node.json   |   45 +
 .../fixtures/profitbricks/ex_update_node.xml    |   12 -
 .../profitbricks/ex_update_snapshot.json        |   30 +
 .../fixtures/profitbricks/ex_update_volume.json |   35 +
 .../fixtures/profitbricks/ex_update_volume.xml  |   12 -
 .../fixtures/profitbricks/list_images.json      |  199 +
 .../fixtures/profitbricks/list_images.xml       |   43 -
 .../fixtures/profitbricks/list_locations.json   |   43 +
 .../fixtures/profitbricks/list_nodes.json       |  169 +
 .../fixtures/profitbricks/list_nodes.xml        |  172 -
 .../fixtures/profitbricks/list_snapshots.json   |   37 +
 .../fixtures/profitbricks/list_volumes.json     |  112 +
 .../fixtures/profitbricks/list_volumes.xml      |   66 -
 .../fixtures/profitbricks/reboot_node.xml       |   10 -
 libcloud/test/compute/test_profitbricks.py      | 5377 ++++++++++++++++--
 74 files changed, 10999 insertions(+), 1894 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/2569a5f2/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index 3b03fa3..cfe075a 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -212,7 +212,7 @@ class Response(object):
         :rtype: ``bool``
         :return: ``True`` or ``False``
         """
-        return self.status in [httplib.OK, httplib.CREATED]
+        return self.status in [httplib.OK, httplib.CREATED, httplib.ACCEPTED]
 
     def _decompress_response(self, body, headers):
         """


Mime
View raw message