Class: ZAWS::External::AWSCLI::Commands::EC2::DescribeSubnets
Instance Method Summary
collapse
#available, #id_by_cidrblock, #id_by_ip, #load, #validJSON, #view
Constructor Details
#initialize(shellout = nil, awscli = nil) ⇒ DescribeSubnets
Returns a new instance of DescribeSubnets.
31
32
33
34
35
36
|
# File 'lib/zaws/external/awscli/commands/ec2/describe_subnets.rb', line 31
def initialize(shellout=nil, awscli=nil)
super(shellout, awscli)
@shellout=shellout
@awscli=awscli
clear_settings
end
|
Instance Method Details
#aws ⇒ Object
10
11
12
13
|
# File 'lib/zaws/external/awscli/commands/ec2/describe_subnets.rb', line 10
def aws
@aws ||= ZAWS::External::AWSCLI::Commands::AWS.new(self)
@aws
end
|
#clear_settings ⇒ Object
20
21
22
23
|
# File 'lib/zaws/external/awscli/commands/ec2/describe_subnets.rb', line 20
def clear_settings
@aws=nil
@filter=nil
end
|
#execute(verbose = nil) ⇒ Object
38
39
40
41
|
# File 'lib/zaws/external/awscli/commands/ec2/describe_subnets.rb', line 38
def execute(verbose=nil)
comline=@aws.get_command
load(comline, @shellout.cli(comline, verbose), verbose)
end
|
#get_command ⇒ Object
25
26
27
28
29
|
# File 'lib/zaws/external/awscli/commands/ec2/describe_subnets.rb', line 25
def get_command
command = "ec2 describe-subnets"
command = "#{command} #{@filter.get_command}" if @filter
return command
end
|