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 2017/04/12 23:17:30 UTC
[1/5] libcloud git commit: Lint
Repository: libcloud
Updated Branches:
refs/heads/trunk 994456af4 -> 4938430e9
Lint
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/18a0ee8e
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/18a0ee8e
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/18a0ee8e
Branch: refs/heads/trunk
Commit: 18a0ee8ee809e6f22c59c943924ace9cce6d24a9
Parents: 6580f71
Author: Joseph Hall <pe...@gmail.com>
Authored: Wed Apr 12 07:36:52 2017 -0600
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Apr 13 09:16:02 2017 +1000
----------------------------------------------------------------------
libcloud/compute/drivers/azure_arm.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/18a0ee8e/libcloud/compute/drivers/azure_arm.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure_arm.py b/libcloud/compute/drivers/azure_arm.py
index 28ed59e..437526a 100644
--- a/libcloud/compute/drivers/azure_arm.py
+++ b/libcloud/compute/drivers/azure_arm.py
@@ -848,8 +848,9 @@ class AzureNodeDriver(NodeDriver):
action = "/subscriptions/%s/resourceGroups/" % (self.subscription_id)
r = self.connection.request(action,
params={"api-version": "2016-09-01"})
- return [AzureResourceGroup(net["id"], net["name"], net["location"],
- net["properties"]) for net in r.object["value"]]
+ return [AzureResourceGroup(grp["id"], grp["name"], grp["location"],
+ grp["properties"]) for grp \
+ in r.object["value"]]
def ex_list_networks(self):
"""
@@ -985,8 +986,7 @@ class AzureNodeDriver(NodeDriver):
r = self.connection.request(target,
params={"api-version": "2015-06-15"},
data=data,
- method='PUT'
- )
+ method='PUT')
return self._to_ip_address(r.object)
def ex_create_network_interface(self, name, subnet, resource_group,
@@ -1050,8 +1050,7 @@ class AzureNodeDriver(NodeDriver):
r = self.connection.request(target,
params={"api-version": "2015-06-15"},
data=data,
- method='PUT'
- )
+ method='PUT')
return AzureNic(r.object["id"], r.object["name"], r.object["location"],
r.object["properties"])
[5/5] libcloud git commit: changes for #1032
Posted by an...@apache.org.
changes for #1032
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/4938430e
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/4938430e
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/4938430e
Branch: refs/heads/trunk
Commit: 4938430e985d4ec7a091527633a60b4d3012b50a
Parents: 038b646
Author: Anthony Shaw <an...@apache.org>
Authored: Thu Apr 13 09:17:22 2017 +1000
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Apr 13 09:17:22 2017 +1000
----------------------------------------------------------------------
CHANGES.rst | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/4938430e/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 69ed853..1a44339 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -14,6 +14,10 @@ Common
Compute
~~~~~~~
+- [ARM] Add the ability to list resource groups
+ [GITHUB-1032]
+ (Joseph Hall)
+
- Add 1&1 compute driver
[LIBCLOUD-911] [GITHUB-1029]
(Jasmin Gacic)
[3/5] libcloud git commit: Add the ability to list resource groups
Posted by an...@apache.org.
Add the ability to list resource groups
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/58d8bff8
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/58d8bff8
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/58d8bff8
Branch: refs/heads/trunk
Commit: 58d8bff883196b7dcc228848082439a83395e427
Parents: 994456a
Author: Joseph Hall <pe...@gmail.com>
Authored: Tue Apr 11 09:53:33 2017 -0600
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Apr 13 09:16:02 2017 +1000
----------------------------------------------------------------------
libcloud/compute/drivers/azure_arm.py | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/58d8bff8/libcloud/compute/drivers/azure_arm.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure_arm.py b/libcloud/compute/drivers/azure_arm.py
index a45d03d..7e733b7 100644
--- a/libcloud/compute/drivers/azure_arm.py
+++ b/libcloud/compute/drivers/azure_arm.py
@@ -71,6 +71,20 @@ class AzureVhdImage(NodeImage):
% (self.id, self.name, self.location))
+class AzureResourceGroup(object):
+ """Represent an Azure resource group."""
+
+ def __init__(self, id, name, location, extra):
+ self.id = id
+ self.name = name
+ self.location = location
+ self.extra = extra
+
+ def __repr__(self):
+ return (('<AzureResourceGroup: id=%s, name=%s, location=%s ...>')
+ % (self.id, self.name, self.location))
+
+
class AzureNetwork(object):
"""Represent an Azure virtual network."""
@@ -823,6 +837,20 @@ class AzureNodeDriver(NodeDriver):
params={"api-version": "2015-06-15"})
return [(img["id"], img["name"]) for img in r.object]
+ def ex_list_resource_groups(self):
+ """
+ List resource groups.
+
+ :return: A list of resource groups.
+ :rtype: ``list`` of :class:`.Azureresource_group`
+ """
+
+ action = "/subscriptions/%s/resourceGroups/" % (self.subscription_id)
+ r = self.connection.request(action,
+ params={"api-version": "2016-09-01"})
+ return [AzureResourceGroup(net["id"], net["name"], net["location"],
+ net["properties"]) for net in r.object["value"]]
+
def ex_list_networks(self):
"""
List virtual networks.
[2/5] libcloud git commit: Fix typo
Posted by an...@apache.org.
Fix typo
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6580f719
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6580f719
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6580f719
Branch: refs/heads/trunk
Commit: 6580f7190d33647ced2f8ffc8f7cc5534f13e599
Parents: 58d8bff
Author: Joseph Hall <pe...@gmail.com>
Authored: Tue Apr 11 10:03:51 2017 -0600
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Apr 13 09:16:02 2017 +1000
----------------------------------------------------------------------
libcloud/compute/drivers/azure_arm.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/6580f719/libcloud/compute/drivers/azure_arm.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure_arm.py b/libcloud/compute/drivers/azure_arm.py
index 7e733b7..28ed59e 100644
--- a/libcloud/compute/drivers/azure_arm.py
+++ b/libcloud/compute/drivers/azure_arm.py
@@ -842,7 +842,7 @@ class AzureNodeDriver(NodeDriver):
List resource groups.
:return: A list of resource groups.
- :rtype: ``list`` of :class:`.Azureresource_group`
+ :rtype: ``list`` of :class:`.AzureResourceGroup`
"""
action = "/subscriptions/%s/resourceGroups/" % (self.subscription_id)
[4/5] libcloud git commit: Linting with tox Closes #1032
Posted by an...@apache.org.
Linting with tox
Closes #1032
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/038b646c
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/038b646c
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/038b646c
Branch: refs/heads/trunk
Commit: 038b646c0b4f0e515a61a14fb794632d650a0926
Parents: 18a0ee8
Author: Joseph Hall <pe...@gmail.com>
Authored: Wed Apr 12 08:11:15 2017 -0600
Committer: Anthony Shaw <an...@apache.org>
Committed: Thu Apr 13 09:16:09 2017 +1000
----------------------------------------------------------------------
libcloud/compute/drivers/azure_arm.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/038b646c/libcloud/compute/drivers/azure_arm.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/azure_arm.py b/libcloud/compute/drivers/azure_arm.py
index 437526a..57f55f4 100644
--- a/libcloud/compute/drivers/azure_arm.py
+++ b/libcloud/compute/drivers/azure_arm.py
@@ -849,8 +849,8 @@ class AzureNodeDriver(NodeDriver):
r = self.connection.request(action,
params={"api-version": "2016-09-01"})
return [AzureResourceGroup(grp["id"], grp["name"], grp["location"],
- grp["properties"]) for grp \
- in r.object["value"]]
+ grp["properties"])
+ for grp in r.object["value"]]
def ex_list_networks(self):
"""