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

Keystone V3 error when getting users or project list with a admin role user, Openstack4j version 2.0.5 #477

Closed
markleecom opened this issue Oct 14, 2015 · 3 comments

Comments

@markleecom
Copy link

My openstack version is kilo, and I can get users list or project list correctly using keystone V2. Mainly code is:
os = OSFactory.builder().endpoint(tokenUrl)
.credentials(userName,password)
.authenticate();
UserService userService = os.identity().users();
List<? extends User> users = userService.list();

But when using keystone V3, the code is:
Identifier domainId = Identifier.byId("default");
os = OSFactory.builderV3().endpoint(tokenUrl)
.credentials(userName, password,domainId)
.authenticate();
I got this exception :
Exception in thread "main" java.lang.NullPointerException
at org.openstack4j.openstack.identity.internal.DefaultEndpointURLResolver.resolveV3(DefaultEndpointURLResolver.java:110)
at org.openstack4j.openstack.identity.internal.DefaultEndpointURLResolver.findURL(DefaultEndpointURLResolver.java:50)
at org.openstack4j.openstack.internal.OSClientSession.getEndpoint(OSClientSession.java:202)
at org.openstack4j.core.transport.HttpRequest$RequestBuilder.build(HttpRequest.java:405)
at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:177)
at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:172)
at org.openstack4j.openstack.identity.internal.UserServiceImpl.list(UserServiceImpl.java:25)
at com.cloudmap.csmc.kernel.cloud.openstack_v3_kilo.util.Openstack4jUtil.authenticated(Openstack4jUtil.java:57)
at com.cloudmap.csmc.kernel.cloud.openstack_v3_kilo.util.Openstack4jUtil.main(Openstack4jUtil.java:114)

I can get the correct user list or project list with keystone v3, using openstack REST API.

@mazimo
Copy link
Collaborator

mazimo commented Oct 14, 2015

As far as I can tell, OpenStack4J only supports keystone v3 authentication and not other v3 operations. The comment in DefaultEndPointURLResolver seems to confirm this: https://github.com/gondor/openstack4j/search?utf8=%E2%9C%93&q=only+support+V3&type=Code

@markleecom
Copy link
Author

Ok, thank you.

@vinodborole
Copy link
Contributor

@markleecom please 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