Sha256: 7a4a3064fe7a6fd602385ad4a65669fa0d70a1eddc484fec5f86a930d05fbcc7
Contents?: true
Size: 671 Bytes
Versions: 65
Compression:
Stored size: 671 Bytes
Contents
require 'fog/core/collection' require 'fog/cloudstack/models/compute/flavor' module Fog module Compute class Cloudstack class Flavors < Fog::Collection model Fog::Compute::Cloudstack::Flavor def all data = service.list_service_offerings["listserviceofferingsresponse"]["serviceoffering"] || [] load(data) end def get(flavor_id) if flavor = service.list_service_offerings('id' => flavor_id)["listserviceofferingsresponse"]["serviceoffering"].first new(flavor) end rescue Fog::Compute::Cloudstack::BadRequest nil end end end end end
Version data entries
65 entries across 65 versions & 6 rubygems