Sha256: 421f781dd7886fbd60190ec7a3f0e919bc03260f4505d7fd41b7c220f4cb2c27

Contents?: true

Size: 754 Bytes

Versions: 25

Compression:

Stored size: 754 Bytes

Contents

module Fog
  module Identity
    class OpenStack
      class V2
        class Real
          def update_tenant(id, attributes)
            request(
              :expects => [200],
              :method  => 'PUT',
              :path    => "tenants/#{id}",
              :body    => Fog::JSON.encode('tenant' => attributes)
            )
          end
        end

        class Mock
          def update_tenant(_id, attributes)
            response = Excon::Response.new
            response.status = [200, 204][rand(2)]
            attributes = {'enabled' => true, 'id' => '1'}.merge(attributes)
            response.body = {
              'tenant' => attributes
            }
            response
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 23 versions & 3 rubygems

Version Path
fog-openstack-0.1.27 lib/fog/identity/openstack/v2/requests/update_tenant.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-openstack-0.1.26/lib/fog/identity/openstack/v2/requests/update_tenant.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-openstack-0.1.26/lib/fog/identity/openstack/v2/requests/update_tenant.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.26/lib/fog/identity/openstack/v2/requests/update_tenant.rb
fog-openstack-0.1.26 lib/fog/identity/openstack/v2/requests/update_tenant.rb