Package domain

Examples of domain.Role


            stringFromResource("/role_create_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         Role testRole = roleAdminApi.create("jclouds-role");

         assertNull(testRole);

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


            stringFromResource("/role_create_response.json"))));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         Role role = roleAdminApi.get("r1000");

         assertEquals(server.getRequestCount(), 3);
         assertAuthentication(server);
         assertExtensions(server);
         RecordedRequest updateRoleRequest = server.takeRequest();
         assertEquals(updateRoleRequest.getRequestLine(), "GET /OS-KSADM/roles/r1000 HTTP/1.1");

         /*
          * Check response
          */
         assertEquals(role.getId(), "r1000");
         assertEquals(role.getName(), "jclouds-role");
      } finally {
         server.shutdown();
      }
   }
View Full Code Here

      server.enqueue(addCommonHeaders(new MockResponse().setResponseCode(404)));

      try {
         KeystoneApi keystoneApi = api(server.getUrl("/").toString(), "openstack-keystone");
         RoleAdminApi roleAdminApi = keystoneApi.getRoleAdminApi().get();
         Role role = roleAdminApi.get("r1000");

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

TOP

Related Classes of domain.Role

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.