Sha256: 5c7ea85cfee926e35e8814e93315c237744ca1b547de2234661168423a0d6bc3

Contents?: true

Size: 756 Bytes

Versions: 4

Compression:

Stored size: 756 Bytes

Contents

module Fog
  module Identity
    class HuaweiCloud
      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

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/identity/huaweicloud/v2/requests/update_tenant.rb
fog-huaweicloud-0.0.2 lib/fog/identity/huaweicloud/v2/requests/update_tenant.rb
fog-huaweicloud-0.1.3 lib/fog/identity/huaweicloud/v2/requests/update_tenant.rb
fog-huaweicloud-0.1.2 lib/fog/identity/huaweicloud/v2/requests/update_tenant.rb