Class: Fog::Compute::Aliyun::RouteTables

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/aliyun/models/compute/route_tables.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



12
13
14
15
16
# File 'lib/fog/aliyun/models/compute/route_tables.rb', line 12

def all(options = {})
  requires :v_router
  data = Fog::JSON.decode(service.list_route_tables(v_router.id, options).body)['RouteTables']['RouteTable']
  load(data)
end

#get(routeTableId) ⇒ Object



18
19
20
21
22
23
# File 'lib/fog/aliyun/models/compute/route_tables.rb', line 18

def get(routeTableId)
  requires :v_router
  if routeTableId
    self.class.new(service: service, v_router: v_router).all(routeTableId: routeTableId)[0]
  end
end