'Attribute project_id was not found in the schema definition' when executing test case UsersV3TestJSON.test_user_update

Bug #1449886 reported by yuxingw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Invalid
Undecided
yuxingw

Bug Description

it throw 'Attribute project_id was not found in the schema definition' when executing test case UsersV3TestJSON.test_user_update
Test
tests=tempest/api/identity/admin/v3/test_users.py:UsersV3TestJSON.test_user_update

According to API spec of V3, project_id should be removed from post_body.
class IdentityV3ClientJSON(service_client.ServiceClient):
    api_version = "v3"

    def create_user(self, user_name, password=None, project_id=None,
                    email=None, domain_id='default', **kwargs):
        """Creates a user."""
        en = kwargs.get('enabled', True)
        print en
        description = kwargs.get('description', None)
        print description
        default_project_id = kwargs.get('default_project_id')
        print default_project_id
        post_body = {
            'project_id': project_id,
            'default_project_id': default_project_id,
            'description': description,
            'domain_id': domain_id,
            'email': email,
            'enabled': en,
            'name': user_name,
            'password': password
        }

API Spec:Add user: JSON request
{
"user":{
"default_project_id":"...",
"description":"...",
"domain_id":"--optional--",
"email":"...",
"enabled":"...",
"name":"...",
"password":"--optional--"
}
}

2015-04-29 06:02:07.705 30068 ERROR keystone.common.wsgi [-] {'info': 'GLPRDB050E Attribute project_id was not found in the schema definition.\n', 'desc': 'Object class violation'}
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi Traceback (most recent call last):
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/wsgi.py", line 223, in __call__
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi result = method(context, **params)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/controller.py", line 156, in inner
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi return f(self, context, *args, **kwargs)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/controllers.py", line 252, in create_user
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi ref = self.identity_api.create_user(ref)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/notifications.py", line 112, in wrapper
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi result = f(*args, **kwargs)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/core.py", line 202, in wrapper
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi return f(self, *args, **kwargs)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/core.py", line 213, in wrapper
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi return f(self, *args, **kwargs)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/core.py", line 572, in create_user
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi ref = driver.create_user(user['id'], user)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/backends/ldap.py", line 99, in create_user
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi user_ref = self.user.create(user)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/identity/backends/ldap.py", line 266, in create
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi values = super(UserApi, self).create(values)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/ldap/core.py", line 1761, in create
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi ref = super(EnabledEmuMixIn, self).create(values)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/ldap/core.py", line 1434, in create
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi conn.add_s(self._id_to_dn(values['id']), attrs)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/ldap/core.py", line 925, in add_s
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi return self.conn.add_s(dn_utf8, ldap_attrs_utf8)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib/python2.6/site-packages/keystone/common/ldap/core.py", line 542, in add_s
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi return self.conn.add_s(dn, modlist)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 194, in add_s
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi return self.result(msgid,all=1,timeout=self.timeout)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 436, in result
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi res_type,res_data,res_msgid = self.result2(msgid,all,timeout)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 440, in result2
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi res_type, res_data, res_msgid, srv_ctrls = self.result3(msgid,all,timeout)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 446, in result3
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 96, in _ldap_call
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi result = func(*args,**kwargs)
2015-04-29 06:02:07.705 30068 TRACE keystone.common.wsgi OBJECT_CLASS_VIOLATION: {'info': 'GLPRDB050E Attribute project_id was not found in the schema definition.\n', 'desc': 'Object class violation'}

yuxingw (yuxingw)
Changed in tempest:
assignee: nobody → yuxingw (yuxingw)
Revision history for this message
David Kranz (david-kranz) wrote :

This does seem to be the case and the current keystoneclient has a deprecation warning if you provide project_id. Since this test passes in the gate I presume the ldap backend is doing stricter checking.

Changed in tempest:
status: New → Confirmed
summary: - it throw 'Attribute project_id was not found in the schema definition'
- when executing test case UsersV3TestJSON.test_user_update
+ 'Attribute project_id was not found in the schema definition' when
+ executing test case UsersV3TestJSON.test_user_update
Changed in tempest:
status: Confirmed → Incomplete
Revision history for this message
Ken'ichi Ohmichi (oomichi) wrote :

There was not any activity in long-term, so it is nice to drop this from our queue.

Changed in tempest:
status: Incomplete → Invalid
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.