Class: Fog::Compute::Aliyun::RouteEntrys
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Aliyun::RouteEntrys
- Defined in:
- lib/fog/aliyun/models/compute/route_entrys.rb
Instance Method Summary collapse
Instance Method Details
#all(options = {}) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/fog/aliyun/models/compute/route_entrys.rb', line 14 def all( = {}) requires :route_table [:routeTableId] = route_table.id data = Fog::JSON.decode(service.list_route_tables(route_table.v_router_id, ).body)['RouteTables']['RouteTable'][0]['RouteEntrys']['RouteEntry'] load(data) end |
#get(cidr_block) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fog/aliyun/models/compute/route_entrys.rb', line 21 def get(cidr_block) requires :route_table data = self.class.new(service: service, route_table: route_table).all result = nil data.each do |i| if i.cidr_block == cidr_block result = i break end end result end |