Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,11 @@ abstract class _CreateDomainRequest {
@Nullable
abstract DomainRelationships getRelationships();

/**
* The router group
*/
@JsonProperty("router_group")
@Nullable
abstract RouterGroup getRouterGroup();

}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,15 @@ public Buildpacks buildpacks() {
@Override
@Value.Derived
public Domains domains() {
return new DefaultDomains(getCloudFoundryClientPublisher(), getRoutingClientPublisher());
CloudFoundryClient cloudFoundryClient = getCloudFoundryClient();
if (cloudFoundryClient == null) {
throw new IllegalStateException("CloudFoundryClient must be set");
}
RoutingClient routingClient = getRoutingClient();
if (routingClient == null) {
throw new IllegalStateException("RoutingClient must be set");
}
return new DefaultDomains(cloudFoundryClient, routingClient);
}

@Override
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public interface Domains {
*
* @param request the Create Shared Domain request
* @return a completion indicator
* @deprecated use {@link #create} instead
*/
@Deprecated
Mono<Void> createShared(CreateSharedDomainRequest request);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.cloudfoundry.operations.domains;

import org.cloudfoundry.Nullable;
import org.immutables.value.Value;

/**
Expand All @@ -32,6 +33,13 @@ abstract class _CreateDomainRequest {
/**
* The organization name of the domain
*/
@Nullable
abstract String getOrganization();

/**
* The router group of the domain
*/
@Nullable
abstract String getRouterGroup();

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ final class DefaultCloudFoundryOperationsTest extends AbstractOperationsTest {
DefaultCloudFoundryOperations.builder()
.cloudFoundryClient(this.cloudFoundryClient)
.dopplerClient(this.dopplerClient)
.routingClient(this.routingClient)
.organization(TEST_ORGANIZATION_NAME)
.space(TEST_SPACE_NAME)
.uaaClient(this.uaaClient)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ void noDomain() {
});
}

@Test
void noOrganization() {
assertThrows(
IllegalStateException.class,
() -> {
CreateDomainRequest.builder().domain("test-domain").build();
});
}

@Test
void valid() {
CreateDomainRequest.builder()
Expand Down
Loading