private static void requestSpaceDomains(CloudFoundryClient cloudFoundryClient, String spaceId) { when(cloudFoundryClient .spaces() .listDomains(fillPage(ListSpaceDomainsRequest.builder()).spaceId(spaceId).build())) .thenReturn( Mono.just( fillPage(ListSpaceDomainsResponse.builder()) .resource(fill(DomainResource.builder(), "domain-").build()) .build())); }
private static void requestSpaces(CloudFoundryClient cloudFoundryClient, String organizationId) { when(cloudFoundryClient .spaces() .list(fillPage(ListSpacesRequest.builder()).organizationId(organizationId).build())) .thenReturn( Mono.just( fillPage(ListSpacesResponse.builder()) .resource(fill(SpaceResource.builder(), "space-").build()) .build())); }
private static void requestSpaceSecurityGroups( CloudFoundryClient cloudFoundryClient, String spaceId) { when(cloudFoundryClient .spaces() .listSecurityGroups( fillPage(ListSpaceSecurityGroupsRequest.builder()).spaceId(spaceId).build())) .thenReturn( Mono.just( fillPage(ListSpaceSecurityGroupsResponse.builder()) .resource(fill(SecurityGroupResource.builder(), "security-group-").build()) .build())); }
private static void requestSpaceApplications( CloudFoundryClient cloudFoundryClient, String spaceId) { when(cloudFoundryClient .spaces() .listApplications( fillPage(ListSpaceApplicationsRequest.builder(), "application-") .diego(null) .spaceId(spaceId) .build())) .thenReturn( Mono.just( fillPage(ListSpaceApplicationsResponse.builder()) .resource(fill(ApplicationResource.builder(), "application-").build()) .build())); }
private static Mono<GetSpaceSummaryResponse> requestSpaceSummary( CloudFoundryClient cloudFoundryClient, String spaceId) { return cloudFoundryClient .spaces() .getSummary(GetSpaceSummaryRequest.builder().spaceId(spaceId).build()); }