Sha256: cb3e73452baf968fa6b789909e957d376914864acb9647270ff058d562e65bb7

Contents?: true

Size: 905 Bytes

Versions: 28

Compression:

Stored size: 905 Bytes

Contents

module Fog
  module Compute
    class Cloudstack

      class Real
        # Lists all available disk offerings.
        #
        # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listDiskOfferings.html]
        def list_disk_offerings(*args)
          options = {}
          if args[0].is_a? Hash
            options = args[0]
            options.merge!('command' => 'listDiskOfferings') 
          else
            options.merge!('command' => 'listDiskOfferings')
          end
          request(options)
        end
      end
 
      class Mock
        # TODO: add id, name filters and paging params
        def list_disk_offerings(options={})
          disk_offerings = self.data[:disk_offerings]
          { "listdiskofferingsresponse" => { "count"=> disk_offerings.count, "diskoffering"=> disk_offerings.values } }
        end

      end 
    end
  end
end

Version data entries

28 entries across 26 versions & 4 rubygems

Version Path
fog-1.30.0 lib/fog/cloudstack/requests/compute/list_disk_offerings.rb
fog-1.29.0 lib/fog/cloudstack/requests/compute/list_disk_offerings.rb
fog-1.28.0 lib/fog/cloudstack/requests/compute/list_disk_offerings.rb
fog-1.27.0 lib/fog/cloudstack/requests/compute/list_disk_offerings.rb
fog-1.26.0 lib/fog/cloudstack/requests/compute/list_disk_offerings.rb
fog-1.25.0 lib/fog/cloudstack/requests/compute/list_disk_offerings.rb
nsidc-fog-1.24.1 lib/fog/cloudstack/requests/compute/list_disk_offerings.rb
fog-1.24.0 lib/fog/cloudstack/requests/compute/list_disk_offerings.rb