Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.identity().users().list() return a empty list #484

Closed
yingwail opened this issue Oct 27, 2015 · 2 comments
Closed

os.identity().users().list() return a empty list #484

yingwail opened this issue Oct 27, 2015 · 2 comments

Comments

@yingwail
Copy link

My openstack version is kilo and there are a few users created using the Web GUI. However, I can only get a empty users list with the following code. Is there any problem with openstack? My openstack version is 2.0.6.

    OSClient os = OSFactory.builderV3()                       .endpoint("http://172.20.4.195:5000/v3").credentials("bb50ab5d331c4f4aa307e0fc6f4f8e8c","redhat")
                           .authenticate();

// Find all Users
UserService userService = os.identity().users();
List<? extends User> users = userService.list();

@auhlig
Copy link
Member

auhlig commented Nov 18, 2015

Hi @yingwail,
Sorry for the late response. Maybe in the meantime you figured out how to do it yourself.

If not:
I think your authentication might fail.
Using v3 authentication in the latest release of OpenStack4j, which is currently 2.0.9, requires a project- or domain-scope. I described how to do it in issue #506.
So you just need to add a scopeTo..()-line in your code.

BR

@vinodborole
Copy link
Contributor

@yingwail plesae reopen if this issue still exists for u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants