Class: ZAWS::Command::Security_Group

Inherits:
Thor
  • Object
show all
Defined in:
lib/zaws/command/security_group.rb

Instance Method Summary collapse

Instance Method Details

#declare(group_name, description) ⇒ Object



28
29
30
31
32
# File 'lib/zaws/command/security_group.rb', line 28

def declare(group_name,description) 
    aws=(ZAWS::AWS.new(ZAWS::Helper::Shell.new))
    exitcode = aws.ec2.security_group.declare(options[:region],options[:vpcid],group_name,description,options[:nagios],$stdout,(options[:verbose]?$stdout:nil),options[:undofile])
     exit exitcode
end

#declare_ingress_group(target, source, protocol, port) ⇒ Object



52
53
54
55
56
# File 'lib/zaws/command/security_group.rb', line 52

def declare_ingress_group(target,source,protocol,port) 
    aws=(ZAWS::AWS.new(ZAWS::Helper::Shell.new))
    exitcode = aws.ec2.security_group.declare_ingress_group(options[:region],options[:vpcid],target,source,protocol,port,options[:nagios],$stdout,(options[:verbose]?$stdout:nil),options[:undofile])
    exit exitcode
end

#delete(group_name) ⇒ Object



36
37
38
39
# File 'lib/zaws/command/security_group.rb', line 36

def delete(group_name) 
    aws=(ZAWS::AWS.new(ZAWS::Helper::Shell.new))
    aws.ec2.security_group.delete(options[:region],$stdout,(options[:verbose]?$stdout:nil),options[:vpcid],group_name)
end

#delete_ingress_group(target, source, protocol, port) ⇒ Object



60
61
62
63
# File 'lib/zaws/command/security_group.rb', line 60

def delete_ingress_group(target,source,protocol,port) 
    aws=(ZAWS::AWS.new(ZAWS::Helper::Shell.new))
    aws.ec2.security_group.delete_ingress_group(options[:region],options[:vpcid],target,source,protocol,port,$stdout,(options[:verbose]?$stdout:nil))
end

#exists_by_name(group_name) ⇒ Object



19
20
21
22
# File 'lib/zaws/command/security_group.rb', line 19

def exists_by_name(group_name) 
    aws=(ZAWS::AWS.new(ZAWS::Helper::Shell.new))
    aws.ec2.security_group.exists(options[:region],$stdout,(options[:verbose]?$stdout:nil),options[:vpcid],group_name)
end

#ingress_group_exists(target, source, protocol, port) ⇒ Object



43
44
45
46
# File 'lib/zaws/command/security_group.rb', line 43

def ingress_group_exists(target,source,protocol,port) 
    aws=(ZAWS::AWS.new(ZAWS::Helper::Shell.new))
    aws.ec2.security_group.ingress_group_exists(options[:region],options[:vpcid],target,source,protocol,port,$stdout,(options[:verbose]?$stdout:nil))
end

#viewObject



12
13
14
15
# File 'lib/zaws/command/security_group.rb', line 12

def view
    aws=(ZAWS::AWS.new(ZAWS::Helper::Shell.new))
    aws.ec2.security_group.view(options[:region],options[:viewtype],$stdout,(options[:verbose]?$stdout:nil),options[:vpcid])
end