libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [1/2] libcloud git commit: Add loadBalancingScheme parameter for ex_create_forwarding_rule method in GCE driver. Closes #1079
Date Sat, 24 Jun 2017 09:35:55 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 09a769099 -> 56e9459e8


Add loadBalancingScheme parameter for ex_create_forwarding_rule method in GCE driver.
Closes #1079


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

Branch: refs/heads/trunk
Commit: 416e98d9d5bbc4d524ee142278e2c7e8eb5c2c20
Parents: 09a7690
Author: sT331h0rs3 <sT331h0rs3@gmail.com>
Authored: Thu Jun 22 14:26:00 2017 +0300
Committer: Anthony Shaw <anthonyshaw@apache.org>
Committed: Sat Jun 24 19:34:54 2017 +1000

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


http://git-wip-us.apache.org/repos/asf/libcloud/blob/416e98d9/libcloud/compute/drivers/gce.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/gce.py b/libcloud/compute/drivers/gce.py
index c21fa09..5766530 100644
--- a/libcloud/compute/drivers/gce.py
+++ b/libcloud/compute/drivers/gce.py
@@ -3126,7 +3126,8 @@ class GCENodeDriver(NodeDriver):
     def ex_create_forwarding_rule(self, name, target=None, region=None,
                                   protocol='tcp', port_range=None,
                                   address=None, description=None,
-                                  global_rule=False, targetpool=None):
+                                  global_rule=False, targetpool=None,
+                                  lb_scheme=None):
         """
         Create a forwarding rule.
 
@@ -3168,6 +3169,10 @@ class GCENodeDriver(NodeDriver):
                               Use target instead.
         :type     targetpool: ``str`` or :class:`GCETargetPool`
 
+        :keyword  lb_scheme: Load balancing scheme, can be 'EXTERNAL' or
+                             'INTERNAL'. Defaults to 'EXTERNAL'.
+        :type     lb_scheme: ``str`` or ``None``
+
         :return:  Forwarding Rule object
         :rtype:   :class:`GCEForwardingRule`
         """
@@ -3198,6 +3203,9 @@ class GCENodeDriver(NodeDriver):
         if description:
             forwarding_rule_data['description'] = description
 
+        if lb_scheme:
+            forwarding_rule_data['loadBalancingScheme'] = lb_scheme
+
         if global_rule:
             request = '/global/forwardingRules'
         else:


Mime
View raw message