Sha256: 6d3d6e23259af5e7489142c3634a7ae42faa783ea48cfc3e150ebee21fb8e514

Contents?: true

Size: 1.01 KB

Versions: 39

Compression:

Stored size: 1.01 KB

Contents

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

      module Mock
        def list_volume_types(_options = {})
          response = Excon::Response.new
          response.status = 200
          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' => data[:volume_types]}
          response
        end
      end
    end
  end
end

Version data entries

39 entries across 37 versions & 3 rubygems

Version Path
fog-openstack-0.1.27 lib/fog/volume/openstack/requests/list_volume_types.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-openstack-0.1.26/lib/fog/volume/openstack/requests/list_volume_types.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.26/lib/fog/volume/openstack/requests/list_volume_types.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-openstack-0.1.26/lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.26 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.25 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.24 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.23 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.22 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.21 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.20 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.19 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.18 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.17 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.15 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.14 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.13 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.12 lib/fog/volume/openstack/requests/list_volume_types.rb
fog-openstack-0.1.11 lib/fog/volume/openstack/requests/list_volume_types.rb