コード例 #1
0
 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()));
 }
コード例 #2
0
 private static Flux<OrganizationResource> requestOrganizations(
     CloudFoundryClient cloudFoundryClient, String organization) {
   return PaginationUtils.requestClientV2Resources(
       page ->
           cloudFoundryClient
               .organizations()
               .list(ListOrganizationsRequest.builder().name(organization).page(page).build()));
 }
コード例 #3
0
 private static Mono<Void> requestRemoveOrganizationPrivateDomainRequest(
     CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) {
   return cloudFoundryClient
       .organizations()
       .removePrivateDomain(
           RemoveOrganizationPrivateDomainRequest.builder()
               .organizationId(organizationId)
               .privateDomainId(domainId)
               .build());
 }
コード例 #4
0
 private static Mono<AssociateOrganizationPrivateDomainResponse>
     requestAssociateOrganizationPrivateDomainRequest(
         CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) {
   return cloudFoundryClient
       .organizations()
       .associatePrivateDomain(
           AssociateOrganizationPrivateDomainRequest.builder()
               .organizationId(organizationId)
               .privateDomainId(domainId)
               .build());
 }
コード例 #5
0
 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()));
 }