update tenant api changed

Bug #1076120 reported by David Kranz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Dolph Mathews

Bug Description

It used to return an 'extra' item in its response.

    def test_tenant_update_desc(self):
        """Update description attribute of a tenant"""
        t_name = rand_name('tenant-')
        t_desc = rand_name('desc-')
        resp, body = self.client.create_tenant(t_name, description=t_desc)
        t_id = body['id']
        resp1_desc = body['description']

        t_desc2 = rand_name('desc2-')
        resp, body = self.client.update_tenant(t_id, description=t_desc2)
        st2 = resp['status']
        print body
        resp2_desc = body['extra']['description']
        self.assertTrue(st2.startswith('2'))
        self.assertNotEqual(resp1_desc, resp2_desc)

        resp, body = self.client.get_tenant(t_id)
        resp3_desc = body['description']

        self.assertNotEqual(resp1_desc, resp3_desc)
        self.assertEqual(t_desc, resp1_desc)
        self.assertEqual(resp2_desc, resp3_desc)

        self.client.delete_tenant(t_id)

Update description attribute of a tenant ... {u'id': u'77e37eb480b642ca99e54c8f8e22c23d', u'enabled': u'true', u'description': u'desc2-500469', u'name': u'tenant-669507'}
ERROR

======================================================================
ERROR: Update description attribute of a tenant
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/stack/tempest/tempest/tests/identity/admin/test_tenants.py", line 218, in test_tenant_update_desc
    resp2_desc = body['extra']['description']
KeyError: 'extra'

Dolph Mathews (dolph)
Changed in keystone:
assignee: nobody → Dolph Mathews (dolph)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/15587

Changed in keystone:
status: New → In Progress
Revision history for this message
Dolph Mathews (dolph) wrote :

This bug is specific to the SQL driver, and also applies to the update user API.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/15587
Committed: http://github.com/openstack/keystone/commit/2eea4553e23ff3c0d4d367316ea634253e11c10a
Submitter: Jenkins
Branch: master

commit 2eea4553e23ff3c0d4d367316ea634253e11c10a
Author: Dolph Mathews <email address hidden>
Date: Wed Nov 7 15:17:52 2012 -0600

    Include 'extra' attributes twice (bug 1076120)

    In order to maintain backwards-compatibility with the output of the
    previously-broken SQL driver, non-indexed attributes are included in the
    update user/tenant response in both the correct and expected locations.

    Change-Id: I54f69c0c4cb3ade349190bc0c61539dcc1846267

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: grizzly-1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.