Sha256: a3cc81a105a1ce195696ad088c7e144e3beaa934998540547eee07a369e8ddc5

Contents?: true

Size: 1009 Bytes

Versions: 57

Compression:

Stored size: 1009 Bytes

Contents

module Fog
  module Volume
    class OpenStack
      class Real
        def list_volume_types(options={})
          request(
            :expects  => 200,
            :method   => 'GET',
            :path     => 'types',
            :query    => options
          )
        end
      end

      class Mock
        def list_volume_types(options={})
          response = Excon::Response.new
          response.status = 200
          self.data[:volume_types] ||= [
            {
              "id" => "1",
              "name" => "type 1",
              "extra_specs" => {
                "volume_backend_name" => "type 1 backend name"
              }
            },
            {
              "id" => "2",
              "name" => "type 2",
              "extra_specs" => {
                "volume_backend_name" => "type 2 backend name"
              }
            }
          ]
          response.body = { 'volume_types' => self.data[:volume_types] }
          response
        end
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 5 rubygems

Version Path
fog-1.31.0 lib/fog/openstack/requests/volume/list_volume_types.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/openstack/requests/volume/list_volume_types.rb
fog-1.30.0 lib/fog/openstack/requests/volume/list_volume_types.rb
fog-1.29.0 lib/fog/openstack/requests/volume/list_volume_types.rb
fog-1.28.0 lib/fog/openstack/requests/volume/list_volume_types.rb
fog-1.27.0 lib/fog/openstack/requests/volume/list_volume_types.rb
fog-1.26.0 lib/fog/openstack/requests/volume/list_volume_types.rb
fog-1.25.0 lib/fog/openstack/requests/volume/list_volume_types.rb
nsidc-fog-1.24.1 lib/fog/openstack/requests/volume/list_volume_types.rb
fog-1.24.0 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.11 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.10 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.9 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.8 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.7 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.6 lib/fog/openstack/requests/volume/list_volume_types.rb
fog-1.23.0 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.4 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.3 lib/fog/openstack/requests/volume/list_volume_types.rb
ns-fog-1.22.2 lib/fog/openstack/requests/volume/list_volume_types.rb