Ask Your Question

How to create openstack user using jcloud?

asked 2014-08-27 13:43:02 -0500

wisarn.p gravatar image

I am a new baby in both openstack and jclouds. Currently, I try to use jclouds to create new openstack user. I can create new user without any problem using dashboard. Using jclouds, is it possible to create new openstack user using jclouds? Also, is there any example codes for this operation using jclouds? I understand that I have to deal with keystone but I couldn't know how to deal with it. I also couldn't found any examples in official jclouds website.


edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-09-02 15:07:50 -0500

Everett Toews gravatar image

updated 2014-09-04 16:07:15 -0500

You can see an example of how to do this at

If you want to try running the example, see the README.

edit flag offensive delete link more


Thanks a lot for guiding me the example code. It really helps !!! Hope that people will try to contribute more jclouds example codes like this for several other operations

wisarn.p gravatar imagewisarn.p ( 2014-09-05 10:15:22 -0500 )edit

answered 2014-09-04 21:16:20 -0500

SGPJ gravatar image

updated 2014-09-04 21:16:56 -0500

Please see from line number 101: jclouds-examples / openstack / src / main / java / org / jclouds / examples / openstack / identity folder create user:-

 private void createUser(Tenant tenant) {
      System.out.format("  Create User%n");

      Optional<? extends UserAdminApi> userAdminApiExtension = keystoneApi.getUserAdminApi();

      if (userAdminApiExtension.isPresent()) {
         System.out.format("    UserAdminApi is present%n");

         UserAdminApi userAdminApi = userAdminApiExtension.get();
         CreateUserOptions userOptions = CreateUserOptions.Builder
         User user = userAdminApi.create("newUser", "newPassword", userOptions);

         System.out.format("    %s%n", user);
      } else {
         System.out.format("    UserAdminApi is *not* present%n");
edit flag offensive delete link more


Thanks a lot for suggestion. This works.

wisarn.p gravatar imagewisarn.p ( 2014-09-05 10:13:17 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-08-27 13:43:02 -0500

Seen: 458 times

Last updated: Sep 04 '14