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 2015/11/18 08:52:05 UTC
[01/18] libcloud git commit: Corrected dd-ap 'host'
Repository: libcloud
Updated Branches:
refs/heads/trunk 849043eaa -> 8abaf891c
Updated Tags: refs/tags/v0.15.0-tentative [created] e71615f8d
refs/tags/v0.15.1-tentative [created] 6df77f6e2
refs/tags/v0.19.0-tentative [created] 5d9540b48
Corrected dd-ap 'host'
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b97168e2
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b97168e2
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b97168e2
Branch: refs/heads/trunk
Commit: b97168e212579e4b21a09694bf271e9385d06b7f
Parents: 64f5664
Author: Ming Sheng <mi...@gmail.com>
Authored: Thu Sep 17 18:12:58 2015 +0800
Committer: Ming Sheng <mi...@gmail.com>
Committed: Thu Sep 17 18:12:58 2015 +0800
----------------------------------------------------------------------
libcloud/common/dimensiondata.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/b97168e2/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index 85ca6c8..5a023b3 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -61,7 +61,7 @@ API_ENDPOINTS = {
},
'dd-ap': {
'name': 'Asia Pacific (AP)',
- 'host': 'api-na.dimensiondata.com',
+ 'host': 'api-ap.dimensiondata.com',
'vendor': 'DimensionData'
},
'dd-latam': {
[10/18] libcloud git commit: Commenting the existing network
functions to provide clearer help
Posted by an...@apache.org.
Commenting the existing network functions to provide clearer help
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/c923de36
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/c923de36
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/c923de36
Branch: refs/heads/trunk
Commit: c923de363ae478505b7e84c9485f2832aa28d7e2
Parents: b90060b
Author: Anthony Shaw <an...@gmail.com>
Authored: Fri Oct 30 09:52:52 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Fri Oct 30 09:52:52 2015 +1100
----------------------------------------------------------------------
libcloud/compute/drivers/dimensiondata.py | 155 ++++++++++++++++++++++++-
1 file changed, 149 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/c923de36/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index ee76daf..1015562 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -165,6 +165,15 @@ class DimensionDataNodeDriver(NodeDriver):
return node
def destroy_node(self, node):
+ """
+ Deletes a node, node must be stopped before deletion
+
+
+ :keyword node: The node to delete
+ :type node: :class:`Node`
+
+ :rtype: ``bool``
+ """
request_elm = ET.Element('deleteServer',
{'xmlns': TYPES_URN, 'id': node.id})
body = self.connection.request_with_orgId_api_2(
@@ -175,6 +184,15 @@ class DimensionDataNodeDriver(NodeDriver):
return response_code in ['IN_PROGRESS', 'OK']
def reboot_node(self, node):
+ """
+ Reboots a node by requesting the OS restart via the hypervisor
+
+
+ :keyword node: The node to reboot
+ :type node: :class:`Node`
+
+ :rtype: ``bool``
+ """
request_elm = ET.Element('rebootServer',
{'xmlns': TYPES_URN, 'id': node.id})
body = self.connection.request_with_orgId_api_2(
@@ -185,6 +203,13 @@ class DimensionDataNodeDriver(NodeDriver):
return response_code in ['IN_PROGRESS', 'OK']
def list_nodes(self):
+ """
+ List nodes deployed across all data center locations for your
+ organization.
+
+ :return: a list of `Node` objects
+ :rtype: ``list`` of :class:`Node`
+ """
nodes = self._to_nodes(
self.connection.request_with_orgId_api_2('server/server').object)
@@ -377,6 +402,19 @@ class DimensionDataNodeDriver(NodeDriver):
return response_code in ['IN_PROGRESS', 'OK']
def ex_attach_node_to_vlan(self, node, vlan):
+ """
+ Attach a node to a VLAN by adding an additional NIC to
+ the node on the target VLAN. The IP will be automatically
+ assigned based on the VLAN IP network space.
+
+ :param node: Node which should be used
+ :type node: :class:`Node`
+
+ :param vlan: VLAN to attach the node to
+ :type vlan: :class:`DimensionDataVlan`
+
+ :rtype: ``bool``
+ """
request = ET.Element('addNic',
{'xmlns': TYPES_URN})
ET.SubElement(request, 'serverId').text = node.id
@@ -391,6 +429,14 @@ class DimensionDataNodeDriver(NodeDriver):
return response_code in ['IN_PROGRESS', 'OK']
def ex_destroy_nic(self, nic_id):
+ """
+ Remove a NIC on a node, removing the node from a VLAN
+
+ :param nic_id: The identifier of the NIC to remove
+ :type nic_id: ``str``
+
+ :rtype: ``bool``
+ """
request = ET.Element('removeNic',
{'xmlns': TYPES_URN,
'id': nic_id})
@@ -420,6 +466,14 @@ class DimensionDataNodeDriver(NodeDriver):
return self._to_networks(response)
def ex_get_network_domain(self, network_domain_id):
+ """
+ Get an individual Network Domain, by identifier
+
+ :param network_domain_id: The identifier of the network domain
+ :type network_domain_id: ``str``
+
+ :rtype: :class:`DimensionDataNetworkDomain`
+ """
locations = self.list_locations()
net = self.connection.request_with_orgId_api_2(
'network/networkDomain/%s' % network_domain_id).object
@@ -427,10 +481,14 @@ class DimensionDataNodeDriver(NodeDriver):
def ex_list_network_domains(self, location=None):
"""
- List networks deployed across all data center locations for your
- organization. The response includes the location of each network.
+ List networks domains deployed across all data center locations
+ for your organization.
+ The response includes the location of each network domain.
- :return: a list of DimensionDataNetwork objects
+ :param location: The data center to list (optional)
+ :type location: :class:`NodeLocation`
+
+ :return: a list of `DimensionDataNetwork` objects
:rtype: ``list`` of :class:`DimensionDataNetwork`
"""
params = {}
@@ -446,6 +504,22 @@ class DimensionDataNodeDriver(NodeDriver):
description=None):
"""
Deploy a new network domain to a data center
+
+ :param location: The data center to list
+ :type location: :class:`NodeLocation`
+
+ :param name: The name of the network domain to create
+ :type name: ``str``
+
+ :param service_plan: The service plan, either "ESSENTIALS"
+ or "ADVANCED"
+ :type service_plan: ``str``
+
+ :param description: An additional description of the network domain
+ :type description: ``str``
+
+ :return: an instance of `DimensionDataNetworkDomain`
+ :rtype: :class:`DimensionDataNetworkDomain`
"""
create_node = ET.Element('deployNetworkDomain', {'xmlns': TYPES_URN})
ET.SubElement(create_node, "datacenterId").text = location.id
@@ -477,6 +551,12 @@ class DimensionDataNodeDriver(NodeDriver):
def ex_update_network_domain(self, network_domain):
"""
Update the properties of a network domain
+
+ :param network_domain: The network domain with updated properties
+ :type network_domain: :class:`DimensionDataNetworkDomain`
+
+ :return: an instance of `DimensionDataNetworkDomain`
+ :rtype: :class:`DimensionDataNetworkDomain`
"""
edit_node = ET.Element('editNetworkDomain', {'xmlns': TYPES_URN})
edit_node.set('id', network_domain.id)
@@ -494,6 +574,14 @@ class DimensionDataNodeDriver(NodeDriver):
return network_domain
def ex_delete_network_domain(self, network_domain):
+ """
+ Delete a network domain
+
+ :param network_domain: The network domain to delete
+ :type network_domain: :class:`DimensionDataNetworkDomain`
+
+ :rtype: ``bool``
+ """
delete_node = ET.Element('deleteNetworkDomain', {'xmlns': TYPES_URN})
delete_node.set('id', network_domain.id)
result = self.connection.request_with_orgId_api_2(
@@ -509,9 +597,29 @@ class DimensionDataNodeDriver(NodeDriver):
name,
private_ipv4_base_address,
description=None,
- private_ipv4_prefix_size='24'):
+ private_ipv4_prefix_size=24):
"""
Deploy a new VLAN to a network domain
+
+ :param network_domain: The network domain to add the VLAN to
+ :type network_domain: :class:`DimensionDataNetworkDomain`
+
+ :param name: The name of the VLAN to create
+ :type name: ``str``
+
+ :param private_ipv4_base_address: The base IPv4 address
+ e.g. 192.168.1.0
+ :type private_ipv4_base_address: ``str``
+
+ :param description: An additional description of the VLAN
+ :type description: ``str``
+
+ :param private_ipv4_prefix_size: The size of the IPv4
+ address space, e.g 24
+ :type private_ipv4_prefix_size: ``int``
+
+ :return: an instance of `DimensionDataVlan`
+ :rtype: :class:`DimensionDataVlan`
"""
create_node = ET.Element('deployVlan', {'xmlns': TYPES_URN})
ET.SubElement(create_node, "networkDomainId").text = network_domain.id
@@ -521,7 +629,7 @@ class DimensionDataNodeDriver(NodeDriver):
ET.SubElement(create_node, "privateIpv4BaseAddress").text = \
private_ipv4_base_address
ET.SubElement(create_node, "privateIpv4PrefixSize").text = \
- private_ipv4_prefix_size
+ str(private_ipv4_prefix_size)
response = self.connection.request_with_orgId_api_2(
'network/deployVlan',
@@ -545,6 +653,15 @@ class DimensionDataNodeDriver(NodeDriver):
)
def ex_get_vlan(self, vlan_id):
+ """
+ Get a single VLAN, by it's identifier
+
+ :param vlan_id: The identifier of the VLAN
+ :type vlan_id: ``str``
+
+ :return: an instance of `DimensionDataVlan`
+ :rtype: :class:`DimensionDataVlan`
+ """
locations = self.list_locations()
vlan = self.connection.request_with_orgId_api_2(
'network/vlan/%s' % vlan_id).object
@@ -554,6 +671,12 @@ class DimensionDataNodeDriver(NodeDriver):
"""
Updates the properties of the given VLAN
Only name and description are updated
+
+ :param vlan: The VLAN to update
+ :type vlan: :class:`DimensionDataNetworkDomain`
+
+ :return: an instance of `DimensionDataVlan`
+ :rtype: :class:`DimensionDataVlan`
"""
edit_node = ET.Element('editVlan', {'xmlns': TYPES_URN})
edit_node.set('id', vlan.id)
@@ -575,6 +698,12 @@ class DimensionDataNodeDriver(NodeDriver):
The expansion will
not be permitted if the proposed IP space overlaps with an
already deployed VLANs IP space.
+
+ :param vlan: The VLAN to update
+ :type vlan: :class:`DimensionDataNetworkDomain`
+
+ :return: an instance of `DimensionDataVlan`
+ :rtype: :class:`DimensionDataVlan`
"""
edit_node = ET.Element('expandVlan', {'xmlns': TYPES_URN})
edit_node.set('id', vlan.id)
@@ -589,6 +718,14 @@ class DimensionDataNodeDriver(NodeDriver):
return vlan
def ex_delete_vlan(self, vlan):
+ """
+ Deletes an existing VLAN
+
+ :param vlan: The VLAN to delete
+ :type vlan: :class:`DimensionDataNetworkDomain`
+
+ :rtype: ``bool``
+ """
delete_node = ET.Element('deleteVlan', {'xmlns': TYPES_URN})
delete_node.set('id', vlan.id)
result = self.connection.request_with_orgId_api_2(
@@ -601,7 +738,13 @@ class DimensionDataNodeDriver(NodeDriver):
def ex_list_vlans(self, location=None, network_domain=None):
"""
- List VLANs available in a given networkDomain
+ List VLANs available, can filter by location and/or network domain
+
+ :param location: Only VLANs in this location (optional)
+ :type location: :class:`NodeLocation`
+
+ :param network_domain: Only VLANs in this domain (optional)
+ :type network_domain: :class:`DimensionDataNetworkDomain`
:return: a list of DimensionDataVlan objects
:rtype: ``list`` of :class:`DimensionDataVlan`
[08/18] libcloud git commit: Merge branch 'trunk' of
https://github.com/apache/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/apache/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/20a2cf7c
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/20a2cf7c
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/20a2cf7c
Branch: refs/heads/trunk
Commit: 20a2cf7cf88959a37d027b1e53519c11f4c18de3
Parents: 2189a6b 3bcd60a
Author: Anthony Shaw <an...@gmail.com>
Authored: Fri Oct 23 16:22:26 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Fri Oct 23 16:22:26 2015 +1100
----------------------------------------------------------------------
docs/examples/compute/azure/instantiate.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[16/18] libcloud git commit: Merge remote-tracking branch
'libcloud/trunk' into trunk
Posted by an...@apache.org.
Merge remote-tracking branch 'libcloud/trunk' into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/1d21f444
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/1d21f444
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/1d21f444
Branch: refs/heads/trunk
Commit: 1d21f444e41f40ec32c4222cfb8b1542486bb862
Parents: 43fbf56 232f949
Author: Anthony Shaw <an...@gmail.com>
Authored: Fri Nov 13 13:54:01 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Fri Nov 13 13:54:01 2015 +1100
----------------------------------------------------------------------
CHANGES.rst | 5 ++
libcloud/common/dimensiondata.py | 54 +++++++++++++++++--
libcloud/compute/drivers/dimensiondata.py | 55 ++++++++++++++------
libcloud/loadbalancer/drivers/dimensiondata.py | 29 +++++++++++
...2745_4d8a_9cbc_8dabe5a7d0e4_network_vlan.xml | 26 +--------
...lan_0e56433f_d808_4669_821d_812769517ff8.xml | 2 +-
libcloud/test/compute/test_dimensiondata.py | 7 ++-
7 files changed, 134 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
[07/18] libcloud git commit: Merge branch 'trunk' of
https://github.com/apache/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/apache/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2189a6bb
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2189a6bb
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2189a6bb
Branch: refs/heads/trunk
Commit: 2189a6bbd97c7ffd4bf5d978b045a787044cc455
Parents: b0d8626 fccf348
Author: Anthony Shaw <an...@gmail.com>
Authored: Tue Oct 20 08:29:14 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Tue Oct 20 08:29:14 2015 +1100
----------------------------------------------------------------------
CHANGES.rst | 41 +-
CONTRIBUTING.rst | 2 +-
MANIFEST.in | 3 +
NOTICE | 2 +-
README.rst | 6 +-
docs/committer_guide.rst | 4 +-
docs/compute/deployment.rst | 8 +-
docs/compute/drivers/cloudsigma.rst | 14 +-
docs/compute/drivers/ec2.rst | 5 +-
docs/compute/drivers/gce.rst | 2 +-
docs/compute/drivers/hpcloud.rst | 4 +-
docs/compute/drivers/kili.rst | 2 +-
docs/compute/drivers/openstack.rst | 6 +-
docs/compute/drivers/rackspace.rst | 2 +-
docs/compute/drivers/vsphere.rst | 4 +-
docs/compute/pricing.rst | 2 +-
docs/development.rst | 8 +-
docs/dns/drivers/durabledns.rst | 27 +
docs/examples/compute/create_ec2_node.py | 4 +-
.../create_ec2_node_and_associate_elastic_ip.py | 4 +-
.../compute/create_ec2_node_custom_ami.py | 4 +-
docs/examples/compute/create_ec2_node_iam.py | 4 +-
.../create_ec2_node_manual_instantiation.py | 4 +-
.../compute/ec2/temporary_credentials.py | 4 +-
.../dns/durabledns/instantiate_driver.py | 5 +
docs/other/ssl-certificate-validation.rst | 2 +-
docs/other/using-http-proxy.rst | 4 +-
...-in-multithreaded-and-async-environments.rst | 2 +-
docs/other/working-with-oo-apis.rst | 4 +-
docs/security.rst | 4 +-
docs/testing.rst | 2 +-
docs/upgrade_notes.rst | 10 +-
libcloud/__init__.py | 2 +-
libcloud/common/dimensiondata.py | 130 +++-
libcloud/common/durabledns.py | 285 ++++++++
libcloud/compute/drivers/cloudstack.py | 122 ++--
libcloud/compute/drivers/dimensiondata.py | 496 +++++++++++++-
libcloud/compute/drivers/ec2.py | 10 +
libcloud/compute/drivers/gce.py | 5 +
libcloud/compute/drivers/softlayer.py | 3 +-
libcloud/compute/ssh.py | 2 +-
libcloud/data/pricing.json | 15 +
libcloud/dns/drivers/dnsimple.py | 19 +-
libcloud/dns/drivers/durabledns.py | 660 +++++++++++++++++++
libcloud/dns/drivers/liquidweb.py | 53 +-
libcloud/dns/drivers/pointdns.py | 10 +-
libcloud/dns/drivers/vultr.py | 25 +-
libcloud/dns/drivers/worldwidedns.py | 32 +-
libcloud/dns/providers.py | 2 +
libcloud/dns/types.py | 3 +
libcloud/loadbalancer/drivers/dimensiondata.py | 136 +++-
.../cloudstack/queryAsyncJobResult_17200.json | 2 +-
...bc_8dabe5a7d0e4_network_addPublicIpBlock.xml | 7 +
..._8dabe5a7d0e4_network_createFirewallRule.xml | 8 +
..._9cbc_8dabe5a7d0e4_network_createNatRule.xml | 9 +
..._8dabe5a7d0e4_network_deleteFirewallRule.xml | 8 +
..._9cbc_8dabe5a7d0e4_network_deleteNatRule.xml | 8 +
...8dabe5a7d0e4_network_deleteNetworkDomain.xml | 8 +
...d8a_9cbc_8dabe5a7d0e4_network_deleteVlan.xml | 8 +
...8dabe5a7d0e4_network_deployNetworkDomain.xml | 8 +
...d8a_9cbc_8dabe5a7d0e4_network_deployVlan.xml | 9 +
...bc_8dabe5a7d0e4_network_editFirewallRule.xml | 8 +
...c_8dabe5a7d0e4_network_editNetworkDomain.xml | 7 +
..._4d8a_9cbc_8dabe5a7d0e4_network_editVlan.xml | 7 +
...d8a_9cbc_8dabe5a7d0e4_network_expandVlan.xml | 8 +
...a_9cbc_8dabe5a7d0e4_network_firewallRule.xml | 210 ++++++
...ule_d0a20f59_77b9_4f28_a63b_e58496b73a6c.xml | 18 +
...5_4d8a_9cbc_8dabe5a7d0e4_network_natRule.xml | 21 +
...ule_2187a636_7ebb_49a1_a2ff_5d617f496dce.xml | 9 +
...ain_8cdfd607_f429_4df6_9352_162cfc0891be.xml | 9 +
..._9cbc_8dabe5a7d0e4_network_publicIpBlock.xml | 10 +
...ock_4487241a_f0ca_11e3_9315_d4bed9b167ba.xml | 8 +
...ock_9945dc4a_bdce_11e4_8c14_b8ca3a5d9ef8.xml | 8 +
...8dabe5a7d0e4_network_removePublicIpBlock.xml | 8 +
...lan_0e56433f_d808_4669_821d_812769517ff8.xml | 14 +
...745_4d8a_9cbc_8dabe5a7d0e4_server_addNic.xml | 9 +
..._4d8a_9cbc_8dabe5a7d0e4_server_removeNic.xml | 9 +
libcloud/test/compute/test_cloudstack.py | 20 +-
libcloud/test/compute/test_dimensiondata.py | 287 +++++++-
libcloud/test/compute/test_ec2.py | 20 +
libcloud/test/compute/test_softlayer.py | 2 +
.../create_record_NO_EXTRA_PARAMS.xml | 8 +
.../create_record_WITH_EXTRA_PARAMS.xml | 8 +
.../create_record_ZONE_DOES_NOT_EXIST.xml | 11 +
.../dns/fixtures/durabledns/create_zone.xml | 8 +
.../create_zone_ZONE_ALREADY_EXIST.xml | 11 +
.../dns/fixtures/durabledns/delete_record.xml | 8 +
.../delete_record_RECORD_DOES_NOT_EXIST.xml | 8 +
.../delete_record_ZONE_DOES_NOT_EXIST.xml | 11 +
.../dns/fixtures/durabledns/delete_zone.xml | 8 +
.../delete_zone_ZONE_DOES_NOT_EXIST.xml | 11 +
.../test/dns/fixtures/durabledns/get_record.xml | 13 +
.../get_record_RECORD_DOES_NOT_EXIST.xml | 13 +
.../get_record_ZONE_DOES_NOT_EXIST.xml | 11 +
.../test/dns/fixtures/durabledns/get_zone.xml | 17 +
.../durabledns/get_zone_NO_EXTRA_PARAMS.xml | 17 +
.../durabledns/get_zone_UPDATE_ZONE.xml | 17 +
.../durabledns/get_zone_WITH_EXTRA_PARAMS.xml | 17 +
.../durabledns/get_zone_ZONE_DOES_NOT_EXIST.xml | 11 +
.../dns/fixtures/durabledns/list_records.xml | 21 +
.../list_records_ZONE_DOES_NOT_EXIST.xml | 11 +
.../test/dns/fixtures/durabledns/list_zones.xml | 15 +
.../dns/fixtures/durabledns/update_record.xml | 8 +
.../update_record_ZONE_DOES_NOT_EXIST.xml | 11 +
.../durabledns/update_record_success.xml | 14 +
.../durabledns/update_zone_UPDATE_ZONE.xml | 8 +
.../update_zone_ZONE_DOES_NOT_EXIST.xml | 11 +
libcloud/test/dns/test_dnsimple.py | 11 +-
libcloud/test/dns/test_durabledns.py | 563 ++++++++++++++++
libcloud/test/dns/test_liquidweb.py | 5 +-
libcloud/test/dns/test_vultr.py | 4 +-
libcloud/test/dns/test_worldwidedns.py | 33 +-
...c_8dabe5a7d0e4_networkDomainVip_editNode.xml | 8 +
...c_8dabe5a7d0e4_networkDomainVip_editPool.xml | 9 +
...e5a7d0e4_networkDomainVip_editPoolMember.xml | 8 +
...ode_34de6ed6_46a4_4dae_a753_2f8d3840c6f9.xml | 13 +
.../test/loadbalancer/test_dimensiondata.py | 75 ++-
libcloud/test/secrets.py-dist | 1 +
118 files changed, 3803 insertions(+), 210 deletions(-)
----------------------------------------------------------------------
[05/18] libcloud git commit: Merge branch 'trunk' of
https://github.com/apache/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/apache/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ab6e76aa
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ab6e76aa
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ab6e76aa
Branch: refs/heads/trunk
Commit: ab6e76aa229b73733b60a20754776c8ceb9e3202
Parents: 4aefd3a 011d16c
Author: Anthony Shaw <an...@gmail.com>
Authored: Mon Sep 28 10:09:41 2015 +1000
Committer: Anthony Shaw <an...@gmail.com>
Committed: Mon Sep 28 10:09:41 2015 +1000
----------------------------------------------------------------------
CHANGES.rst | 46 +
.../_supported_methods_block_storage.rst | 4 +-
.../_supported_methods_image_management.rst | 4 +-
.../_supported_methods_key_pair_management.rst | 4 +-
docs/compute/_supported_methods_main.rst | 4 +-
docs/compute/_supported_providers.rst | 4 +-
docs/compute/drivers/gce.rst | 4 +-
docs/dns/_supported_methods.rst | 12 +
docs/dns/_supported_providers.rst | 12 +
docs/dns/drivers/dnsimple.rst | 22 +
docs/dns/drivers/liquidweb.rst | 23 +
docs/dns/drivers/pointdns.rst | 23 +
docs/dns/drivers/vultr.rst | 24 +
docs/dns/drivers/worldwidedns.rst | 22 +
docs/dns/drivers/zonomi.rst | 25 +
.../examples/dns/dnsimple/instantiate_driver.py | 6 +
.../dns/liquidweb/instantiate_driver.py | 5 +
.../examples/dns/pointdns/instantiate_driver.py | 5 +
docs/examples/dns/vultr/instantiate_driver.py | 5 +
.../dns/worldwidedns/instantiate_driver.py | 10 +
docs/examples/dns/zonomi/instantiate_driver.py | 5 +
libcloud/__init__.py | 5 +-
libcloud/common/abiquo.py | 5 +-
libcloud/common/aws.py | 15 +-
libcloud/common/base.py | 8 +-
libcloud/common/dnsimple.py | 53 +
libcloud/common/gandi.py | 5 +-
libcloud/common/google.py | 2 +-
libcloud/common/liquidweb.py | 244 ++
libcloud/common/openstack.py | 4 +-
libcloud/common/pointdns.py | 55 +
libcloud/common/vultr.py | 137 +
libcloud/common/worldwidedns.py | 195 ++
libcloud/common/zonomi.py | 150 ++
libcloud/compute/drivers/cloudframes.py | 5 +-
libcloud/compute/drivers/dimensiondata.py | 164 +-
libcloud/compute/drivers/gce.py | 2 +-
libcloud/compute/drivers/vcloud.py | 23 +-
libcloud/dns/drivers/dnsimple.py | 284 ++
libcloud/dns/drivers/liquidweb.py | 355 +++
libcloud/dns/drivers/pointdns.py | 631 +++++
libcloud/dns/drivers/vultr.py | 394 +++
libcloud/dns/drivers/worldwidedns.py | 503 ++++
libcloud/dns/drivers/zonomi.py | 349 +++
libcloud/dns/providers.py | 12 +
libcloud/dns/types.py | 9 +
libcloud/test/__init__.py | 5 +
...c_8dabe5a7d0e4_infrastructure_datacenter.xml | 230 +-
..._9cbc_8dabe5a7d0e4_network_networkDomain.xml | 54 +-
...2745_4d8a_9cbc_8dabe5a7d0e4_network_vlan.xml | 62 +-
...8a_9cbc_8dabe5a7d0e4_server_deployServer.xml | 9 +
...ver_e75ead52_692f_4314_8725_c8a4f4d13a87.xml | 26 +
...c_2745_4d8a_9cbc_8dabe5a7d0e4_datacenter.xml | 9 +
...8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml | 28 +-
.../oec_0_9_base_imageWithDiskSpeed.xml | 2475 ++++++++++++++++++
libcloud/test/compute/test_dimensiondata.py | 38 +-
.../dns/fixtures/dnsimple/create_domain.json | 20 +
.../fixtures/dnsimple/create_domain_record.json | 13 +
.../test/dns/fixtures/dnsimple/get_domain.json | 20 +
.../fixtures/dnsimple/get_domain_record.json | 13 +
.../fixtures/dnsimple/list_domain_records.json | 42 +
.../dns/fixtures/dnsimple/list_domains.json | 42 +
.../fixtures/dnsimple/update_domain_record.json | 13 +
.../fixtures/liquidweb/create_zone_success.json | 10 +
.../dns/fixtures/liquidweb/delete_record.json | 3 +
.../fixtures/liquidweb/delete_zone.success.json | 0
.../fixtures/liquidweb/delete_zone_success.json | 3 +
.../fixtures/liquidweb/duplicate_record.json | 7 +
.../fixtures/liquidweb/empty_records_list.json | 8 +
.../fixtures/liquidweb/empty_zones_list.json | 8 +
.../test/dns/fixtures/liquidweb/get_record.json | 9 +
.../test/dns/fixtures/liquidweb/get_zone.json | 11 +
.../liquidweb/record_does_not_exist.json | 5 +
.../dns/fixtures/liquidweb/records_list.json | 36 +
.../dns/fixtures/liquidweb/update_record.json | 9 +
.../fixtures/liquidweb/zone_does_not_exist.json | 4 +
.../test/dns/fixtures/liquidweb/zones_list.json | 42 +
.../dns/fixtures/pointdns/_zones_1_DELETE.json | 5 +
.../pointdns/_zones_1_records_141_GET.json | 11 +
.../pointdns/_zones_1_records_141_UPDATE.json | 11 +
.../pointdns/_zones_1_records_150_DELETE.json | 5 +
.../fixtures/pointdns/_zones_1_records_GET.json | 22 +
.../dns/fixtures/pointdns/_zones_CREATE.json | 9 +
.../test/dns/fixtures/pointdns/_zones_GET.json | 20 +
.../dns/fixtures/pointdns/_zones_GET_1.json | 9 +
.../pointdns/_zones_example_com_UPDATE.json | 9 +
.../_zones_example_com_records_CREATE.json | 11 +
.../test/dns/fixtures/vultr/delete_zone.json | 1 +
.../dns/fixtures/vultr/empty_records_list.json | 1 +
.../dns/fixtures/vultr/empty_zones_list.json | 3 +
.../test/dns/fixtures/vultr/get_record.json | 11 +
libcloud/test/dns/fixtures/vultr/get_zone.json | 7 +
.../test/dns/fixtures/vultr/list_domains.json | 21 +
.../test/dns/fixtures/vultr/list_records.json | 19 +
libcloud/test/dns/fixtures/vultr/test_zone.json | 9 +
.../test/dns/fixtures/worldwidedns/api_dns_list | 1 +
.../worldwidedns/api_dns_list_domain_asp | 46 +
.../api_dns_list_domain_asp_CREATE_RECORD | 46 +
.../api_dns_list_domain_asp_DELETE_RECORD | 46 +
.../api_dns_list_domain_asp_UPDATE_RECORD | 46 +
.../api_dns_list_domain_asp_UPDATE_ZONE | 46 +
.../dns/fixtures/zonomi/converted_to_master.xml | 6 +
.../dns/fixtures/zonomi/converted_to_slave.xml | 6 +
.../dns/fixtures/zonomi/couldnt_convert.xml | 2 +
.../test/dns/fixtures/zonomi/create_record.xml | 15 +
.../zonomi/create_record_already_exists.xml | 15 +
.../test/dns/fixtures/zonomi/create_zone.xml | 6 +
.../zonomi/create_zone_already_exists.xml | 2 +
.../test/dns/fixtures/zonomi/delete_record.xml | 15 +
.../zonomi/delete_record_does_not_exist.xml | 11 +
.../test/dns/fixtures/zonomi/delete_zone.xml | 14 +
.../zonomi/delete_zone_does_not_exist.xml | 2 +
.../dns/fixtures/zonomi/empty_zones_list.xml | 11 +
.../test/dns/fixtures/zonomi/list_records.xml | 21 +
.../test/dns/fixtures/zonomi/list_zones.xml | 18 +
libcloud/test/dns/test_dnsimple.py | 254 ++
libcloud/test/dns/test_liquidweb.py | 333 +++
libcloud/test/dns/test_pointdns.py | 210 ++
libcloud/test/dns/test_vultr.py | 317 +++
libcloud/test/dns/test_worldwidedns.py | 339 +++
libcloud/test/dns/test_zonomi.py | 382 +++
libcloud/test/secrets.py-dist | 5 +
setup.py | 12 +
123 files changed, 9353 insertions(+), 190 deletions(-)
----------------------------------------------------------------------
[06/18] libcloud git commit: Merge branch 'trunk' of
https://github.com/apache/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/apache/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b0d86263
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b0d86263
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b0d86263
Branch: refs/heads/trunk
Commit: b0d86263751f169575c7820e5cf6a6026cd71025
Parents: ab6e76a 637ff03
Author: Anthony Shaw <an...@gmail.com>
Authored: Tue Oct 6 09:37:19 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Tue Oct 6 09:37:19 2015 +1100
----------------------------------------------------------------------
CHANGES.rst | 6 +-
docs/_static/images/provider_logos/dnsimple.png | Bin 0 -> 20166 bytes
.../_static/images/provider_logos/packetnet.png | Bin 0 -> 17846 bytes
docs/_static/images/provider_logos/pointdns.png | Bin 0 -> 19816 bytes
docs/_static/images/provider_logos/zonomi.png | Bin 0 -> 11224 bytes
libcloud/common/liquidweb.py | 27 +-
libcloud/common/vultr.py | 26 +-
libcloud/common/zonomi.py | 26 +-
libcloud/compute/drivers/ec2.py | 42 +-
libcloud/compute/drivers/gce.py | 13 +-
libcloud/dns/drivers/pointdns.py | 323 ++++++++---
libcloud/dns/drivers/vultr.py | 24 +-
libcloud/dns/drivers/worldwidedns.py | 15 +-
...instances_with_subnet_and_security_group.xml | 87 +++
libcloud/test/compute/test_ec2.py | 31 ++
.../fixtures/pointdns/_zones_1_ZONE_UPDATE.json | 9 +
.../_zones_1_mail_redirects_CREATE.json | 8 +
.../_zones_1_mail_redirects_DELETE.json | 5 +
.../pointdns/_zones_1_mail_redirects_GET.json | 8 +
.../pointdns/_zones_1_mail_redirects_LIST.json | 18 +
.../_zones_1_mail_redirects_UPDATE.json | 8 +
.../pointdns/_zones_1_redirects_CREATE.json | 11 +
.../pointdns/_zones_1_redirects_DELETE.json | 5 +
.../pointdns/_zones_1_redirects_GET.json | 11 +
.../pointdns/_zones_1_redirects_LIST.json | 24 +
.../pointdns/_zones_1_redirects_UPDATE.json | 11 +
libcloud/test/dns/fixtures/pointdns/error.json | 7 +
.../test/dns/fixtures/pointdns/not_found.json | 1 +
.../dns/fixtures/pointdns/redirect_error.json | 10 +
libcloud/test/dns/test_pointdns.py | 557 +++++++++++++++++++
30 files changed, 1135 insertions(+), 178 deletions(-)
----------------------------------------------------------------------
[12/18] libcloud git commit: styling updates to existing changes.
Posted by an...@apache.org.
styling updates to existing changes.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6229e9d0
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6229e9d0
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6229e9d0
Branch: refs/heads/trunk
Commit: 6229e9d014460303a8790cd646ebbfa6788d255d
Parents: 4e26ef0
Author: Anthony Shaw <an...@gmail.com>
Authored: Fri Oct 30 11:38:25 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Fri Oct 30 11:38:25 2015 +1100
----------------------------------------------------------------------
libcloud/compute/drivers/dimensiondata.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/6229e9d0/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 51a21d5..5a86875 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -486,10 +486,10 @@ class DimensionDataNodeDriver(NodeDriver):
ET.SubElement(create_node, "description").text = description
ET.SubElement(create_node, "location").text = location.id
- response = self.connection.request_with_orgId_api_1(
+ self.connection.request_with_orgId_api_1(
'networkWithLocation',
method='POST',
- data=ET.tostring(create_node)).object
+ data=ET.tostring(create_node))
# MCP1 API does not return the ID, but name is unique for location
network = list(
@@ -582,7 +582,8 @@ class DimensionDataNodeDriver(NodeDriver):
or "ADVANCED"
:type service_plan: ``str``
- :param description: An additional description of the network domain
+ :param description: An additional description of
+ the network domain
:type description: ``str``
:return: an instance of `DimensionDataNetworkDomain`
[13/18] libcloud git commit: Monitoring functions and tests for
servers in both MCP 1 and 2
Posted by an...@apache.org.
Monitoring functions and tests for servers in both MCP 1 and 2
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/cd24ef2c
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/cd24ef2c
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/cd24ef2c
Branch: refs/heads/trunk
Commit: cd24ef2c9d8dac1a96291f69b648324c96c94bc1
Parents: 6229e9d
Author: Anthony Shaw <an...@gmail.com>
Authored: Fri Oct 30 12:28:52 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Fri Oct 30 12:28:52 2015 +1100
----------------------------------------------------------------------
libcloud/compute/drivers/dimensiondata.py | 78 ++++++++++++++++++++
...9cbc_8dabe5a7d0e4_report_usageMonitoring.xml | 8 ++
...a7d0e4_server_changeServerMonitoringPlan.xml | 8 ++
...be5a7d0e4_server_disableServerMonitoring.xml | 8 ++
...abe5a7d0e4_server_enableServerMonitoring.xml | 8 ++
libcloud/test/compute/test_dimensiondata.py | 39 ++++++++++
6 files changed, 149 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/cd24ef2c/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 5a86875..270a7ca 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -1001,6 +1001,14 @@ class DimensionDataNodeDriver(NodeDriver):
return self._to_nat_rule(rule, network_domain)
def ex_delete_nat_rule(self, rule):
+ """
+ Delete an existing NAT rule
+
+ :param rule: The rule to delete
+ :type rule: :class:`DimensionDataNatRule`
+
+ :rtype: ``bool``
+ """
update_node = ET.Element('deleteNatRule', {'xmlns': TYPES_URN})
update_node.set('id', rule.id)
result = self.connection.request_with_orgId_api_2(
@@ -1026,6 +1034,76 @@ class DimensionDataNodeDriver(NodeDriver):
filter(lambda x: x.id == id, self.list_locations()))[0]
return location
+ def ex_enable_monitoring(self, node, service_plan="ESSENTIALS"):
+ """
+ Enables cloud monitoring on a node
+
+ :param node: The node to monitor
+ :type node: :class:`Node`
+
+ :param service_plan: The service plan, one of ESSENTIALS or
+ ADVANCED
+ :type service_plan: ``str``
+
+ :rtype: ``bool``
+ """
+ update_node = ET.Element('enableServerMonitoring',
+ {'xmlns': TYPES_URN})
+ update_node.set('id', node.id)
+ ET.SubElement(update_node, 'servicePlan').text = service_plan
+ result = self.connection.request_with_orgId_api_2(
+ 'server/enableServerMonitoring',
+ method='POST',
+ data=ET.tostring(update_node)).object
+
+ response_code = findtext(result, 'responseCode', TYPES_URN)
+ return response_code in ['IN_PROGRESS', 'OK']
+
+ def ex_update_monitoring_plan(self, node, service_plan="ESSENTIALS"):
+ """
+ Updates the service plan on a node with monitoring
+
+ :param node: The node to monitor
+ :type node: :class:`Node`
+
+ :param service_plan: The service plan, one of ESSENTIALS or
+ ADVANCED
+ :type service_plan: ``str``
+
+ :rtype: ``bool``
+ """
+ update_node = ET.Element('changeServerMonitoringPlan',
+ {'xmlns': TYPES_URN})
+ update_node.set('id', node.id)
+ ET.SubElement(update_node, 'servicePlan').text = service_plan
+ result = self.connection.request_with_orgId_api_2(
+ 'server/changeServerMonitoringPlan',
+ method='POST',
+ data=ET.tostring(update_node)).object
+
+ response_code = findtext(result, 'responseCode', TYPES_URN)
+ return response_code in ['IN_PROGRESS', 'OK']
+
+ def ex_disable_monitoring(self, node):
+ """
+ Disables cloud monitoring for a node
+
+ :param node: The node to stop monitoring
+ :type node: :class:`Node`
+
+ :rtype: ``bool``
+ """
+ update_node = ET.Element('disableServerMonitoring',
+ {'xmlns': TYPES_URN})
+ update_node.set('id', node.id)
+ result = self.connection.request_with_orgId_api_2(
+ 'server/disableServerMonitoring',
+ method='POST',
+ data=ET.tostring(update_node)).object
+
+ response_code = findtext(result, 'responseCode', TYPES_URN)
+ return response_code in ['IN_PROGRESS', 'OK']
+
def _to_nat_rules(self, object, network_domain):
rules = []
for element in findall(object, 'natRule', TYPES_URN):
http://git-wip-us.apache.org/repos/asf/libcloud/blob/cd24ef2c/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_report_usageMonitoring.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_report_usageMonitoring.xml b/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_report_usageMonitoring.xml
new file mode 100644
index 0000000..dc32d95
--- /dev/null
+++ b/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_report_usageMonitoring.xml
@@ -0,0 +1,8 @@
+Date,Location,Server,Server ID,Essentials Monitoring Hours,Advanced Monitoring
+Hours
+2/24/15,NA5,Server A,5a2378ba-11de-11e5-ad2a-ca9798323470,14.25,0
+2/24/15,NA5,Server B,6330a644-11de-11e5-ad2a-ca9798323470,0,8.64
+2/25/15,NA5,Server A,5a2378ba-11de-11e5-ad2a-ca9798323470,24,0
+2/25/15,NA5,Server B,6330a644-11de-11e5-ad2a-ca9798323470,0,24
+2/26/15,NA5,Server A,5a2378ba-11de-11e5-ad2a-ca9798323470,17.59,6.41
+2/26/15,NA5,Server B,6330a644-11de-11e5-ad2a-ca9798323470,2.11,21.89
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/libcloud/blob/cd24ef2c/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan.xml b/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan.xml
new file mode 100644
index 0000000..654097d
--- /dev/null
+++ b/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<response
+xmlns="urn:didata.com:api:cloud:types" requestId="NA9/2015-08-10T09:22:40.684-04:00/c0ca4a5d-3611-417e-8209-fd3046cff1d5">
+<operation>CHANGE_SERVER_MONITORING_PLAN</operation>
+<responseCode>OK</responseCode>
+<message>Monitoring on Server 'Production Server' has been changed to
+Service Plan 'ADVANCED'.</message>
+</response>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/libcloud/blob/cd24ef2c/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring.xml b/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring.xml
new file mode 100644
index 0000000..63609de
--- /dev/null
+++ b/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<response
+xmlns="urn:didata.com:api:cloud:types" requestId="NA9/2015-06-10T09:19:48.692-04:00/929c91ac-5377-4dcf-aac6-a89610971139">
+<operation>DISABLE_SERVER_MONITORING</operation>
+<responseCode>OK</responseCode>
+<message>Monitoring on Server 5783e93f-5370-44fc-a772-cd3c29a2ecaa has
+been disabled.</message>
+</response>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/libcloud/blob/cd24ef2c/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring.xml b/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring.xml
new file mode 100644
index 0000000..9b1b555
--- /dev/null
+++ b/libcloud/test/compute/fixtures/dimensiondata/caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<response
+xmlns="urn:didata.com:api:cloud:types" requestId="NA9/2015-06-10T09:22:40.684-04:00/c0ca4a5d-3611-417e-8209-fd3046cff1d5">
+<operation>ENABLE_SERVER_MONITORING</operation>
+<responseCode>OK</responseCode>
+<message>Monitoring on Server 'Production Server' has been
+enabled.</message>
+</response>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/libcloud/blob/cd24ef2c/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index d779900..14be92c 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -396,6 +396,21 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
result = self.driver.ex_delete_nat_rule(rule)
self.assertTrue(result)
+ def test_ex_enable_monitoring(self):
+ node = self.driver.list_nodes()[0]
+ result = self.driver.ex_enable_monitoring(node, "ADVANCED")
+ self.assertTrue(result)
+
+ def test_ex_disable_monitoring(self):
+ node = self.driver.list_nodes()[0]
+ result = self.driver.ex_disable_monitoring(node)
+ self.assertTrue(result)
+
+ def test_ex_change_monitoring_plan(self):
+ node = self.driver.list_nodes()[0]
+ result = self.driver.ex_update_monitoring_plan(node, "ESSENTIALS")
+ self.assertTrue(result)
+
class InvalidRequestError(Exception):
def __init__(self, tag):
@@ -803,6 +818,30 @@ class DimensionDataMockHttp(MockHttp):
'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_removeNic.xml')
return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+ def _caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring(self, method, url, body, headers):
+ request = ET.fromstring(body)
+ if request.tag != "{urn:didata.com:api:cloud:types}disableServerMonitoring":
+ raise InvalidRequestError(request.tag)
+ body = self.fixtures.load(
+ 'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring.xml')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+ def _caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring(self, method, url, body, headers):
+ request = ET.fromstring(body)
+ if request.tag != "{urn:didata.com:api:cloud:types}enableServerMonitoring":
+ raise InvalidRequestError(request.tag)
+ body = self.fixtures.load(
+ 'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring.xml')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+ def _caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan(self, method, url, body, headers):
+ request = ET.fromstring(body)
+ if request.tag != "{urn:didata.com:api:cloud:types}changeServerMonitoringPlan":
+ raise InvalidRequestError(request.tag)
+ body = self.fixtures.load(
+ 'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan.xml')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
if __name__ == '__main__':
sys.exit(unittest.main())
[14/18] libcloud git commit: Merge remote-tracking branch
'libcloud/trunk' into trunk
Posted by an...@apache.org.
Merge remote-tracking branch 'libcloud/trunk' into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/ee6f9845
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/ee6f9845
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/ee6f9845
Branch: refs/heads/trunk
Commit: ee6f9845a0b75e14c088aaca4cd72e58fb894f9b
Parents: b90060b a5d4554
Author: Anthony Shaw <an...@gmail.com>
Authored: Mon Nov 9 09:19:21 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Mon Nov 9 09:19:21 2015 +1100
----------------------------------------------------------------------
.editorconfig | 19 +++
.travis.yml | 26 ++--
CHANGES.rst | 78 ++++++++++--
contrib/Dockerfile | 4 +-
doap_libcloud.rdf | 9 +-
docs/compute/drivers/auroracompute.rst | 40 +++++-
.../compute/auroracompute/instantiate_driver.py | 8 ++
.../auroracompute/instantiate_driver_region.py | 9 ++
.../storage/auroraobjects/instantiate.py | 8 ++
docs/storage/drivers/auroraobjects.rst | 20 ++-
docs/upgrade_notes.rst | 2 +-
libcloud/__init__.py | 6 +-
libcloud/compute/base.py | 12 +-
libcloud/compute/drivers/auroracompute.py | 34 ++++-
libcloud/compute/drivers/cloudstack.py | 43 ++++++-
libcloud/compute/drivers/ec2.py | 22 +++-
libcloud/compute/drivers/openstack.py | 20 ++-
libcloud/compute/drivers/rackspace.py | 11 +-
libcloud/compute/types.py | 26 ++--
libcloud/dns/drivers/worldwidedns.py | 87 ++++++++-----
libcloud/storage/drivers/auroraobjects.py | 2 +-
.../compute/fixtures/ec2/describe_snapshots.xml | 2 +-
libcloud/test/compute/test_auroracompute.py | 28 ++++-
libcloud/test/compute/test_cloudstack.py | 2 +
libcloud/test/compute/test_digitalocean_v1.py | 2 +-
libcloud/test/compute/test_digitalocean_v2.py | 2 +-
libcloud/test/compute/test_ec2.py | 6 +-
libcloud/test/compute/test_ibm_sce.py | 2 +-
libcloud/test/compute/test_openstack.py | 4 +-
...ify_asp_CREATE_RECORD_MAX_ENTRIES_WITH_ENTRY | 46 +++++++
...ns_list_domain_asp_CREATE_RECORD_MAX_ENTRIES | 46 +++++++
...api_dns_list_domain_asp_CREATE_SECOND_RECORD | 46 +++++++
libcloud/test/dns/test_worldwidedns.py | 126 +++++++++++++++----
libcloud/test/test_init.py | 61 +++++++++
setup.py | 1 +
tox.ini | 58 +++------
36 files changed, 758 insertions(+), 160 deletions(-)
----------------------------------------------------------------------
[04/18] libcloud git commit: Merge branch 'trunk' of
https://github.com/apache/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/apache/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/4aefd3ab
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/4aefd3ab
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/4aefd3ab
Branch: refs/heads/trunk
Commit: 4aefd3abe59de8f69dcb4d8ebdf1bcc28e1d0cf9
Parents: d051b58 40e4484
Author: Anthony Shaw <an...@gmail.com>
Authored: Wed Sep 23 15:50:11 2015 +1000
Committer: Anthony Shaw <an...@gmail.com>
Committed: Wed Sep 23 15:50:11 2015 +1000
----------------------------------------------------------------------
CHANGES.rst | 4 ++++
libcloud/common/dimensiondata.py | 2 +-
libcloud/compute/drivers/dreamhost.py | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[11/18] libcloud git commit: Methods for adding,
deleting and renaming "networks" which are the MCP 1 network
separation feature. Create network does include the ID in the message,
but not by convention, just convenience so I decided to rely on the uniqu
Posted by an...@apache.org.
Methods for adding, deleting and renaming "networks" which are the MCP 1 network separation feature. Create network does include the ID in the message, but not by convention, just convenience so I decided to rely on the uniqueness of the name within a location to fetch the ID.
Included tests
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/4e26ef0d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/4e26ef0d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/4e26ef0d
Branch: refs/heads/trunk
Commit: 4e26ef0d1c40ac4ecfc091d5189df7549dac70f1
Parents: c923de3
Author: Anthony Shaw <an...@gmail.com>
Authored: Fri Oct 30 11:36:34 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Fri Oct 30 11:36:34 2015 +1100
----------------------------------------------------------------------
libcloud/common/dimensiondata.py | 1 +
libcloud/compute/drivers/dimensiondata.py | 75 ++++++++++++++++++--
...8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml | 2 +-
...ork_4bba37be_506f_11e3_b29c_001517c4643e.xml | 16 +++++
libcloud/test/compute/test_dimensiondata.py | 26 +++++++
5 files changed, 115 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4e26ef0d/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/common/dimensiondata.py b/libcloud/common/dimensiondata.py
index d6792d9..715d5fd 100644
--- a/libcloud/common/dimensiondata.py
+++ b/libcloud/common/dimensiondata.py
@@ -33,6 +33,7 @@ ORGANIZATION_NS = NAMESPACE_BASE + "/organization"
SERVER_NS = NAMESPACE_BASE + "/server"
NETWORK_NS = NAMESPACE_BASE + "/network"
DIRECTORY_NS = NAMESPACE_BASE + "/directory"
+GENERAL_NS = NAMESPACE_BASE + "/general"
# API 2.0 Namespaces and URNs
TYPES_URN = "urn:didata.com:api:cloud:types"
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4e26ef0d/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py
index 1015562..51a21d5 100644
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@ -33,11 +33,9 @@ from libcloud.common.dimensiondata import DimensionDataFirewallRule
from libcloud.common.dimensiondata import DimensionDataFirewallAddress
from libcloud.common.dimensiondata import DimensionDataNatRule
from libcloud.common.dimensiondata import NetworkDomainServicePlan
-from libcloud.common.dimensiondata import API_ENDPOINTS
-from libcloud.common.dimensiondata import DEFAULT_REGION
+from libcloud.common.dimensiondata import API_ENDPOINTS, DEFAULT_REGION
from libcloud.common.dimensiondata import TYPES_URN
-from libcloud.common.dimensiondata import SERVER_NS
-from libcloud.common.dimensiondata import NETWORK_NS
+from libcloud.common.dimensiondata import SERVER_NS, NETWORK_NS, GENERAL_NS
from libcloud.utils.xml import fixxpath, findtext, findall
from libcloud.compute.types import NodeState, Provider
@@ -465,6 +463,75 @@ class DimensionDataNodeDriver(NodeDriver):
params=params).object
return self._to_networks(response)
+ def ex_create_network(self, location, name, description=None):
+ """
+ Create a new network in an MCP 1.0 location
+
+ :param location: The target location (MCP1)
+ :type location: :class:`NodeLocation`
+
+ :param name: The name of the network
+ :type name: ``str``
+
+ :param description: Additional description of the network
+ :type description: ``str``
+
+ :return: A new instance of `DimensionDataNetwork`
+ :rtype: Instance of :class:`DimensionDataNetwork`
+ """
+ create_node = ET.Element('NewNetworkWithLocation',
+ {'xmlns': NETWORK_NS})
+ ET.SubElement(create_node, "name").text = name
+ if description is not None:
+ ET.SubElement(create_node, "description").text = description
+ ET.SubElement(create_node, "location").text = location.id
+
+ response = self.connection.request_with_orgId_api_1(
+ 'networkWithLocation',
+ method='POST',
+ data=ET.tostring(create_node)).object
+
+ # MCP1 API does not return the ID, but name is unique for location
+ network = list(
+ filter(lambda x: x.name == name,
+ self.ex_list_networks(location)))[0]
+
+ return network
+
+ def ex_delete_network(self, network):
+ """
+ Delete a network from an MCP 1 data center
+
+ :param network: The network to delete
+ :type network: :class:`DimensionDataNetwork`
+
+ :rtype: ``bool``
+ """
+ response = self.connection.request_with_orgId_api_1(
+ 'network/%s?delete' % network.id,
+ method='GET').object
+ response_code = findtext(response, 'result', GENERAL_NS)
+ return response_code == "SUCCESS"
+
+ def ex_rename_network(self, network, new_name):
+ """
+ Rename a network in MCP 1 data center
+
+ :param network: The network to rename
+ :type network: :class:`DimensionDataNetwork`
+
+ :param new_name: The new name of the network
+ :type new_name: ``str``
+
+ :rtype: ``bool``
+ """
+ response = self.connection.request_with_orgId_api_1(
+ 'network/%s' % network.id,
+ method='POST',
+ data='name=%s' % new_name).object
+ response_code = findtext(response, 'result', GENERAL_NS)
+ return response_code == "SUCCESS"
+
def ex_get_network_domain(self, network_domain_id):
"""
Get an individual Network Domain, by identifier
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4e26ef0d/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml b/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml
index 5a8dfee..227def2 100644
--- a/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml
+++ b/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml
@@ -12,7 +12,7 @@
<ns3:id>208e3a8e-9d2f-11e2-b29c-001517c4643e</ns3:id>
<ns3:name>Test Network</ns3:name>
<ns3:description>Network description</ns3:description>
- <ns3:location>NA1</ns3:location>
+ <ns3:location>NA9</ns3:location>
<ns3:privateNet>10.172.74.0</ns3:privateNet>
<ns3:multicast>false</ns3:multicast>
</ns3:network>
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4e26ef0d/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29c_001517c4643e.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29c_001517c4643e.xml b/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29c_001517c4643e.xml
new file mode 100644
index 0000000..1e28e0d
--- /dev/null
+++ b/libcloud/test/compute/fixtures/dimensiondata/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29c_001517c4643e.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns7:Status xmlns:ns16="http://oec.api.opsource.net/schemas/serverbootstrap"
+ xmlns="http://oec.api.opsource.net/schemas/network"
+ xmlns:ns14="http://oec.api.opsource.net/schemas/storage"
+ xmlns:ns15="http://oec.api.opsource.net/schemas/backup"
+ xmlns:ns9="http://oec.api.opsource.net/schemas/admin"
+ xmlns:ns5="http://oec.api.opsource.net/schemas/organization"
+ xmlns:ns12="http://oec.api.opsource.net/schemas/support"
+ xmlns:ns13="http://oec.api.opsource.net/schemas/multigeo"
+ xmlns:ns6="http://oec.api.opsource.net/schemas/directory"
+ xmlns:ns7="http://oec.api.opsource.net/schemas/general" xmlns:ns10="http://oec.api.opsource.net/schemas/reset" xmlns:ns8="http://oec.api.opsource.net/schemas/vip" xmlns:ns11="http://oec.api.opsource.net/schemas/whitelabel" xmlns:ns2="http://oec.api.opsource.net/schemas/manualimport" xmlns:ns4="http://oec.api.opsource.net/schemas/datacenter" xmlns:ns3="http://oec.api.opsource.net/schemas/server">
+ <ns7:operation>Add Network</ns7:operation>
+ <ns7:result>SUCCESS</ns7:result>
+ <ns7:resultDetail>Network created successfully (Network ID: 9eb15060-e2f7-11e1-9153-001b21cfdbe0)</ns7:resultDetail>
+ <ns7:resultCode>REASON_0</ns7:resultCode>
+</ns7:Status>
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4e26ef0d/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index cbaa22f..d779900 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -217,6 +217,22 @@ class DimensionDataTests(unittest.TestCase, TestCaseMixin):
self.assertEqual(nets[0].name, 'test-net1')
self.assertTrue(isinstance(nets[0].location, NodeLocation))
+ def test_ex_create_network(self):
+ location = self.driver.ex_get_location_by_id('NA9')
+ net = self.driver.ex_create_network(location, "Test Network", "test")
+ self.assertEqual(net.id, "208e3a8e-9d2f-11e2-b29c-001517c4643e")
+ self.assertEqual(net.name, "Test Network")
+
+ def test_ex_delete_network(self):
+ net = self.driver.ex_list_networks()[0]
+ result = self.driver.ex_delete_network(net)
+ self.assertTrue(result)
+
+ def test_ex_rename_network(self):
+ net = self.driver.ex_list_networks()[0]
+ result = self.driver.ex_rename_network(net, "barry")
+ self.assertTrue(result)
+
def test_ex_create_network_domain(self):
location = self.driver.ex_get_location_by_id('NA9')
plan = NetworkDomainServicePlan.ADVANCED
@@ -474,10 +490,20 @@ class DimensionDataMockHttp(MockHttp):
return (httplib.OK, body, {}, httplib.responses[httplib.OK])
def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation(self, method, url, body, headers):
+ if method is "POST":
+ request = ET.fromstring(body)
+ if request.tag != "{http://oec.api.opsource.net/schemas/network}NewNetworkWithLocation":
+ raise InvalidRequestError(request.tag)
body = self.fixtures.load(
'oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml')
return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+ def _oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29c_001517c4643e(self, method,
+ url, body, headers):
+ body = self.fixtures.load(
+ 'oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_network_4bba37be_506f_11e3_b29c_001517c4643e.xml')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
def _caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server(self, method, url, body, headers):
body = self.fixtures.load(
'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server.xml')
[03/18] libcloud git commit: Merge branch 'trunk' of
github.com:DimensionDataCBUSydney/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of github.com:DimensionDataCBUSydney/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/d051b581
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/d051b581
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/d051b581
Branch: refs/heads/trunk
Commit: d051b581629fdd2e8a5222911a52d43c798a8a7c
Parents: 44691a7 51b7845
Author: Anthony Shaw <an...@gmail.com>
Authored: Wed Sep 23 15:49:20 2015 +1000
Committer: Anthony Shaw <an...@gmail.com>
Committed: Wed Sep 23 15:49:20 2015 +1000
----------------------------------------------------------------------
----------------------------------------------------------------------
[02/18] libcloud git commit: Merge pull request #2 from
mingsheng36/patch-1
Posted by an...@apache.org.
Merge pull request #2 from mingsheng36/patch-1
Corrected dd-ap 'host'
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/51b7845e
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/51b7845e
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/51b7845e
Branch: refs/heads/trunk
Commit: 51b7845ec0dac2fe5f9d871bded05e543edda46e
Parents: 64f5664 b97168e
Author: Anthony Shaw <an...@gmail.com>
Authored: Thu Sep 17 20:34:46 2015 +1000
Committer: Anthony Shaw <an...@gmail.com>
Committed: Thu Sep 17 20:34:46 2015 +1000
----------------------------------------------------------------------
libcloud/common/dimensiondata.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
[18/18] libcloud git commit: Merge branch
'LIBCLOUD-761_Network_and_monitoring_support' into trunk
Posted by an...@apache.org.
Merge branch 'LIBCLOUD-761_Network_and_monitoring_support' into trunk
Conflicts:
libcloud/compute/drivers/dimensiondata.py
libcloud/test/compute/test_dimensiondata.py
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/8abaf891
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/8abaf891
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/8abaf891
Branch: refs/heads/trunk
Commit: 8abaf891c17c984a6bda5d7cd7d785dc4545826d
Parents: 2a415a8 cd24ef2
Author: Anthony Shaw <an...@gmail.com>
Authored: Wed Nov 18 18:50:14 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Wed Nov 18 18:50:14 2015 +1100
----------------------------------------------------------------------
libcloud/common/dimensiondata.py | 1 +
libcloud/compute/drivers/dimensiondata.py | 309 ++++++++++++++++++-
...9cbc_8dabe5a7d0e4_report_usageMonitoring.xml | 8 +
...a7d0e4_server_changeServerMonitoringPlan.xml | 8 +
...be5a7d0e4_server_disableServerMonitoring.xml | 8 +
...abe5a7d0e4_server_enableServerMonitoring.xml | 8 +
...8a_9cbc_8dabe5a7d0e4_networkWithLocation.xml | 2 +-
...ork_4bba37be_506f_11e3_b29c_001517c4643e.xml | 16 +
libcloud/test/compute/test_dimensiondata.py | 65 ++++
9 files changed, 414 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8abaf891/libcloud/common/dimensiondata.py
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8abaf891/libcloud/compute/drivers/dimensiondata.py
----------------------------------------------------------------------
diff --cc libcloud/compute/drivers/dimensiondata.py
index 3ee8a11,270a7ca..72defdc
--- a/libcloud/compute/drivers/dimensiondata.py
+++ b/libcloud/compute/drivers/dimensiondata.py
@@@ -816,35 -1034,76 +1035,105 @@@ class DimensionDataNodeDriver(NodeDrive
filter(lambda x: x.id == id, self.list_locations()))[0]
return location
+ def ex_wait_for_state(self, state, func, poll_interval=2,
+ timeout=60, *args, **kwargs):
+ """
+ Wait for the function which returns a instance
+ with field status to match
+
+ Keep polling func until one of the desired states is matched
+
+ :param state: Either the desired state (`str`) or a `list` of states
+ :type state: ``str`` or ``list``
+
+ :param func: The function to call, e.g. ex_get_vlan
+ :type func: ``function``
+
+ :param poll_interval: The number of seconds to wait between checks
+ :type poll_interval: `int`
+
+ :param timeout: The total number of seconds to wait to reach a state
+ :type timeout: `int`
+
+ :param args: The arguments for func
+ :type args: Positional arguments
+
+ :param kwargs: The arguments for func
+ :type kwargs: Keyword arguments
+ """
+ return self.connection.wait_for_state(state, func, poll_interval,
+ timeout, *args, **kwargs)
+
+ def ex_enable_monitoring(self, node, service_plan="ESSENTIALS"):
+ """
+ Enables cloud monitoring on a node
+
+ :param node: The node to monitor
+ :type node: :class:`Node`
+
+ :param service_plan: The service plan, one of ESSENTIALS or
+ ADVANCED
+ :type service_plan: ``str``
+
+ :rtype: ``bool``
+ """
+ update_node = ET.Element('enableServerMonitoring',
+ {'xmlns': TYPES_URN})
+ update_node.set('id', node.id)
+ ET.SubElement(update_node, 'servicePlan').text = service_plan
+ result = self.connection.request_with_orgId_api_2(
+ 'server/enableServerMonitoring',
+ method='POST',
+ data=ET.tostring(update_node)).object
+
+ response_code = findtext(result, 'responseCode', TYPES_URN)
+ return response_code in ['IN_PROGRESS', 'OK']
+
+ def ex_update_monitoring_plan(self, node, service_plan="ESSENTIALS"):
+ """
+ Updates the service plan on a node with monitoring
+
+ :param node: The node to monitor
+ :type node: :class:`Node`
+
+ :param service_plan: The service plan, one of ESSENTIALS or
+ ADVANCED
+ :type service_plan: ``str``
+
+ :rtype: ``bool``
+ """
+ update_node = ET.Element('changeServerMonitoringPlan',
+ {'xmlns': TYPES_URN})
+ update_node.set('id', node.id)
+ ET.SubElement(update_node, 'servicePlan').text = service_plan
+ result = self.connection.request_with_orgId_api_2(
+ 'server/changeServerMonitoringPlan',
+ method='POST',
+ data=ET.tostring(update_node)).object
+
+ response_code = findtext(result, 'responseCode', TYPES_URN)
+ return response_code in ['IN_PROGRESS', 'OK']
+
+ def ex_disable_monitoring(self, node):
+ """
+ Disables cloud monitoring for a node
+
+ :param node: The node to stop monitoring
+ :type node: :class:`Node`
+
+ :rtype: ``bool``
+ """
+ update_node = ET.Element('disableServerMonitoring',
+ {'xmlns': TYPES_URN})
+ update_node.set('id', node.id)
+ result = self.connection.request_with_orgId_api_2(
+ 'server/disableServerMonitoring',
+ method='POST',
+ data=ET.tostring(update_node)).object
+
+ response_code = findtext(result, 'responseCode', TYPES_URN)
+ return response_code in ['IN_PROGRESS', 'OK']
+
def _to_nat_rules(self, object, network_domain):
rules = []
for element in findall(object, 'natRule', TYPES_URN):
http://git-wip-us.apache.org/repos/asf/libcloud/blob/8abaf891/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --cc libcloud/test/compute/test_dimensiondata.py
index 8841c7a,14be92c..8fbe89c
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@@ -783,5 -818,30 +824,29 @@@ class DimensionDataMockHttp(MockHttp)
'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_removeNic.xml')
return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+ def _caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring(self, method, url, body, headers):
+ request = ET.fromstring(body)
+ if request.tag != "{urn:didata.com:api:cloud:types}disableServerMonitoring":
+ raise InvalidRequestError(request.tag)
+ body = self.fixtures.load(
+ 'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_disableServerMonitoring.xml')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+ def _caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring(self, method, url, body, headers):
+ request = ET.fromstring(body)
+ if request.tag != "{urn:didata.com:api:cloud:types}enableServerMonitoring":
+ raise InvalidRequestError(request.tag)
+ body = self.fixtures.load(
+ 'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_enableServerMonitoring.xml')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
+ def _caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan(self, method, url, body, headers):
+ request = ET.fromstring(body)
+ if request.tag != "{urn:didata.com:api:cloud:types}changeServerMonitoringPlan":
+ raise InvalidRequestError(request.tag)
+ body = self.fixtures.load(
+ 'caas_2_0_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_changeServerMonitoringPlan.xml')
+ return (httplib.OK, body, {}, httplib.responses[httplib.OK])
+
-
if __name__ == '__main__':
sys.exit(unittest.main())
[15/18] libcloud git commit: Merge branch 'trunk' of
https://github.com/apache/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/apache/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/43fbf566
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/43fbf566
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/43fbf566
Branch: refs/heads/trunk
Commit: 43fbf566720bfa6710959234628d0dad2f1c26a9
Parents: ee6f984 800189e
Author: Anthony Shaw <an...@gmail.com>
Authored: Thu Nov 12 12:19:41 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Thu Nov 12 12:19:41 2015 +1100
----------------------------------------------------------------------
CHANGES.rst | 9 ++
contrib/update_google_prices.py | 87 ++++++++++++++
contrib/utils.py | 48 ++++++++
contrib/utils_test.py | 65 +++++++++++
libcloud/compute/drivers/cloudstack.py | 3 +-
libcloud/compute/drivers/gce.py | 2 +-
libcloud/data/pricing.json | 158 ++++++++++++++++++++++----
libcloud/test/compute/test_cloudstack.py | 4 +
8 files changed, 352 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
[17/18] libcloud git commit: Merge remote-tracking branch
'libcloud/trunk' into trunk
Posted by an...@apache.org.
Merge remote-tracking branch 'libcloud/trunk' into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/2a415a80
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/2a415a80
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/2a415a80
Branch: refs/heads/trunk
Commit: 2a415a8085b1874604824e5d98ca2c88268bfb36
Parents: 1d21f44 849043e
Author: Anthony Shaw <an...@gmail.com>
Authored: Wed Nov 18 18:43:25 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Wed Nov 18 18:43:25 2015 +1100
----------------------------------------------------------------------
docs/compute/_supported_methods_block_storage.rst | 2 +-
docs/compute/_supported_methods_image_management.rst | 2 +-
docs/compute/_supported_methods_key_pair_management.rst | 2 +-
docs/compute/_supported_methods_main.rst | 2 +-
docs/compute/_supported_providers.rst | 2 +-
docs/development.rst | 2 +-
docs/dns/_supported_methods.rst | 2 ++
docs/dns/_supported_providers.rst | 2 ++
docs/storage/_supported_methods_cdn.rst | 2 +-
docs/storage/_supported_methods_main.rst | 2 +-
docs/storage/_supported_providers.rst | 2 +-
11 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
[09/18] libcloud git commit: Merge branch 'trunk' of
https://github.com/apache/libcloud into trunk
Posted by an...@apache.org.
Merge branch 'trunk' of https://github.com/apache/libcloud into trunk
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b90060be
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b90060be
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b90060be
Branch: refs/heads/trunk
Commit: b90060be55b9111e03547e17d54f7d7c5708bcd2
Parents: 20a2cf7 4fadb56
Author: Anthony Shaw <an...@gmail.com>
Authored: Fri Oct 23 16:23:03 2015 +1100
Committer: Anthony Shaw <an...@gmail.com>
Committed: Fri Oct 23 16:23:03 2015 +1100
----------------------------------------------------------------------
CHANGES.rst | 4 +
libcloud/compute/drivers/dimensiondata.py | 6 +-
libcloud/test/compute/test_dimensiondata.py | 95 ++++++++++++++++++++++++
3 files changed, 102 insertions(+), 3 deletions(-)
----------------------------------------------------------------------