Class Rudy::CLI::AWS::EC2::Groups

  1. lib/rudy/cli/aws/ec2/groups.rb

Public instance methods

authorize_groups ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 42
42:     def authorize_groups; modify_group(:authorize); end
authorize_groups_valid? ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 41
41:     def authorize_groups_valid?; modify_group_valid?; end
create_groups ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 14
14:     def create_groups
15:       opts = check_options
16:       execute_action { 
17:         Rudy::AWS::EC2::Groups.create(@argv.name, @option.description, opts[:addresses], opts[:ports], opts[:protocols])
18:       }
19:       Rudy::AWS::EC2::Groups.list(@argv.name) do |group|
20:         li @@global.verbose > 0 ? group.inspect : group.dump(@@global.format)
21:       end
22:     end
create_groups_valid? ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 9
 9:     def create_groups_valid?
10:       raise Drydock::ArgError.new('group name', @alias) unless @argv.name
11:       raise "Group #{@argv.name} alread exists" if Rudy::AWS::EC2::Groups.exists?(@argv.name)
12:       true
13:     end
destroy_groups ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 31
31:     def destroy_groups
32:       li "Destroying group: #{@argv.name}"
33:       execute_check(:medium)
34:       execute_action { Rudy::AWS::EC2::Groups.destroy(@argv.name) }
35:       @argv.clear # so groups will print all other groups
36:     end
destroy_groups_valid? ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 25
25:     def destroy_groups_valid?
26:       raise Drydock::ArgError.new('group name', @alias) unless @argv.name
27:       raise "Group #{@argv.name} does not exist" unless Rudy::AWS::EC2::Groups.exists?(@argv.name)
28:       true
29:     end
groups ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 44
44:     def groups
45:       opts = {}
46:       name = @option.all ? nil : @argv.name
47:       Rudy::AWS::EC2::Groups.list(name).each do |group|
48:         li @@global.verbose > 0 ? group.inspect : group.dump(@@global.format)
49:       end
50:     end
revoke_groups ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 39
39:     def revoke_groups; modify_group(:revoke); end
revoke_groups_valid? ()
[show source]
    # File lib/rudy/cli/aws/ec2/groups.rb, line 38
38:     def revoke_groups_valid?; modify_group_valid?; end