Sha256: a2a8ea83257f04743278d63ca5f89adee91a4a6815f0bd981195412ca8b25925

Contents?: true

Size: 1.56 KB

Versions: 20

Compression:

Stored size: 1.56 KB

Contents

require 'fog/openstack/volume/requests/list_volumes_detailed'

module Fog
  module OpenStack
    class Volume
      class V1
        class Real
          include Fog::OpenStack::Volume::Real
        end

        class Mock
          def list_volumes_detailed(_options = {})
            response            = Excon::Response.new
            response.status     = 200
            data[:volumes] ||= [
              {"status"              => "available",
               "display_description" => "test 1 desc",
               "availability_zone"   => "nova",
               "display_name"        => "Volume1",
               "attachments"         => [{}],
               "volume_type"         => nil,
               "snapshot_id"         => nil,
               "size"                => 1,
               "id"                  => 1,
               "created_at"          => Time.now,
               "metadata"            => {}},
              {"status"              => "available",
               "display_description" => "test 2 desc",
               "availability_zone"   => "nova",
               "display_name"        => "Volume2",
               "attachments"         => [{}],
               "volume_type"         => nil,
               "snapshot_id"         => nil,
               "size"                => 1,
               "id"                  => 2,
               "created_at"          => Time.now,
               "metadata"            => {}}
            ]
            response.body = {'volumes' => data[:volumes]}
            response
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
fog-openstack-1.1.3 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.1.2 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-fork-99 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.1.0 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.1.0.pre lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-apibank-1.0.102 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.11 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-apibank-1.0.101 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.10 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.9 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.8 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.7 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.6 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.5 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.4 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.3 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.2 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.1 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-1.0.0 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb
fog-openstack-0.3.1 lib/fog/openstack/volume/v1/requests/list_volumes_detailed.rb