class Fog::Compute::ProfitBricks::Lans

Public Instance Methods

all(datacenter_id) click to toggle source
# File lib/fog/profitbricks/models/compute/lans.rb, line 11
def all(datacenter_id)
  result = service.get_all_lans(datacenter_id)

  lans = result.body['items'].each do |lan|
    lan['datacenter_id'] = datacenter_id
  end

  result.body['items'] = lans

  load(result.body['items'].each { |lan| flatten(lan) })
end
get(datacenter_id, lan_id) click to toggle source
# File lib/fog/profitbricks/models/compute/lans.rb, line 23
def get(datacenter_id, lan_id)
  lan = service.get_lan(datacenter_id, lan_id).body

  lan['datacenter_id'] = datacenter_id

  new(flatten(lan))
end