Sha256: 48131c8fd5718fa9a088c3a736e727a109d2d82c9f1d33341cb0e68dafbcaa00

Contents?: true

Size: 744 Bytes

Versions: 20

Compression:

Stored size: 744 Bytes

Contents

module Fog
  module OpenStack
    class Image
      class V1
        class Real
          def get_shared_images(tenant_id)
            request(
              :expects => [200, 204],
              :method  => 'GET',
              :path    => "shared-images/#{tenant_id}"
            )
          end
        end

        class Mock
          def get_shared_images(_tenant_id)
            response = Excon::Response.new
            response.status = [200, 204][rand(2)]
            response.body = {
              "shared_images" => [
                {"image_id"  => "ff528b20431645ebb5fa4b0a71ca002f",
                 "can_share" => false}
              ]
            }
            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/image/v1/requests/get_shared_images.rb
fog-openstack-1.1.2 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-fork-99 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.1.0 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.1.0.pre lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-apibank-1.0.102 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.11 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-apibank-1.0.101 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.10 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.9 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.8 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.7 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.6 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.5 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.4 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.3 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.2 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.1 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-1.0.0 lib/fog/openstack/image/v1/requests/get_shared_images.rb
fog-openstack-0.3.1 lib/fog/openstack/image/v1/requests/get_shared_images.rb