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 2014/04/23 11:49:05 UTC

[1/2] git commit: add a deprecated flag to a size

Repository: libcloud
Updated Branches:
  refs/heads/trunk e24b498c5 -> de8e4ce7f


add a deprecated flag to a size

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

Branch: refs/heads/trunk
Commit: 5f2925d4739ab43906f8a1c4f8105e5f96f50347
Parents: e24b498
Author: Chris Hannam <ba...@gmail.com>
Authored: Thu Apr 10 12:54:57 2014 +0100
Committer: Tomaz Muraus <to...@apache.org>
Committed: Wed Apr 23 11:41:40 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/5f2925d4/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index abe264e..b6e1c16 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -3125,6 +3125,9 @@ class GCENodeDriver(NodeDriver):
         extra['tags_fingerprint'] = node['tags']['fingerprint']
         extra['scheduling'] = node.get('scheduling', {})
 
+        if (machine_type.get('deprecated')):
+            extra['deprecated'] = True
+
         extra['boot_disk'] = None
         for disk in extra['disks']:
             if disk.get('boot') and disk.get('type') == 'PERSISTENT':


[2/2] git commit: Add "deprecated" attribute to the Node object in the GCE driver.

Posted by to...@apache.org.
Add "deprecated" attribute to the Node object in the GCE driver.

Closes #276


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

Branch: refs/heads/trunk
Commit: de8e4ce7f92e90374b376f9f54ccdd1e22dd7abb
Parents: 5f2925d
Author: Tomaz Muraus <to...@apache.org>
Authored: Wed Apr 23 11:44:26 2014 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Wed Apr 23 11:44:26 2014 +0200

----------------------------------------------------------------------
 CHANGES.rst                     | 5 +++++
 libcloud/compute/drivers/gce.py | 5 +----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/de8e4ce7/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 92166b3..0fed4dd 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -81,6 +81,11 @@ Compute
   (GITHUB-272)
   [zerthimon]
 
+- Add "deprecated" attribute to the Node object in the Google Compute Engine
+  driver.
+  (GITHUB-276)
+  [Chris / bassdread]
+
 Load Balancer
 ~~~~~~~~~~~~~
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/de8e4ce7/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index b6e1c16..c62957f 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -3124,11 +3124,8 @@ class GCENodeDriver(NodeDriver):
         extra['metadata'] = node.get('metadata', {})
         extra['tags_fingerprint'] = node['tags']['fingerprint']
         extra['scheduling'] = node.get('scheduling', {})
+        extra['deprecated'] = True if node.get('deprecated', None) else False
 
-        if (machine_type.get('deprecated')):
-            extra['deprecated'] = True
-
-        extra['boot_disk'] = None
         for disk in extra['disks']:
             if disk.get('boot') and disk.get('type') == 'PERSISTENT':
                 bd = self._get_components_from_path(disk['source'])