Repository: libcloud
Updated Branches:
  refs/heads/trunk 17fe85b04 -> 452fd39c4


Cloudscale Driver: Make it possible to list all things in the API that are not 
part of libcloud.

We have had some issues where we added stuff like host keys to our api. This 
should be reflected in Libcloud.


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

Branch: refs/heads/trunk
Commit: 7c474fd52c329de1acf34f0163b79504993c7c3f
Parents: 17fe85b
Author: Dave Halter <[email protected]>
Authored: Fri Feb 24 13:12:11 2017 +0100
Committer: Anthony Shaw <[email protected]>
Committed: Sat Apr 1 12:01:01 2017 +1100

----------------------------------------------------------------------
 libcloud/compute/drivers/cloudscale.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/7c474fd5/libcloud/compute/drivers/cloudscale.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/cloudscale.py 
b/libcloud/compute/drivers/cloudscale.py
index 98034ec..1023b22 100644
--- a/libcloud/compute/drivers/cloudscale.py
+++ b/libcloud/compute/drivers/cloudscale.py
@@ -203,11 +203,11 @@ class CloudscaleNodeDriver(NodeDriver):
 
     def _to_node(self, data):
         state = self.NODE_STATE_MAP.get(data['status'], NodeState.UNKNOWN)
-        extra_keys = ['volumes', 'interfaces', 'anti_affinity_with']
+        extra_keys_exclude = ['uuid', 'name', 'status', 'flavor', 'image']
         extra = {}
-        for key in extra_keys:
-            if key in data:
-                extra[key] = data[key]
+        for k, v in data.items():
+            if k not in extra_keys_exclude:
+                extra[k] = v
 
         public_ips = []
         private_ips = []

Reply via email to