Package org.jclouds.openstack.keystone.v2_0.functions.internal.ParseUsers

Examples of org.jclouds.openstack.keystone.v2_0.functions.internal.ParseUsers.Users


      UserApi userApi = api.getUserApi().get();
      Set<? extends User> users = userApi.list().concat().toSet();
      assertNotNull(users);
      assertFalse(users.isEmpty());
      for (User user : users) {
         User aUser = userApi.get(user.getId());
         assertEquals(aUser, user);
      }

   }
View Full Code Here


   public void testUsersByName() {

      UserApi userApi = api.getUserApi().get();
      for (User user : userApi.list().concat()) {
         User aUser = userApi.getByName(user.getName());
         assertEquals(aUser, user);
      }

   }
View Full Code Here

      Token result = tokenApi.get(token);
      assertNotNull(result);
      assertEquals(result.getId(), token);
      assertNotNull(result.getTenant());

      User user = tokenApi.getUserOfToken(token);
      assertNotNull(user);
      assertNotNull(user.getId());
      assertNotNull(user.getName());

   }
View Full Code Here

         UserAdminApi userAdminApi = userAdminApiExtension.get();
         CreateUserOptions userOptions = CreateUserOptions.Builder
               .tenant(tenant.getId())
               .email("new.email@example.com");
         User user = userAdminApi.create("newUser", "newPassword", userOptions);

         System.out.format("    %s%n", user);
      } else {
         System.out.format("    UserAdminApi is *not* present%n");
         System.exit(1);
View Full Code Here

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         CreateUserOptions createUserOptions = CreateUserOptions.Builder.email("john.smith@example.org").enabled(true);
         User testUser = userAdminApi.create("jqsmith", "jclouds-password", createUserOptions);

         assertNull(testUser);

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
View Full Code Here

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         UpdateUserOptions updateUserOptions = UpdateUserOptions.Builder.email("john.smith.renamed@example.org")
               .enabled(false).name("jqsmith-renamed").password("jclouds-password");
         User updatedUser = userAdminApi.update("u1000", updateUserOptions);

         assertNotNull(updatedUser);
         assertEquals(updatedUser.getId(), "u1000");

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertExtensions(server);
         RecordedRequest updateUserRequest = server.takeRequest();
View Full Code Here

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         UpdateUserOptions updateUserOptions = UpdateUserOptions.Builder.email("john.smith.renamed@example.org")
               .enabled(false).name("jqsmith-renamed").password("jclouds-password");
         User updatedUser = userAdminApi.update("u1000", updateUserOptions);

         assertNull(updatedUser);

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
View Full Code Here

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         UserAdminApi userAdminApi = keystoneApi.getUserAdminApi().get();
         CreateUserOptions createUserOptions = CreateUserOptions.Builder.email("john.smith@example.org").enabled(true);
         User testUser = userAdminApi.create("jqsmith", "jclouds-password", createUserOptions);

         assertNotNull(testUser);
         assertEquals(testUser.getId(), "u1000");

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertExtensions(server);
         RecordedRequest createUserRequest = server.takeRequest();
View Full Code Here

         this.api = checkNotNull(api, "api");
      }

      @Override
      protected Function<Object, IterableWithMarker<Service>> markerToNextForArg0(Optional<Object> ignored) {
         final ServiceAdminApi serviceApi = api.getServiceAdminApi().get();
         return new Function<Object, IterableWithMarker<Service>>() {

            @SuppressWarnings("unchecked")
            @Override
            public IterableWithMarker<Service> apply(Object input) {
               PaginationOptions paginationOptions = PaginationOptions.class.cast(input);
               return IterableWithMarker.class.cast(serviceApi.list(paginationOptions));
            }

            @Override
            public String toString() {
               return "listServices()";
View Full Code Here

      Optional<? extends TenantAdminApi> tenantAdminApiExtension = keystoneApi.getTenantAdminApi();

      if (tenantAdminApiExtension.isPresent()) {
         System.out.format("    TenantAdminApi is present%n");

         TenantAdminApi tenantAdminApi = tenantAdminApiExtension.get();
         CreateTenantOptions tenantOptions = CreateTenantOptions.Builder
               .description("My New Tenant");
         Tenant tenant = tenantAdminApi.create("newTenant", tenantOptions);

         System.out.format("    %s%n", tenant);

         return tenant;
      } else {
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.keystone.v2_0.functions.internal.ParseUsers.Users

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.