Sha256: a8036aabaa603b1657426778e0c0429762258089e3848cc184e572f4e15ef136

Contents?: true

Size: 1.01 KB

Versions: 25

Compression:

Stored size: 1.01 KB

Contents

module Fog
  module Image
    class OpenStack
      class V2
        class Real
          def update_image_member(image_id, member)
            request( # 'status' is the only property we can update
              :body    => Fog::JSON.encode(member.select { |key, _value| key == 'status' }),
              :expects => [200],
              :method  => 'PUT',
              :path    => "images/#{image_id}/members/#{member['member_id']}"
            )
          end
        end

        class Mock
          def update_image_members(image_id, member)
            response = Excon::Response.new
            response.status = 204
            response.body = {
              :status     => "accepted",
              :created_at => "2013-11-26T07:21:21Z",
              :updated_at => "2013-11-26T07:21:21Z",
              :image_id   => image_id,
              :member_id  => member['member_id'],
              :schema     => "/v2/schemas/member"
            }
            response
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 23 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.10 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.1.30 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.1.29 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.9 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.1.28 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.8 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.7 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.6 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.5 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.4 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.3 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.2 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.3.0 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.2.4 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.2.3 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.2.2 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.2.1 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-openstack-0.2.0 lib/fog/image/openstack/v2/requests/update_image_member.rb
fog-zj-0.1.28 lib/fog/image/openstack/v2/requests/update_image_member.rb