示例#1
0
def revokeIp():
    ec2.revoke_security_group(group_name=args.name,
                              group_id=args.id,
                              ip_protocol=args.ip_protocol,
                              from_port=args.from_port,
                              to_port=args.to_port,
                              cidr_ip=args.cidr_ip)
示例#2
0
文件: aws.py 项目: WLPhoenix/stackdio
 def revoke_security_group(self, group_id, rule):
     '''
     See `authorize_security_group`
     '''
     ec2 = self.connect_ec2()
     kwargs = self._security_group_rule_to_kwargs(rule)
     kwargs['group_id'] = group_id
     ec2.revoke_security_group(**kwargs)
示例#3
0
def revokeSource():
    ec2.revoke_security_group(
        group_name=args.name,
        group_id=args.id,
        ip_protocol=args.ip_protocol,
        from_port=args.from_port,
        to_port=args.to_port,
        src_security_group_name=args.security_group_name,
        src_security_group_group_id=args.security_group_id)
示例#4
0
文件: aws.py 项目: stackdio/stackdio
 def revoke_security_group(self, group_id, rule):
     """
     See `authorize_security_group`
     """
     ec2 = self.connect_ec2()
     kwargs = self._security_group_rule_to_kwargs(rule)
     kwargs['group_id'] = group_id
     try:
         ec2.revoke_security_group(**kwargs)
     except boto.exception.EC2ResponseError as e:
         raise RuleNotFoundException(e.error_message)
示例#5
0
 def revoke_security_group(self, group_id, rule):
     """
     See `authorize_security_group`
     """
     ec2 = self.connect_ec2()
     kwargs = self._security_group_rule_to_kwargs(rule)
     kwargs['group_id'] = group_id
     try:
         ec2.revoke_security_group(**kwargs)
     except boto.exception.EC2ResponseError as e:
         raise RuleNotFoundException(e.error_message)
def revokeIp():
    ec2.revoke_security_group(group_name=args.name, group_id=args.id, ip_protocol=args.ip_protocol,
                                 from_port=args.from_port, to_port=args.to_port, cidr_ip=args.cidr_ip)
def revokeSource():
    ec2.revoke_security_group(group_name=args.name, group_id=args.id, ip_protocol=args.ip_protocol,
                                 from_port=args.from_port, to_port=args.to_port,
                                 src_security_group_name=args.security_group_name, src_security_group_group_id=args.security_group_id)