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

domain user list #520

Closed
CyrusKang opened this issue Nov 30, 2015 · 4 comments
Closed

domain user list #520

CyrusKang opened this issue Nov 30, 2015 · 4 comments

Comments

@CyrusKang
Copy link

get user list use identityService.users().list()
These users are domain default,

but Authentication is the domain xxx.com
Identifier domainIdentifier = Identifier.byName("xxx.com");
Identifier projectIdentifier = Identifier.byName("xxx");
OSClient os = OSFactory.builderV3()
.endpoint("http://192.168.21.11:5000/v3")
.credentials("xxxx","123456", domainIdentifier)
.scopeToProject(projectIdentifier, domainIdentifier)
//.scopeToDomain(domainIdentifier)
.perspective(Facing.ADMIN)
.authenticate();

how to list the domain ‘xxx.com’ users

@auhlig
Copy link
Member

auhlig commented Nov 30, 2015

Hi @CyrusKang,
For now OpenStack4j's Identity V3 support is limited to authentication.

As you can see in the issues and on our development branch we're currently working on adding more support.

@babyachievement
Copy link

@auhlig ,I also have a problem. When I try "os.identity().users().list().size(), it returns 0.
here is my code

OSClient os = OSFactory.builder()
                .endpoint("http://10.0.0.69:5000/v2.0")
                .credentials("admin","openstack")
                .tenantName("admin")
                .authenticate();

        System.out.println(os.identity().users().list().size());

Openstack: liberty
Java:1.7
OpenStack4j:2.0.9

@vinodborole
Copy link
Contributor

Same for me with openstack4j 2.10; here is the log in debug mode for the above code from @babyachievement

     Mar 18, 2016 2:59:23 PM org.glassfish.jersey.filter.LoggingFilter log
     INFO: 1 * Sending client request on thread main
     1 > GET https://10.30.20.32:5000/v2.0/users
     1 > Accept: application/json
     1 > User-Agent: OpenStack4j / OpenStack Client
     1 > X-Auth-Token: 2fb032f1c4ad4fb694b07bd415612605

      Mar 18, 2016 2:59:24 PM org.glassfish.jersey.filter.LoggingFilter log
      INFO: 2 * Client response received on thread main
      2 < 404
      2 < Content-Length: 93
      2 < Content-Type: application/json
      2 < Date: Fri, 18 Mar 2016 09:29:24 GMT,Fri, 18 Mar 2016 09:29:24 GMT
      2 < Server: Jetty(9.2.z-SNAPSHOT)
      2 < Vary: X-Auth-Token
      2 < Via: 1.1 Repose (Repose/7.1.4.0)
      2 < x-trans-id: 8c6210ef-d35d-4f9c-81d0-8e1183a25084
      {"error": {"message": "The resource could not be found.", "code": 404, "title": "Not Found"}}

@vinodborole
Copy link
Contributor

please reopen if this issue still exists for anyone else

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

4 participants