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

v2: os.identity().tenants().list(), v3:os.identity().projects().list(), return a empty list #751

Closed
liuxiwen opened this issue Jul 14, 2016 · 2 comments

Comments

@liuxiwen
Copy link

v3's request changed into v2
e.g. GET http://controller:35357/v2.0/projects

@test
public void testV2() {
OSFactory.enableHttpLoggingFilter(true);
OSClientV2 os = OSFactory.builderV2()
.endpoint("http://10.0.0.11:5000/v2.0")
.credentials("admin", "openstack")
.tenantName("admin")
.perspective(Facing.ADMIN)
.authenticate();
System.out.println(os.identity().tenants().list());
}

七月 14, 2016 8:55:48 上午 org.glassfish.jersey.filter.LoggingFilter log
信息: 1 * Sending client request on thread main
1 > GET http://controller:35357/v2.0/auth/tenants/6c31fcc33600461b87421c5af04c4b40
1 > Accept: application/json
1 > User-Agent: OpenStack4j / OpenStack Client
1 > X-Auth-Token: 1086650e56924511b66fe0da269e4bc8

七月 14, 2016 8:55:48 上午 org.glassfish.jersey.filter.LoggingFilter log
信息: 1 * Client response received on thread main
1 < 404
1 < Connection: Keep-Alive
1 < Content-Length: 93
1 < Content-Type: application/json
1 < Date: Thu, 14 Jul 2016 00:55:52 GMT
1 < Keep-Alive: timeout=5, max=100
1 < Server: Apache/2.4.7 (Ubuntu)
1 < Vary: X-Auth-Token
1 < X-Distribution: Ubuntu
1 < x-openstack-request-id: req-cf1540b5-4fbe-488c-ae08-567da92d7e3c
{"error": {"message": "The resource could not be found.", "code": 404, "title": "Not Found"}}

null

@test
public void testV3() throws Exception {
OSFactory.enableHttpLoggingFilter(true);
Identifier domain = Identifier.byId("default");
Identifier project = Identifier.byName("admin");
OSClientV3 os = OSFactory.builderV3()
.endpoint("http://10.0.0.11:5000/v3")
.credentials("admin", "openstack", domain)
.scopeToProject(project, domain)
.perspective(Facing.ADMIN)
.authenticate();
System.out.println(os.identity().projects().list());
}

七月 14, 2016 9:09:39 上午 org.glassfish.jersey.filter.LoggingFilter log
信息: 1 * Sending client request on thread main
1 > GET http://controller:35357/v2.0/projects
1 > Accept: application/json
1 > User-Agent: OpenStack4j / OpenStack Client
1 > X-Auth-Token: a0f59ca743994f59aa2e5e833482000d

七月 14, 2016 9:09:39 上午 org.glassfish.jersey.filter.LoggingFilter log
信息: 1 * Client response received on thread main
1 < 404
1 < Connection: Keep-Alive
1 < Content-Length: 93
1 < Content-Type: application/json
1 < Date: Thu, 14 Jul 2016 01:09:43 GMT
1 < Keep-Alive: timeout=5, max=100
1 < Server: Apache/2.4.7 (Ubuntu)
1 < Vary: X-Auth-Token
1 < X-Distribution: Ubuntu
1 < x-openstack-request-id: req-dd7bcdb3-7fa2-4d5f-a12f-d0cfa7d5617c
{"error": {"message": "The resource could not be found.", "code": 404, "title": "Not Found"}}

[]

@auhlig
Copy link
Member

auhlig commented Jul 14, 2016

Likely same root cause as in the other issue you raised? #742

@liuxiwen
Copy link
Author

@auhlig Basically the same question, but when I used the v2 identity, os.identity().tenants().list() still returned an empty list

@auhlig auhlig closed this as completed Sep 20, 2016
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

2 participants