check_in_group method fails when str are provided

asked 2018-02-13 18:30:50 -0500

sorian gravatar image


I am using the python-keystoneclient v3.15.0 to check if a user is a member of the specified group. I'm doing by the check_in_group method of keystoneclient.v3.users.UserManager.

According the documentation the input parameters are:

user (str or keystoneclient.v3.users.User) – the user to be verified in the group.
group (str or keystoneclient.v3.groups.Group) – the group to check the user in.

If I pass user or group as str, that is keystone.users.check_in_group( 'admin' , 'admins' ), the method raises a keystoneauth1.exceptions.http.NotFound exception with 404 code, but if I pass the keystoneclient.v3.users.User and keystoneclient.v3.groups.Group everything works.

I think it should work in both ways, Does anyone know why it is failing when I use str instead of the objects?

BR, Miguel

edit retag flag offensive close merge delete