libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject git commit: GCE: fix adding node metadata at node creation
Date Fri, 16 May 2014 08:38:52 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 2018fa0a4 -> f3792b2dc


GCE: fix adding node metadata at node creation

Closes #283

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/f3792b2d
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f3792b2d
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f3792b2d

Branch: refs/heads/trunk
Commit: f3792b2dca835c548bdbce0da2eb71bfc9463b72
Parents: 2018fa0
Author: Lior Goikhburg <goikhburg@gmail.com>
Authored: Mon Apr 28 18:18:27 2014 +0400
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Fri May 16 10:27:06 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/f3792b2d/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 0b340b3..fe4dee4 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -1196,6 +1196,10 @@ class GCENodeDriver(NodeDriver):
                                               image=image,
                                               use_existing=use_existing_disk)
 
+        if ex_metadata is not None:
+            ex_metadata = {"items": [{"key": k, "value": v}
+                                     for k, v in ex_metadata.items()]}
+
         request, node_data = self._create_node_req(name, size, image,
                                                    location, ex_network,
                                                    ex_tags, ex_metadata,


Mime
View raw message