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:15:29 UTC
[1/3] libcloud git commit: docstring + automated test
Repository: libcloud
Updated Branches:
refs/heads/trunk 125037469 -> 3da62236c
docstring + automated test
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/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 <ar...@wandera.com>
Authored: Tue Oct 10 15:46:51 2017 +0100
Committer: Quentin Pradet <qu...@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):
[3/3] libcloud git commit: Add changes for #1122
Posted by qu...@apache.org.
Add changes for #1122
Closes #1122
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/3da62236
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/3da62236
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/3da62236
Branch: refs/heads/trunk
Commit: 3da62236c09b2a9f30a78fc06a9ac4250bfd7924
Parents: 02d6e28
Author: Quentin Pradet <qu...@apache.org>
Authored: Mon Jun 11 21:15:06 2018 +0200
Committer: Quentin Pradet <qu...@apache.org>
Committed: Mon Jun 11 21:15:06 2018 +0200
----------------------------------------------------------------------
CHANGES.rst | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/3da62236/CHANGES.rst
----------------------------------------------------------------------
diff --git a/CHANGES.rst b/CHANGES.rst
index f5bac25..0d5d04e 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -26,6 +26,9 @@ Compute
- [EC2] Add AWS eu-west-3 (Paris) region (GITHUB-1175)
[Anthony Monthe]
+- [EC2] Add description to ex_authorize_security_group_ingress (GITHUB-1122)
+ [Arturo Noha]
+
- [GCE] Expand Firewall options coverage (LIBCLOUD-960, GITHUB-1144)
[maxlip]
[2/3] libcloud git commit: Add description to
ex_authorize_security_group_ingress (same for all cidrIps)
Posted by qu...@apache.org.
Add description to ex_authorize_security_group_ingress (same for all cidrIps)
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/f05cfe62
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/f05cfe62
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/f05cfe62
Branch: refs/heads/trunk
Commit: f05cfe6208e593ef4b7ad5c8f825bcfb728c9c50
Parents: 1250374
Author: Arturo Noha <ar...@wandera.com>
Authored: Thu Oct 5 10:58:46 2017 +0100
Committer: Quentin Pradet <qu...@apache.org>
Committed: Mon Jun 11 21:14:20 2018 +0200
----------------------------------------------------------------------
libcloud/compute/drivers/ec2.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/f05cfe62/libcloud/compute/drivers/ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py
index eb21c12..ad0c6dd 100644
--- a/libcloud/compute/drivers/ec2.py
+++ b/libcloud/compute/drivers/ec2.py
@@ -5070,7 +5070,7 @@ class BaseEC2NodeDriver(NodeDriver):
def ex_authorize_security_group_ingress(self, id, from_port, to_port,
cidr_ips=None, group_pairs=None,
- protocol='tcp'):
+ protocol='tcp', description=None):
"""
Edit a Security Group to allow specific ingress traffic using
CIDR blocks or either a group ID, group name or user ID (account).
@@ -5112,7 +5112,8 @@ class BaseEC2NodeDriver(NodeDriver):
from_port,
to_port,
cidr_ips,
- group_pairs)
+ group_pairs,
+ description)
params["Action"] = 'AuthorizeSecurityGroupIngress'
@@ -7635,7 +7636,7 @@ class BaseEC2NodeDriver(NodeDriver):
def _get_common_security_group_params(self, group_id, protocol,
from_port, to_port, cidr_ips,
- group_pairs):
+ group_pairs, description=None):
"""
Return a dictionary with common query parameters which are used when
operating on security groups.
@@ -7654,6 +7655,9 @@ class BaseEC2NodeDriver(NodeDriver):
ip_ranges['IpPermissions.1.IpRanges.%s.CidrIp'
% (index)] = cidr_ip
+ if description is not None:
+ ip_ranges['IpPermissions.1.IpRanges.%s.Description'
+ % (index)] = description
params.update(ip_ranges)