methods/ec_common.rb
# Add rule to AWS EC2 security group
Add rule to AWS EC2 security group
Add rule to AWS EC2 security group
def remove_rule_from_aws_security_group(options)
  if not options['service'].to_s.match(/^#{empty_value}$/)
    options = get_aws_ip_service_info(options)
  end
  if not options['group'].to_s.match(/^sg/)
    options['group'] = get_aws_security_group_id(options)
  end
  if options['dir'].to_s.match(/egress/)
    remove_egress_rule_from_aws_security_group(options)
  else
    remove_ingress_rule_from_aws_security_group(options)
  end
  return
end
def remove_rule_from_aws_security_group ( options ) if not options [ 'service' ] . to_s . match ( / ^ #{ empty_value } $ / ) options = get_aws_ip_service_info ( options ) end if not options [ 'group' ] . to_s . match ( / ^sg / ) options [ 'group' ] = get_aws_security_group_id ( options ) end if options [ 'dir' ] . to_s . match ( / egress / ) remove_egress_rule_from_aws_security_group ( options ) else remove_ingress_rule_from_aws_security_group ( options ) end return end
Add rule to AWS EC2 security group
Add rule to AWS EC2 security group
options
<not_specific>