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

25 lines
514 B
Ruby
Raw Normal View History

2014-12-22 16:50:16 -05:00
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