Skip to content
Permalink
Browse files

Add description to ex_authorize_security_group_ingress (same for all …

…cidrIps)
  • Loading branch information
r2rowandera committed Oct 5, 2017
1 parent ce5d3be commit ed0000486e6c6a60abe338b365190f8b74a6954f
Showing with 7 additions and 3 deletions.
  1. +7 −3 libcloud/compute/drivers/ec2.py
@@ -4864,7 +4864,7 @@ def ex_authorize_security_group(self, name, from_port, to_port, cidr_ip,

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).
@@ -4906,7 +4906,8 @@ def ex_authorize_security_group_ingress(self, id, from_port, to_port,
from_port,
to_port,
cidr_ips,
group_pairs)
group_pairs,
description)

params["Action"] = 'AuthorizeSecurityGroupIngress'

@@ -7429,7 +7430,7 @@ def _get_client_data_params(self, client_data):

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.
@@ -7448,6 +7449,9 @@ def _get_common_security_group_params(self, group_id, protocol,

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)

0 comments on commit ed00004

Please sign in to comment.
You can’t perform that action at this time.