You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by qu...@apache.org on 2018/06/11 19:07:40 UTC

[1/2] libcloud git commit: [gce] ex_create_network can have NoneType routing_mode

Repository: libcloud
Updated Branches:
  refs/heads/trunk 6de9bb4cf -> 125037469


[gce] ex_create_network can have NoneType routing_mode

Check for that before trying string operations on it.

Signed-off-by: Quentin Pradet <qu...@apache.org>


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

Branch: refs/heads/trunk
Commit: 93ad4b8733604cd1e1ef6162ef9d65344820ff60
Parents: 6de9bb4
Author: Daniel Hunsaker <da...@nanobox.io>
Authored: Mon May 14 14:54:35 2018 -0600
Committer: Quentin Pradet <qu...@apache.org>
Committed: Mon Jun 11 21:05:34 2018 +0200

----------------------------------------------------------------------
 libcloud/compute/drivers/gce.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/93ad4b87/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index 484022e..3dfc87d 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -3892,13 +3892,14 @@ class GCENodeDriver(NodeDriver):
         else:
             network_data['autoCreateSubnetworks'] = (mode.lower() == 'auto')
 
-        if routing_mode.lower() not in ['regional', 'global']:
-            raise ValueError("Invalid Routing Mode: '%s'. Must be 'REGIONAL', "
-                             "or 'GLOBAL'." % routing_mode)
-        else:
-            network_data['routingConfig'] = {
-                'routingMode': routing_mode.upper()
-            }
+        if routing_mode:
+            if routing_mode.lower() not in ['regional', 'global']:
+                raise ValueError("Invalid Routing Mode: '%s'. Must be "
+                                 "'REGIONAL', or 'GLOBAL'." % routing_mode)
+            else:
+                network_data['routingConfig'] = {
+                    'routingMode': routing_mode.upper()
+                }
 
         request = '/global/networks'
 


[2/2] libcloud git commit: Add changes for #1217

Posted by qu...@apache.org.
Add changes for #1217

Closes #1217


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

Branch: refs/heads/trunk
Commit: 12503746962da6dd15fb57e17977a026091004e0
Parents: 93ad4b8
Author: Quentin Pradet <qu...@apache.org>
Authored: Mon Jun 11 21:07:08 2018 +0200
Committer: Quentin Pradet <qu...@apache.org>
Committed: Mon Jun 11 21:07:08 2018 +0200

----------------------------------------------------------------------
 CHANGES.rst | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/12503746/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index 407505a..f5bac25 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -48,6 +48,9 @@ Compute
 - [GCE] Fix _find_zone_or_region for >500 instances (GITHUB-1203)
   [Léo Ferlin-Sutton]
 
+- [GCE] Allow routing_mode=None in ex_create_network (GITHUB-1217)
+  [Daniel Hunsaker]
+
 - [OpenStack] Implement Glance Image API v2 (GITHUB-1151)
   [Rick van de Loo]