libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject git commit: Update Softlayer driver to use "fullyQualifiedDomainName" attribute instead of "hostname" for the node name.
Date Wed, 23 Apr 2014 11:05:26 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk de8e4ce7f -> 48d3bfd31


Update Softlayer driver to use "fullyQualifiedDomainName" attribute
instead of "hostname" for the node name.

Closes #280

Signed-off-by: Tomaz Muraus <tomaz@apache.org>


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

Branch: refs/heads/trunk
Commit: 48d3bfd31fd4ae783934935ff7fa3348a290051f
Parents: de8e4ce
Author: Roel Van Nyen <roel.vannyen@virdata.com>
Authored: Tue Apr 22 18:16:50 2014 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Wed Apr 23 12:57:57 2014 +0200

----------------------------------------------------------------------
 CHANGES.rst                             | 5 +++++
 libcloud/compute/drivers/softlayer.py   | 4 +++-
 libcloud/test/compute/test_softlayer.py | 4 ++--
 3 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/48d3bfd3/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 0fed4dd..35466b8 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -86,6 +86,11 @@ Compute
   (GITHUB-276)
   [Chris / bassdread]
 
+- Update Softlayer driver to use "fullyQualifiedDomainName" instead of
+  "hostname" attribute for the node name.
+  (GITHUB-280)
+  [RoelVanNyen]
+
 Load Balancer
 ~~~~~~~~~~~~~
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/48d3bfd3/libcloud/compute/drivers/softlayer.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/softlayer.py b/libcloud/compute/drivers/softlayer.py
index ced4a34..4fe8cdd 100644
--- a/libcloud/compute/drivers/softlayer.py
+++ b/libcloud/compute/drivers/softlayer.py
@@ -242,12 +242,14 @@ class SoftLayerNodeDriver(NodeDriver):
 
         return Node(
             id=host['id'],
-            name=host['hostname'],
+            name=host['fullyQualifiedDomainName'],
             state=state,
             public_ips=public_ips,
             private_ips=private_ips,
             driver=self,
             extra={
+                'hostname': host['hostname'],
+                'fullyQualifiedDomainName': host['fullyQualifiedDomainName'],
                 'password': password,
                 'maxCpu': host.get('maxCpu', None),
                 'datacenter': host.get('datacenter', {}).get('longName', None),

http://git-wip-us.apache.org/repos/asf/libcloud/blob/48d3bfd3/libcloud/test/compute/test_softlayer.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_softlayer.py b/libcloud/test/compute/test_softlayer.py
index 4d1d9f8..74f4a32 100644
--- a/libcloud/test/compute/test_softlayer.py
+++ b/libcloud/test/compute/test_softlayer.py
@@ -43,7 +43,7 @@ class SoftLayerTests(unittest.TestCase):
     def test_list_nodes(self):
         nodes = self.driver.list_nodes()
         node = nodes[0]
-        self.assertEqual(node.name, 'libcloud-testing1')
+        self.assertEqual(node.name, 'libcloud-testing1.example.com')
         self.assertEqual(node.state, NodeState.RUNNING)
         self.assertEqual(node.extra['password'], 'L3TJVubf')
 
@@ -73,7 +73,7 @@ class SoftLayerTests(unittest.TestCase):
                                        location=self.driver.list_locations()[0],
                                        size=self.driver.list_sizes()[0],
                                        image=self.driver.list_images()[0])
-        self.assertEqual(node.name, 'libcloud-testing')
+        self.assertEqual(node.name, 'libcloud-testing.example.com')
         self.assertEqual(node.state, NODE_STATE_MAP['RUNNING'])
 
     def test_create_fail(self):


Mime
View raw message