@Override protected Function<Object, IterableWithMarker<Tenant>> markerToNextForCallingArg0(final String ignored) { final TenantApi tenantApi = api.getTenantApi().get(); return new Function<Object, IterableWithMarker<Tenant>>() { @SuppressWarnings("unchecked") @Override public IterableWithMarker<Tenant> apply(Object input) { return IterableWithMarker.class.cast(tenantApi.list(marker(input.toString()))); } @Override public String toString() { return "listTenants()"; } }; }
@BeforeClass(groups = { "integration", "live" }) @Override public void setup() { super.setup(); userAdminOption = api.getUserAdminApi(); if (!userAdminOption.isPresent()) { throw new SkipException("The tests are skipped since OS-KSADM extension is not exposed through the Keystone API"); } userApi = api.getUserApi(); }
@Override public Set<? extends Extension> get() { return keystoneApi.get().getExtensionApi().list(); } })));
@BeforeClass(groups = { "integration", "live" }) @Override public void setup() { super.setup(); tenantAdminOption = api.getTenantAdminApi(); if (!tenantAdminOption.isPresent()) { throw new SkipException( "The tests are skipped since OS-KSADM extension is not exposed through the Keystone API"); } tenantApi = api.getTenantApi(); }
public void testUsers() { 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); } }
public void testUserRolesOnTenant() { UserApi userApi = api.getUserApi().get(); Set<? extends Tenant> tenants = api.getTenantApi().get().list().concat().toSet(); for (User user : userApi.list().concat()) { for (Tenant tenant : tenants) { Set<? extends Role> roles = userApi.listRolesOfUserOnTenant(user.getId(), tenant.getId()); for (Role role : roles) { assertNotNull(role.getId()); } } } }
@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()"; } }; }
public void testTokenEndpoints() { TokenApi tokenApi = api.getTokenApi().get(); Set<? extends Endpoint> endpoints = tokenApi.listEndpointsForToken(token); assertNotNull(endpoints); assertFalse(endpoints.isEmpty()); }
public void testGetApiMetaData() { ApiMetadata result = api.getApiMetadata(); assertNotNull(result); assertNotNull(result.getId()); assertNotNull(result.getStatus()); assertNotNull(result.getUpdated()); }
public void testTenants() { Set<? extends Tenant> result = api.getServiceApi().listTenants(); assertNotNull(result); assertFalse(result.isEmpty()); for (Tenant tenant : result) { assertNotNull(tenant.getId()); } } }
public void testUsers() { 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); } }
public void testUserRolesOnTenant() { UserApi userApi = api.getUserApi().get(); Set<? extends Tenant> tenants = api.getTenantApi().get().list().concat().toSet(); for (User user : userApi.list().concat()) { for (Tenant tenant : tenants) { Set<? extends Role> roles = userApi.listRolesOfUserOnTenant(user.getId(), tenant.getId()); for (Role role : roles) { assertNotNull(role.getId()); } } } }
@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()"; } }; }
public void testTokenEndpoints() { TokenApi tokenApi = api.getTokenApi().get(); Set<? extends Endpoint> endpoints = tokenApi.listEndpointsForToken(token); assertNotNull(endpoints); assertFalse(endpoints.isEmpty()); }
public void testGetApiMetaData() { ApiMetadata result = api.getApiMetadata(); assertNotNull(result); assertNotNull(result.getId()); assertNotNull(result.getStatus()); assertNotNull(result.getUpdated()); }
public void testTenants() { Set<? extends Tenant> result = api.getServiceApi().listTenants(); assertNotNull(result); assertFalse(result.isEmpty()); for (Tenant tenant : result) { assertNotNull(tenant.getId()); } } }
@Override protected Function<Object, IterableWithMarker<Tenant>> markerToNextForCallingArg0(final String ignored) { final TenantApi tenantApi = api.getTenantApi().get(); return new Function<Object, IterableWithMarker<Tenant>>() { @SuppressWarnings("unchecked") @Override public IterableWithMarker<Tenant> apply(Object input) { return IterableWithMarker.class.cast(tenantApi.list(marker(input.toString()))); } @Override public String toString() { return "listTenants()"; } }; }
public void testUsersByName() { UserApi userApi = api.getUserApi().get(); for (User user : userApi.list().concat()) { User aUser = userApi.getByName(user.getName()); assertEquals(aUser, user); } } }
@Override public Set<? extends Extension> get() { return keystoneApi.get().getExtensionApi().list(); } })));
@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()"; } }; }