Search in sources :

Example 1 with ListOrganizationsResponse

use of org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse in project promregator by promregator.

the class CFAccessorMock method retrieveOrgId.

@Override
public Mono<ListOrganizationsResponse> retrieveOrgId(String orgName) {
    if ("unittestorg".equals(orgName)) {
        OrganizationResource or = OrganizationResource.builder().entity(OrganizationEntity.builder().name(orgName).build()).metadata(Metadata.builder().createdAt(CREATED_AT_TIMESTAMP).id(UNITTEST_ORG_UUID).build()).build();
        List<org.cloudfoundry.client.v2.organizations.OrganizationResource> list = new LinkedList<>();
        list.add(or);
        ListOrganizationsResponse resp = org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse.builder().addAllResources(list).build();
        return Mono.just(resp);
    }
    Assert.fail("Invalid OrgId request");
    return null;
}
Also used : ListOrganizationsResponse(org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse) OrganizationResource(org.cloudfoundry.client.v2.organizations.OrganizationResource) LinkedList(java.util.LinkedList)

Aggregations

LinkedList (java.util.LinkedList)1 ListOrganizationsResponse (org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse)1 OrganizationResource (org.cloudfoundry.client.v2.organizations.OrganizationResource)1