You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2013/08/26 14:26:39 UTC
[1/4] git commit: Add returning the public ip address of opsrouce
nodes when listing nodes
Updated Branches:
refs/heads/trunk d26c9a61e -> 3b8ad8162
Add returning the public ip address of opsrouce nodes when listing nodes
Signed-off-by: Tomaz Muraus <to...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/50a737e6
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/50a737e6
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/50a737e6
Branch: refs/heads/trunk
Commit: 50a737e6837fd1e9d2b9d19155a8c3a4c72a3b8a
Parents: d26c9a6
Author: Michael <mi...@securitycompass.com>
Authored: Sun Aug 25 16:10:20 2013 -0400
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Aug 26 14:18:32 2013 +0200
----------------------------------------------------------------------
libcloud/compute/drivers/opsource.py | 4 +++-
...8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed.xml | 1 +
libcloud/test/compute/test_opsource.py | 9 +++++++++
3 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/50a737e6/libcloud/compute/drivers/opsource.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/opsource.py b/libcloud/compute/drivers/opsource.py
index 6ee1432..0b7b57e 100644
--- a/libcloud/compute/drivers/opsource.py
+++ b/libcloud/compute/drivers/opsource.py
@@ -579,10 +579,12 @@ class OpsourceNodeDriver(NodeDriver):
'status': status,
}
+ public_ip = findtext(element, 'publicIpAddress', SERVER_NS)
+
n = Node(id=findtext(element, 'id', SERVER_NS),
name=findtext(element, 'name', SERVER_NS),
state=state,
- public_ips=[],
+ public_ips=[public_ip] if public_ip is not None else [],
private_ips=findtext(element, 'privateIpAddress', SERVER_NS),
driver=self.connection.driver,
extra=extra)
http://git-wip-us.apache.org/repos/asf/libcloud/blob/50a737e6/libcloud/test/compute/fixtures/opsource/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed.xml
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/fixtures/opsource/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed.xml b/libcloud/test/compute/fixtures/opsource/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed.xml
index ae48208..a11d6c2 100644
--- a/libcloud/test/compute/fixtures/opsource/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed.xml
+++ b/libcloud/test/compute/fixtures/opsource/oec_0_9_8a8f6abc_2745_4d8a_9cbc_8dabe5a7d0e4_server_deployed.xml
@@ -17,6 +17,7 @@
<sourceImageId>44ed8b72-ebea-11df-bdc1-001517c46384</sourceImageId>
<networkId>53b4c05b-341e-4ac3-b688-bdd78e43ca9e</networkId>
<privateIpAddress>10.162.1.1</privateIpAddress>
+ <publicIpAddress>200.16.132.7</publicIpAddress>
<machineName>10-162-1-1</machineName>
<isStarted>true</isStarted>
<deployedTime>2011-03-02T17:16:09.882Z</deployedTime>
http://git-wip-us.apache.org/repos/asf/libcloud/blob/50a737e6/libcloud/test/compute/test_opsource.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_opsource.py b/libcloud/test/compute/test_opsource.py
index c94dba7..f0518c4 100644
--- a/libcloud/test/compute/test_opsource.py
+++ b/libcloud/test/compute/test_opsource.py
@@ -144,6 +144,15 @@ class OpsourceTests(unittest.TestCase, TestCaseMixin):
self.assertEqual(nets[0].name, 'test-net1')
self.assertTrue(isinstance(nets[0].location, NodeLocation))
+ def test_node_public_ip(self):
+ nodes = self.driver.list_nodes()
+ for node in nodes:
+ if node.id == "abadbc7e-9e10-46ca-9d4a-194bcc6b6c16":
+ self.assertEqual(node.public_ips[0], '200.16.132.7')
+ else:
+ self.assertEqual(len(node.public_ips), 0)
+
+
class OpsourceMockHttp(MockHttp):
fixtures = ComputeFileFixtures('opsource')
[2/4] git commit: Fix indentation.
Posted by to...@apache.org.
Fix indentation.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/7a923be5
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/7a923be5
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/7a923be5
Branch: refs/heads/trunk
Commit: 7a923be5bd3b3c95e567447f1e35c31abbab5b57
Parents: 50a737e
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Aug 26 14:19:23 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Aug 26 14:19:23 2013 +0200
----------------------------------------------------------------------
libcloud/compute/drivers/opsource.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/7a923be5/libcloud/compute/drivers/opsource.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/opsource.py b/libcloud/compute/drivers/opsource.py
index 0b7b57e..8b4fa23 100644
--- a/libcloud/compute/drivers/opsource.py
+++ b/libcloud/compute/drivers/opsource.py
@@ -579,7 +579,7 @@ class OpsourceNodeDriver(NodeDriver):
'status': status,
}
- public_ip = findtext(element, 'publicIpAddress', SERVER_NS)
+ public_ip = findtext(element, 'publicIpAddress', SERVER_NS)
n = Node(id=findtext(element, 'id', SERVER_NS),
name=findtext(element, 'name', SERVER_NS),
[4/4] git commit: Update changes.
Posted by to...@apache.org.
Update changes.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3b8ad816
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3b8ad816
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3b8ad816
Branch: refs/heads/trunk
Commit: 3b8ad8162c719968e54e0e65fe7a58715ee5663f
Parents: 5a5f3d1
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Aug 26 14:21:41 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Aug 26 14:21:41 2013 +0200
----------------------------------------------------------------------
CHANGES | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3b8ad816/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 41908d1..10e22cd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -74,6 +74,10 @@ Changes with Apache Libcloud in development
(LIBCLOUD-382)
[Ivan Kusalic]
+ - Update Opsource driver to include node public ip address (if available).
+ (LIBCLOUD-384)
+ [Michael Bennett]
+
*) Storage
- Fix a regression with calling encode_container_name instead of
[3/4] git commit: Use list comprehension instead.
Posted by to...@apache.org.
Use list comprehension instead.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5a5f3d15
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5a5f3d15
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5a5f3d15
Branch: refs/heads/trunk
Commit: 5a5f3d15135d966aefe96c8577d18e890bcefb2c
Parents: 7a923be
Author: Tomaz Muraus <to...@apache.org>
Authored: Mon Aug 26 14:20:08 2013 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Mon Aug 26 14:20:08 2013 +0200
----------------------------------------------------------------------
libcloud/test/compute/test_opsource.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/5a5f3d15/libcloud/test/compute/test_opsource.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_opsource.py b/libcloud/test/compute/test_opsource.py
index f0518c4..f1c3784 100644
--- a/libcloud/test/compute/test_opsource.py
+++ b/libcloud/test/compute/test_opsource.py
@@ -146,11 +146,9 @@ class OpsourceTests(unittest.TestCase, TestCaseMixin):
def test_node_public_ip(self):
nodes = self.driver.list_nodes()
- for node in nodes:
- if node.id == "abadbc7e-9e10-46ca-9d4a-194bcc6b6c16":
- self.assertEqual(node.public_ips[0], '200.16.132.7')
- else:
- self.assertEqual(len(node.public_ips), 0)
+ node = [n for n in nodes if n.id ==
+ 'abadbc7e-9e10-46ca-9d4a-194bcc6b6c16'][0]
+ self.assertEqual(node.public_ips[0], '200.16.132.7')
class OpsourceMockHttp(MockHttp):