# File lib/rudy/cli/aws/ec2/groups.rb, line 14 def create_groups opts = check_options execute_action { Rudy::AWS::EC2::Groups.create(@argv.name, @option.description, opts[:addresses], opts[:ports], opts[:protocols]) } Rudy::AWS::EC2::Groups.list(@argv.name) do |group| li @@global.verbose > 0 ? group.inspect : group.dump(@@global.format) end end
# File lib/rudy/cli/aws/ec2/groups.rb, line 9 def create_groups_valid? raise Drydock::ArgError.new('group name', @alias) unless @argv.name raise "Group #{@argv.name} alread exists" if Rudy::AWS::EC2::Groups.exists?(@argv.name) true end
# File lib/rudy/cli/aws/ec2/groups.rb, line 31 def destroy_groups li "Destroying group: #{@argv.name}" execute_check(:medium) execute_action { Rudy::AWS::EC2::Groups.destroy(@argv.name) } @argv.clear # so groups will print all other groups end
# File lib/rudy/cli/aws/ec2/groups.rb, line 25 def destroy_groups_valid? raise Drydock::ArgError.new('group name', @alias) unless @argv.name raise "Group #{@argv.name} does not exist" unless Rudy::AWS::EC2::Groups.exists?(@argv.name) true end
# File lib/rudy/cli/aws/ec2/groups.rb, line 44 def groups opts = {} name = @option.all ? nil : @argv.name Rudy::AWS::EC2::Groups.list(name).each do |group| li @@global.verbose > 0 ? group.inspect : group.dump(@@global.format) end end
Generated with the Darkfish Rdoc Generator 2.