Sha256: 0d6acb127b626cbebff8a64ada624c3593757520e038834982d16e066fa94f59

Contents?: true

Size: 711 Bytes

Versions: 14

Compression:

Stored size: 711 Bytes

Contents

module Fog
  module Identity
    class OpenStack
      class V2
        class Real
          def delete_user(user_id)
            request(
              :expects => [200, 204],
              :method  => 'DELETE',
              :path    => "users/#{user_id}"
            )
          end
        end

        class Mock
          def delete_user(user_id)
            data[:users].delete(
              list_users.body['users'].find { |x| x['id'] == user_id }['id']
            )

            response = Excon::Response.new
            response.status = 204
            response
          rescue
            raise Fog::Identity::OpenStack::NotFound
          end
        end
      end # class V2
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-openstack-0.1.25 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.24 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.23 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.22 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.21 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.20 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.19 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.18 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.17 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.15 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.14 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.13 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.12 lib/fog/identity/openstack/v2/requests/delete_user.rb
fog-openstack-0.1.11 lib/fog/identity/openstack/v2/requests/delete_user.rb