{"action":"created","issue":{"url":"https://api.github.com/repos/ContainX/openstack4j/issues/885","repository_url":"https://api.github.com/repos/ContainX/openstack4j","labels_url":"https://api.github.com/repos/ContainX/openstack4j/issues/885/labels{/name}","comments_url":"https://api.github.com/repos/ContainX/openstack4j/issues/885/comments","events_url":"https://api.github.com/repos/ContainX/openstack4j/issues/885/events","html_url":"https://github.com/ContainX/openstack4j/issues/885","id":188482878,"number":885,"title":"Identity functionality doesn't work - Returning empty lists and sending the request to the wrong endpoint.","user":{"login":"pstoyanov91","id":7808089,"avatar_url":"https://avatars.githubusercontent.com/u/7808089?v=3","gravatar_id":"","url":"https://api.github.com/users/pstoyanov91","html_url":"https://github.com/pstoyanov91","followers_url":"https://api.github.com/users/pstoyanov91/followers","following_url":"https://api.github.com/users/pstoyanov91/following{/other_user}","gists_url":"https://api.github.com/users/pstoyanov91/gists{/gist_id}","starred_url":"https://api.github.com/users/pstoyanov91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstoyanov91/subscriptions","organizations_url":"https://api.github.com/users/pstoyanov91/orgs","repos_url":"https://api.github.com/users/pstoyanov91/repos","events_url":"https://api.github.com/users/pstoyanov91/events{/privacy}","received_events_url":"https://api.github.com/users/pstoyanov91/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-10T11:21:44Z","updated_at":"2016-11-11T09:10:27Z","closed_at":"2016-11-11T09:10:27Z","body":"The library doesn't seem to make the calls to the right endpoint so the whole identity functionality doesn't work. I want to point out the the networking functionality is working properly.\r\n\r\nOpenstack4j version: 3.0.0\r\nOpenstack version: Newton\r\nJava 1.8\r\n\r\nThis is my code for the v3 client: \r\nOSClientV3 osV3 = OSFactory.builderV3()\r\n                    .endpoint(OPENSTACK_IP_ADDRESS)\r\n                    .credentials(OPENSTACK_USER, OPENSTACK_IP_PASSWORD, Identifier.byId(\"default\"))\r\n                    .scopeToProject(Identifier.byName(\"admin\"), Identifier.byName(\"Default\"))\r\n                    .authenticate();\r\n\r\nAfter that I try to list the users:\r\nSystem.out.println(osV3.identity().users().list());\r\n\r\nI have enabled Http Logging Filter (Which by the way doesn't work on versions 3.0.1 and 3.0.2, so I had to use version 3.0.0 in order to get the output of the logger).\r\n\r\nThe authentication is passing successful and I get the following output:\r\n`{\"token\": {\"is_domain\": false, \"methods\": [\"password\"], \"roles\": [{\"id\": \"e340895602ee4bd2922d93c02ca578a2\", \"name\": \"admin\"}], \"is_admin_project\": true, \"project\": {\"domain\": {\"id\": \"default\", \"name\": \"Default\"}, \"id\": \"18769f023ad4467c808176f11ad39959\", \"name\": \"admin\"}, \"catalog\": [{\"endpoints\": [{\"url\": \"http://10.129.3.97:8776/v2/18769f023ad4467c808176f11ad39959\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"27bb8f62e13848fb8aa876b307af197f\"}, {\"url\": \"http://10.129.3.97:8776/v2/18769f023ad4467c808176f11ad39959\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"5cac92d77388456d95e155aed1d7e5d8\"}, {\"url\": \"http://10.129.3.97:8776/v2/18769f023ad4467c808176f11ad39959\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"8cd077f93a8a4925b0c26bc76aae9fa3\"}], \"type\": \"volumev2\", \"id\": \"4f538b75f32748e7aa3b9600cf5b5066\", \"name\": \"cinderv2\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97:8774/v2/18769f023ad4467c808176f11ad39959\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"695cd2ec96e84a0db8d4ab709f64829b\"}, {\"url\": \"http://10.129.3.97:8774/v2/18769f023ad4467c808176f11ad39959\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"7ef174fcf57b48be96454f7e88108778\"}, {\"url\": \"http://10.129.3.97:8774/v2/18769f023ad4467c808176f11ad39959\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"914a0f39595e4266a7d97fb2c60b8037\"}], \"type\": \"compute_legacy\", \"id\": \"57fb21878e294be69b5bf20c0abdbc08\", \"name\": \"nova_legacy\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97:8774/v2.1\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"b22cd0ffe8624deb8b074a0a68a20694\"}, {\"url\": \"http://10.129.3.97:8774/v2.1\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"d80dec657e9a40b2ae9229fccf1fd20c\"}, {\"url\": \"http://10.129.3.97:8774/v2.1\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"f0f9772b98ad471c9c9340c796c3fb53\"}], \"type\": \"compute\", \"id\": \"69a5e35ebbf7481eb95715e52542fdc2\", \"name\": \"nova\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97:8776/v3/18769f023ad4467c808176f11ad39959\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"80fd82075d6a41dfbfa6a53450d6395e\"}, {\"url\": \"http://10.129.3.97:8776/v3/18769f023ad4467c808176f11ad39959\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"ab3414c41f504771be58cf695a2903e9\"}, {\"url\": \"http://10.129.3.97:8776/v3/18769f023ad4467c808176f11ad39959\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"b0d7f8d3cfff46b2b772241b60be2bba\"}], \"type\": \"volumev3\", \"id\": \"796e21e44fbc4d298d99523ecb8f9d2d\", \"name\": \"cinderv3\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97:8004/v1/18769f023ad4467c808176f11ad39959\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"16ca587c347e423da0c4a653cb75baba\"}, {\"url\": \"http://10.129.3.97:8004/v1/18769f023ad4467c808176f11ad39959\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"3c0de009015449d3aa4ef4ab2ee75363\"}, {\"url\": \"http://10.129.3.97:8004/v1/18769f023ad4467c808176f11ad39959\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"3dfca194c6844b8f971140f5448e8b9e\"}], \"type\": \"orchestration\", \"id\": \"b6bf1e0f72ea4951aa9b13ad9fadd795\", \"name\": \"heat\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97:8000/v1\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"b54e3f0d9af54600a8c01a71765c2e25\"}, {\"url\": \"http://10.129.3.97:8000/v1\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"bde41bbfb24d4bd3968642bc12844204\"}, {\"url\": \"http://10.129.3.97:8000/v1\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"c768a803d2e94ebb91da76ca51ea5934\"}], \"type\": \"cloudformation\", \"id\": \"c25fd27e6daf4b0bafa148c4fe8032f6\", \"name\": \"heat-cfn\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97:9696/\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"32664a2c7cb644649bdb6b1d04523879\"}, {\"url\": \"http://10.129.3.97:9696/\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"462ec36a4d4a404cad4a173d12cc246c\"}, {\"url\": \"http://10.129.3.97:9696/\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"9fce850be5164149ab92a6ae616c8042\"}], \"type\": \"network\", \"id\": \"c57c4669b10e4017a32f521a878baf5b\", \"name\": \"neutron\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97:9292\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"a81a069d166e43bf9464cdf9229adfaa\"}, {\"url\": \"http://10.129.3.97:9292\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"a91173d687b9464b8728a673670713e9\"}, {\"url\": \"http://10.129.3.97:9292\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"f6d3a35a69f9492484a73eb1ffdb4467\"}], \"type\": \"image\", \"id\": \"d291e0dd7f2f4fd0a6e2d2ace780db1f\", \"name\": \"glance\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97:8776/v1/18769f023ad4467c808176f11ad39959\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"35222c5a41ca40caa8a6a3cc7888b7ff\"}, {\"url\": \"http://10.129.3.97:8776/v1/18769f023ad4467c808176f11ad39959\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"8600c36b3f4b41fc89a06e29200603d3\"}, {\"url\": \"http://10.129.3.97:8776/v1/18769f023ad4467c808176f11ad39959\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"fb8e5cf43b4d4dcb9eec4c9a523e221d\"}], \"type\": \"volume\", \"id\": \"eb2cf3942adc4d4f945263b2160a743c\", \"name\": \"cinder\"}, {\"endpoints\": [{\"url\": \"http://10.129.3.97/identity\", \"interface\": \"public\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"777bab1ab19445139beb83ac9c2e0c95\"}, {\"url\": \"http://10.129.3.97/identity\", \"interface\": \"internal\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"d4a4b93bdbe343e1b9d97e4af57d980f\"}, {\"url\": \"http://10.129.3.97/identity_admin\", \"interface\": \"admin\", \"region\": \"RegionOne\", \"region_id\": \"RegionOne\", \"id\": \"fdff4aedb5ea472e8034a17bb02ba44f\"}], \"type\": \"identity\", \"id\": \"f028662e016e4ecba05273717683e50f\", \"name\": \"keystone\"}], \"expires_at\": \"2016-11-10T12:01:08.000000Z\", \"user\": {\"password_expires_at\": null, \"domain\": {\"id\": \"default\", \"name\": \"Default\"}, \"id\": \"4fc619533a2147f994f227a3c4fa9c93\", \"name\": \"admin\"}, \"audit_ids\": [\"fQRVwg2UQuChpk3JofWJRw\"], \"issued_at\": \"2016-11-10T11:01:08.000000Z\"}}`\r\n\r\n\r\nAfter that I'm trying tho list the users:\r\n\r\nNov 10, 2016 1:01:08 PM org.glassfish.jersey.filter.LoggingFilter log\r\nINFO: 1 * Sending client request on thread main\r\n**1 > GET http://10.129.3.97/identity/users**\r\n1 > Accept: application/json\r\n1 > User-Agent: OpenStack4j / OpenStack Client\r\n1 > X-Auth-Token: 15390cbe45a4422ea15413ee616028c7\r\n\r\nNov 10, 2016 1:01:08 PM org.glassfish.jersey.filter.LoggingFilter log\r\nINFO: 1 * Client response received on thread main\r\n1 < 404\r\n1 < Connection: Keep-Alive\r\n1 < Content-Length: 93\r\n1 < Content-Type: application/json\r\n1 < Date: Thu, 10 Nov 2016 11:01:08 GMT\r\n1 < Keep-Alive: timeout=5, max=100\r\n1 < Server: Apache/2.4.18 (Ubuntu)\r\n1 < Vary: X-Auth-Token\r\n{\"error\": {\"message\": \"The resource could not be found.\", \"code\": 404, \"title\": \"Not Found\"}}\r\n\r\n**As you can see the GET request is sent to /identity/users instead of /v3/users**\r\n\r\nWhat I've found out is, that when **I log in Openstack UI and go to Admin -> System Information** i have this endpoint:\r\n![openstack endpoints](https://cloud.githubusercontent.com/assets/7808089/20174739/1a66602e-a748-11e6-8afc-93ac8298eb52.png)\r\n"},"comment":{"url":"https://api.github.com/repos/ContainX/openstack4j/issues/comments/259913839","html_url":"https://github.com/ContainX/openstack4j/issues/885#issuecomment-259913839","issue_url":"https://api.github.com/repos/ContainX/openstack4j/issues/885","id":259913839,"user":{"login":"pstoyanov91","id":7808089,"avatar_url":"https://avatars.githubusercontent.com/u/7808089?v=3","gravatar_id":"","url":"https://api.github.com/users/pstoyanov91","html_url":"https://github.com/pstoyanov91","followers_url":"https://api.github.com/users/pstoyanov91/followers","following_url":"https://api.github.com/users/pstoyanov91/following{/other_user}","gists_url":"https://api.github.com/users/pstoyanov91/gists{/gist_id}","starred_url":"https://api.github.com/users/pstoyanov91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pstoyanov91/subscriptions","organizations_url":"https://api.github.com/users/pstoyanov91/orgs","repos_url":"https://api.github.com/users/pstoyanov91/repos","events_url":"https://api.github.com/users/pstoyanov91/events{/privacy}","received_events_url":"https://api.github.com/users/pstoyanov91/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T09:10:27Z","updated_at":"2016-11-11T09:10:27Z","body":"Hi auhlig,\r\nThanks! The problem really was with the endpoints. \r\n\r\nFor those having the same issue: I have changed the **http://ip_addr/identity** to **http://ip_addr:5000/v3** directly in the keystone database. That broke the UI, but the requests with the library are now working. I haven't figured out how to safely change the keystone endpoints after the OpenStack installation, so the best option is to be configured on installation.\r\n\r\nBest Regards."}}
{"actor":{"display_login":"pstoyanov91"}}