private static void requestOrganization( CloudFoundryClient cloudFoundryClient, String organizationId) { when(cloudFoundryClient .organizations() .get(GetOrganizationRequest.builder().organizationId(organizationId).build())) .thenReturn(Mono.just(fill(GetOrganizationResponse.builder(), "organization-").build())); }
private static Flux<OrganizationResource> requestOrganizations( CloudFoundryClient cloudFoundryClient, String organization) { return PaginationUtils.requestClientV2Resources( page -> cloudFoundryClient .organizations() .list(ListOrganizationsRequest.builder().name(organization).page(page).build())); }
private static Mono<Void> requestRemoveOrganizationPrivateDomainRequest( CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) { return cloudFoundryClient .organizations() .removePrivateDomain( RemoveOrganizationPrivateDomainRequest.builder() .organizationId(organizationId) .privateDomainId(domainId) .build()); }
private static Mono<AssociateOrganizationPrivateDomainResponse> requestAssociateOrganizationPrivateDomainRequest( CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) { return cloudFoundryClient .organizations() .associatePrivateDomain( AssociateOrganizationPrivateDomainRequest.builder() .organizationId(organizationId) .privateDomainId(domainId) .build()); }
private static void requestOrganizationSpace( CloudFoundryClient cloudFoundryClient, String organizationId, String space) { when(cloudFoundryClient .organizations() .listSpaces( fillPage(ListOrganizationSpacesRequest.builder()) .name(space) .organizationId(organizationId) .build())) .thenReturn( Mono.just( fillPage(ListOrganizationSpacesResponse.builder()) .resource(fill(SpaceResource.builder(), "space-").build()) .build())); }