class AwsCli::CLI::EC2::VPC::RouteTables

Public Instance Methods

associate_route_table() click to toggle source
# File lib/awscli/cli/ec2/vpc/route_tables.rb, line 55
def associate_route_table
  create_ec2_object
  @ec2.associate_route_table(options)
end
create() click to toggle source
# File lib/awscli/cli/ec2/vpc/route_tables.rb, line 17
def create
  create_ec2_object
  @ec2.create options
end
create_route() click to toggle source
# File lib/awscli/cli/ec2/vpc/route_tables.rb, line 28
def create_route
  if options[:gateway_id] || options[:instance_id] || options[:net_interface_id]
    create_ec2_object
    @ec2.create_route(options)
  else
    Formatador.display_line("[red]Error: [/]Any one of the following options (--gateway-id, --instance-id, --net-interface-id) is requried")
  end
end
delete() click to toggle source
# File lib/awscli/cli/ec2/vpc/route_tables.rb, line 39
def delete
  create_ec2_object
  @ec2.delete(options)
end
delete_route() click to toggle source
# File lib/awscli/cli/ec2/vpc/route_tables.rb, line 47
def delete_route
  create_ec2_object
  @ec2.delete_route(options)
end
disassociate_route_table() click to toggle source
# File lib/awscli/cli/ec2/vpc/route_tables.rb, line 62
def disassociate_route_table
  create_ec2_object
  @ec2.disassociate_route_table(options)
end
list() click to toggle source
# File lib/awscli/cli/ec2/vpc/route_tables.rb, line 10
def list
  create_ec2_object
  @ec2.list options
end

Private Instance Methods

create_ec2_object() click to toggle source
# File lib/awscli/cli/ec2/vpc/route_tables.rb, line 69
def create_ec2_object
  puts "ec2 Establishing Connetion..."
  $ec2_conn = if parent_options[:region]
                Awscli::Connection.new.request_ec2(parent_options[:region])
              else
                Awscli::Connection.new.request_ec2
              end
  puts "ec2 Establishing Connetion... OK"
  @ec2 = Awscli::EC2::RouteTable.new($ec2_conn)
end