Sha256: f0ed7576b931bf899949501b66d69c95b0426b5f4e023fc37e60514d94afae54

Contents?: true

Size: 1.61 KB

Versions: 12

Compression:

Stored size: 1.61 KB

Contents

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

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

        class Mock
          def list_volumes_detailed(options = {})
            response            = Excon::Response.new
            response.status     = 200
            self.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' => self.data[:volumes]}
            response
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.9 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.8 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.7 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.6 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.5 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.4 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.3 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.2 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.1 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-openstack-0.1.0 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb
fog-1.37.0 lib/fog/openstack/requests/volume_v1/list_volumes_detailed.rb