Hi Alka, Yes, definitely access the Admin endpoint for this functionality! There is an example [1] of using the Keystone Admin APIs that you can use as an additional reference.
Thanks for pointing that out Ignasi! /jd [1] https://github.com/jclouds/jclouds-examples/blob/master/openstack/src/main/ java/org/jclouds/examples/openstack/identity/CreateTenantAndUser.java On 12/10/14, 9:45 AM, "Ignasi Barrera" <n...@apache.org> wrote: >Just to complete Jeremy's checklist, also make sure you're connecting to >the admin endpoint; double check the port. IIRC that extension is not >exposed in the default endpoint. >El 10/12/2014 18:35, "Jeremy Daggett" <jeremy.dagg...@rackspace.com> >escribió: > >> Forwarding to user@Š >> >> Hi Alka! >> >> It could be one of the following scenarios you are running in to: >> >> - the extension is not available in your OpenStack installation >> - the user does not have an Admin role to access this specific API >> >> Does the extension show up when executing this code? >> >> Set<Extension> extensions = keystoneApi.getExtensionApi().list(); >> // iterate through to see what extensions are available... >> >> Please let us know, thanks! >> >> /jd >> >> On 12/9/14, 9:27 PM, "Alka Beniwal" <beniwala...@gmail.com> wrote: >> >> >Hi, >> > >> >I am developing a code to retrieve list of roles in OpenStack. >> > >> >*Code-* >> > RoleAdminApi roleAdminApi= >>keystoneApi.getRoleAdminApi().get();//error >> > FluentIterable<? extends Role> list1 = roleAdminApi.list(); >> > >> >*Error-* >> >java.lang.IllegalStateException: Optional.get() cannot be called on an >> >absent value >> > >> > >> >Any help is appreciated. >> > >> > >> > >> > >> >-- >> >Thanks, >> >Regards, >> >AB >> >>