Closed icy closed 8 years ago
When the port number is -1 , the revoke command can't correctly handle user input.
-1
revoke
$ ./bin/aws.pl revoke -i "sg-xxx" -e -P icmp -p -1 -s 10.0.0.0/24 -v aws versions: (ec2: 2013-10-15, sqs: 2012-11-05, elb: 2011-11-15, sdb: 2009-04-15, iam: 2010-05-08, ebn: 2010-12-01, cfn: 2010-05-15, rds: 2013-09-09) ec2(Action, RevokeSecurityGroupEgress, GroupId, sg-6d1b1209, IpPermissions.1.IpProtocol, icmp, IpPermissions.1.FromPort, , IpPermissions.1.ToPort, s, GroupName, 10.0.0.0/24) --- :Errors: :Error: :Code: "UnknownParameter" :Message: "The parameter GroupName is not recognized"
The same input works with auth command.
auth
$ ./bin/aws.pl auth -i "sg-xxx" -e -P icmp -p -1 -s 10.0.0.0/24 -v aws versions: (ec2: 2013-10-15, sqs: 2012-11-05, elb: 2011-11-15, sdb: 2009-04-15, iam: 2010-05-08, ebn: 2010-12-01, cfn: 2010-05-15, rds: 2013-09-09) ec2(Action, AuthorizeSecurityGroupEgress, GroupId, sg-6d1b1209, IpPermissions.1.IpProtocol, icmp, IpPermissions.1.FromPort, -1, IpPermissions.1.ToPort, -1, IpPermissions.1.IpRanges.1.CidrIp, 10.0.0.0/24) --- :Errors: :Error: :Code: "InvalidPermission.Duplicate" :Message: "the specified rule "peer: 10.0.0.0/24, ICMP, type: ALL, code: ALL, ALLOW" already exists"
Also note that when the port is not -1, both commands (auth and revoke) works as usual
Fixed in #104
When the port number is
-1
, therevoke
command can't correctly handle user input.The same input works with
auth
command.