Class: ZAWS::Command::Route_Table

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Route_Table

Returns a new instance of Route_Table.


13
14
15
16
17
18
19
20
# File 'lib/zaws/command/route_table.rb', line 13

def initialize(*args)
  super
  shellout=ZAWS::Helper::Shell.new
  awscli = ZAWS::AWSCLI.new(shellout)
  @aws = ZAWS::AWS.new(shellout, awscli)
  @out = $stdout
  @print_exit_code = false
end

Instance Attribute Details

#awsObject

Returns the value of attribute aws.


9
10
11
# File 'lib/zaws/command/route_table.rb', line 9

def aws
  @aws
end

#outObject

Returns the value of attribute out.


10
11
12
# File 'lib/zaws/command/route_table.rb', line 10

def out
  @out
end

Returns the value of attribute print_exit_code.


11
12
13
# File 'lib/zaws/command/route_table.rb', line 11

def print_exit_code
  @print_exit_code
end

Instance Method Details

#assoc_subnet(rtable_externalid, cidrblock) ⇒ Object


106
107
108
109
# File 'lib/zaws/command/route_table.rb', line 106

def assoc_subnet(rtable_externalid, cidrblock)
  exitcode = @aws.ec2.route_table.assoc_subnet(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], rtable_externalid, cidrblock, options[:check], options[:undofile])
  exit exitcode
end

#declare(externalid, vpcid) ⇒ Object


41
42
43
44
# File 'lib/zaws/command/route_table.rb', line 41

def declare(externalid, vpcid)
  exitcode = @aws.ec2.route_table.declare(options[:region], vpcid, externalid, options[:check], @out, (options[:verbose] ? @out : nil), options[:undofile])
  exit exitcode
end

#declare_propagation_from_gateway(rtable_externalid, vgatewayid) ⇒ Object


130
131
132
133
# File 'lib/zaws/command/route_table.rb', line 130

def declare_propagation_from_gateway(rtable_externalid, vgatewayid)
  exitcode = @aws.ec2.route_table.declare_propagation_from_gateway(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], rtable_externalid, vgatewayid, options[:check], options[:undofile])
  exit exitcode
end

#declare_route(routetable, cidrblock, externalid) ⇒ Object


65
66
67
68
# File 'lib/zaws/command/route_table.rb', line 65

def declare_route(routetable, cidrblock, externalid)
  exitcode = @aws.ec2.route_table.declare_route(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], routetable, cidrblock, externalid, options[:check], options[:undofile])
  exit exitcode
end

#declare_route_to_gateway(routetable, cidrblock, gatewayid) ⇒ Object


89
90
91
92
# File 'lib/zaws/command/route_table.rb', line 89

def declare_route_to_gateway(routetable, cidrblock, gatewayid)
  exitcode = @aws.ec2.route_table.declare_route_to_gateway(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], routetable, cidrblock, gatewayid, options[:check], options[:undofile])
  exit exitcode
end

#delete(externalid) ⇒ Object


49
50
51
# File 'lib/zaws/command/route_table.rb', line 49

def delete(externalid)
  @aws.ec2.route_table.delete(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], externalid)
end

#delete_assoc_subnet(rtable_externalid, cidrblock) ⇒ Object


114
115
116
# File 'lib/zaws/command/route_table.rb', line 114

def delete_assoc_subnet(rtable_externalid, cidrblock)
  @aws.ec2.route_table.delete_assoc_subnet(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], rtable_externalid, cidrblock)
end

#delete_propagation_from_gateway(rtable_externalid, vgatewayid) ⇒ Object


138
139
140
# File 'lib/zaws/command/route_table.rb', line 138

def delete_propagation_from_gateway(rtable_externalid, vgatewayid)
  @aws.ec2.route_table.delete_propagation_from_gateway(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], rtable_externalid, vgatewayid)
end

#delete_route(routetable, cidrblock) ⇒ Object


73
74
75
# File 'lib/zaws/command/route_table.rb', line 73

def delete_route(routetable, cidrblock)
  @aws.ec2.route_table.delete_route(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], routetable, cidrblock)
end

#exists_by_external_id(externalid) ⇒ Object


33
34
35
# File 'lib/zaws/command/route_table.rb', line 33

def exists_by_external_id(externalid)
  @aws.ec2.route_table.exists(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], externalid)
end

#propagation_exists_from_gateway(rtable_externalid, vgatewayid) ⇒ Object


121
122
123
# File 'lib/zaws/command/route_table.rb', line 121

def propagation_exists_from_gateway(rtable_externalid, vgatewayid)
  @aws.ec2.route_table.propagation_exists_from_gateway(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], rtable_externalid, vgatewayid)
end

#route_exists_by_gatewayid(routetable, cidrblock, gatewayid) ⇒ Object


80
81
82
# File 'lib/zaws/command/route_table.rb', line 80

def route_exists_by_gatewayid(routetable, cidrblock, gatewayid)
  @aws.ec2.route_table.route_exists_by_gatewayid(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], routetable, cidrblock, gatewayid)
end

#route_exists_by_instance(routetable, cidrblock, externalid) ⇒ Object


56
57
58
# File 'lib/zaws/command/route_table.rb', line 56

def route_exists_by_instance(routetable, cidrblock, externalid)
  @aws.ec2.route_table.route_exists_by_instance(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], routetable, cidrblock, externalid)
end

#subnet_assoc_exists(rtable_externalid, cidrblock) ⇒ Object


97
98
99
# File 'lib/zaws/command/route_table.rb', line 97

def subnet_assoc_exists(rtable_externalid, cidrblock)
  @aws.ec2.route_table.subnet_assoc_exists(options[:region], @out, (options[:verbose] ? @out : nil), options[:vpcid], rtable_externalid, cidrblock)
end

#viewObject


26
27
28
# File 'lib/zaws/command/route_table.rb', line 26

def view
  @out.puts(@aws.ec2.route_table.view(options[:region], options[:viewtype], @out, (options[:verbose] ? @out : nil), options[:vpcid]))
end