2015-09-23 14:28:57 -04:00
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class DigitalOceanV2
|
|
|
|
class Flavors < Fog::Collection
|
|
|
|
model Fog::Compute::DigitalOceanV2::Flavor
|
|
|
|
|
2015-10-19 21:34:07 -04:00
|
|
|
# Retrieves flavours (aka. sizes)
|
|
|
|
# @return [Fog::Compute::DigitalOceanV2:Flavor]
|
|
|
|
# @raise [Fog::Compute::DigitalOceanV2::NotFound] - HTTP 404
|
|
|
|
# @raise [Fog::Compute::DigitalOceanV2::BadRequest] - HTTP 400
|
|
|
|
# @raise [Fog::Compute::DigitalOceanV2::InternalServerError] - HTTP 500
|
|
|
|
# @raise [Fog::Compute::DigitalOceanV2::ServiceError]
|
|
|
|
# @see https://developers.digitalocean.com/documentation/v2/#list-all-sizes
|
2015-09-23 14:28:57 -04:00
|
|
|
def all(filters = {})
|
|
|
|
data = service.list_flavors.body["sizes"]
|
|
|
|
load(data)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|