1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/rackspace/models/cdn_v2/flavors.rb
2015-01-06 11:13:35 -05:00

24 lines
514 B
Ruby

require 'fog/core/collection'
require 'fog/rackspace/models/cdn_v2/flavor'
module Fog
module Rackspace
class CDNV2 < Fog::Service
class Flavors < Fog::Collection
model Fog::Rackspace::CDNV2::Flavor
def all
data = service.list_flavors.body['flavors']
load(data)
end
def get(name)
data = service.get_flavor(name).body
new(data)
rescue Fog::Rackspace::CDNV2::NotFound
nil
end
end
end
end
end