libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quent...@apache.org
Subject [1/3] libcloud git commit: docstring + automated test
Date Mon, 11 Jun 2018 19:15:29 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 125037469 -> 3da62236c


docstring + automated test

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


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

Branch: refs/heads/trunk
Commit: 02d6e280d08cb435706d162ffc8524a342edb645
Parents: f05cfe6
Author: Arturo Noha <arturo.noha@wandera.com>
Authored: Tue Oct 10 15:46:51 2017 +0100
Committer: Quentin Pradet <quentinp@apache.org>
Committed: Mon Jun 11 21:14:20 2018 +0200

----------------------------------------------------------------------
 libcloud/compute/drivers/ec2.py   | 5 ++++-
 libcloud/test/compute/test_ec2.py | 6 ++++--
 2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/02d6e280/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index ad0c6dd..d7b6a56 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -5104,6 +5104,9 @@ class BaseEC2NodeDriver(NodeDriver):
         :param      protocol: tcp/udp/icmp
         :type       protocol: ``str``
 
+        :param      description: description to be added to the rules inserted
+        :type       description: ``str``
+
         :rtype: ``bool``
         """
 
@@ -7657,7 +7660,7 @@ class BaseEC2NodeDriver(NodeDriver):
                           % (index)] = cidr_ip
                 if description is not None:
                     ip_ranges['IpPermissions.1.IpRanges.%s.Description'
-                          % (index)] = description
+                              % (index)] = description
 
             params.update(ip_ranges)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/02d6e280/libcloud/test/compute/test_ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py
index 17f293e..05ac026 100644
--- a/libcloud/test/compute/test_ec2.py
+++ b/libcloud/test/compute/test_ec2.py
@@ -329,10 +329,12 @@ class EC2Tests(LibcloudTestCase, TestCaseMixin):
 
     def test_authorize_security_group_ingress(self):
         ranges = ['1.1.1.1/32', '2.2.2.2/32']
-        resp = self.driver.ex_authorize_security_group_ingress('sg-42916629', 22, 22, cidr_ips=ranges)
+        description = "automated authorised IP ingress test"
+        resp = self.driver.ex_authorize_security_group_ingress('sg-42916629', 22, 22, cidr_ips=ranges,
description=description)
         self.assertTrue(resp)
         groups = [{'group_id': 'sg-949265ff'}]
-        resp = self.driver.ex_authorize_security_group_ingress('sg-42916629', 22, 23, group_pairs=groups)
+        description = "automated authorised group ingress test"
+        resp = self.driver.ex_authorize_security_group_ingress('sg-42916629', 22, 23, group_pairs=groups,
description=description)
         self.assertTrue(resp)
 
     def test_authorize_security_group_egress(self):


Mime
View raw message