Skip to content

Commit 0e3d9ab

Browse files
Adds support for new v2 & v3 API fields (#1248)
* adds support for new v2 & v3 API fields * run spotless:apply --------- Co-authored-by: Anthony Dahanne <[email protected]>
1 parent 1fffc4c commit 0e3d9ab

37 files changed

+438
-11
lines changed

cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/organizations/ReactorOrganizationsV3Test.java

+6
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,12 @@ void getUsageSummary() {
401401
UsageSummary.builder()
402402
.startedInstances(3)
403403
.memoryInMb(50)
404+
.routes(0)
405+
.serviceInstances(0)
406+
.reservedPorts(0)
407+
.perAppTasks(2)
408+
.domains(2)
409+
.serviceKeys(0)
404410
.build())
405411
.link(
406412
"self",

cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/authorizations/ReactorAuthorizationsTest.java

+1
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ void getOpenIdProviderConfigurationRequest() {
367367
.supportedUiLocale(Locale.US)
368368
.tokenEndpoint("http://localhost/oauth/token")
369369
.userInfoEndpoint("http://localhost/userinfo")
370+
.endSessionEndpoint("http://localhost/logout.do")
370371
.build())
371372
.expectComplete()
372373
.verify(Duration.ofSeconds(5));

cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_usage_summary_response.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"usage_summary": {
33
"started_instances": 3,
4-
"memory_in_mb": 50
4+
"memory_in_mb": 50,
5+
"routes": 0,
6+
"service_instances": 0,
7+
"reserved_ports": 0,
8+
"per_app_tasks": 2,
9+
"domains": 2,
10+
"service_keys": 0
511
},
612
"links": {
713
"self": {

cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/authorizations/GET_response.json

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
],
6767
"claims_parameter_supported": false,
6868
"service_documentation": "http://docs.cloudfoundry.org/api/uaa/",
69+
"end_session_endpoint": "http://localhost/logout.do",
6970
"ui_locales_supported": [
7071
"en-US"
7172
]

cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public interface CloudFoundryClient {
8181
/**
8282
* The currently supported Cloud Controller API version
8383
*/
84-
String SUPPORTED_API_VERSION = "2.186.0";
84+
String SUPPORTED_API_VERSION = "2.233.0";
8585

8686
/**
8787
* Main entry point to the Cloud Foundry Application Usage Events Client API

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java

+7
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,11 @@ abstract class _ApplicationEntity extends AbstractApplicationEntity {
121121
@Nullable
122122
abstract String getVersion();
123123

124+
/**
125+
* The log rate limit
126+
*/
127+
@JsonProperty("log_rate_limit")
128+
@Nullable
129+
abstract Integer getLogRateLimit();
130+
124131
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java

+7
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,11 @@ abstract class _ApplicationInstanceInfo {
8484
@Nullable
8585
abstract Long getUptime();
8686

87+
/**
88+
* Routable
89+
*/
90+
@JsonProperty("routable")
91+
@Nullable
92+
abstract String getRoutable();
93+
8794
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java

+7
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,11 @@ abstract class _InstanceStatistics {
4646
@Nullable
4747
abstract Statistics getStatistics();
4848

49+
/**
50+
* Routable
51+
*/
52+
@JsonProperty("routable")
53+
@Nullable
54+
abstract String getRoutable();
55+
4956
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationEntity.java

+7
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,11 @@ abstract class _RestageApplicationEntity extends AbstractApplicationEntity {
7979
@Nullable
8080
abstract String getVersion();
8181

82+
/**
83+
* The log rate limit
84+
*/
85+
@JsonProperty("log_rate_limit")
86+
@Nullable
87+
abstract Integer getLogRateLimit();
88+
8289
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java

+7
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,11 @@ abstract class _Statistics {
9797
@Nullable
9898
abstract Usage getUsage();
9999

100+
/**
101+
* The log rate limit
102+
*/
103+
@JsonProperty("log_rate_limit")
104+
@Nullable
105+
abstract Integer getLogRateLimit();
106+
100107
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java

+7
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,11 @@ abstract class _SummaryApplicationResponse extends AbstractApplicationEntity {
117117
@Nullable
118118
abstract String getVersion();
119119

120+
/**
121+
* The log rate limit
122+
*/
123+
@JsonProperty("log_rate_limit")
124+
@Nullable
125+
abstract Integer getLogRateLimit();
126+
120127
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java

+14
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ abstract class _Usage {
3535
@Nullable
3636
abstract Double getCpu();
3737

38+
/**
39+
* The CPU entitlement
40+
*/
41+
@JsonProperty("cpu_entitlement")
42+
@Nullable
43+
abstract Double getCpuEntitlement();
44+
3845
/**
3946
* The disk usage
4047
*/
@@ -56,4 +63,11 @@ abstract class _Usage {
5663
@Nullable
5764
abstract String getTime();
5865

66+
/**
67+
* The log rate limit
68+
*/
69+
@JsonProperty("log_rate")
70+
@Nullable
71+
abstract Integer getLogRate();
72+
5973
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionRequest.java

+7
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,11 @@ abstract class _CreateOrganizationQuotaDefinitionRequest {
107107
@Nullable
108108
abstract Boolean getTrialDatabaseAllowed();
109109

110+
/**
111+
* The log rate limit
112+
*/
113+
@JsonProperty("log_rate_limit")
114+
@Nullable
115+
abstract Integer getLogRateLimit();
116+
110117
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_OrganizationQuotaDefinitionEntity.java

+10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
2121
import org.cloudfoundry.Nullable;
2222
import org.immutables.value.Value;
23+
import org.immutables.value.Value.Default;
2324

2425
/**
2526
* The entity response payload for the Quota Definition resource
@@ -113,4 +114,13 @@ abstract class _OrganizationQuotaDefinitionEntity {
113114
@Nullable
114115
abstract Boolean getTrialDatabaseAllowed();
115116

117+
/**
118+
* The log rate limit
119+
*/
120+
@Value.Default
121+
@JsonProperty("log_rate_limit")
122+
@Nullable
123+
Integer getLogRateLimit(){
124+
return -1;
125+
}
116126
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_SummaryOrganizationResponse.java

+8
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,12 @@ abstract class _SummaryOrganizationResponse {
5858
@Nullable
5959
abstract String getStatus();
6060

61+
/**
62+
* mode
63+
*/
64+
@JsonProperty("mode")
65+
@Nullable
66+
abstract String getMode();
67+
68+
6169
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_SpaceQuotaDefinitionEntity.java

+7
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,11 @@ abstract class _SpaceQuotaDefinitionEntity {
119119
@Nullable
120120
abstract Integer getTotalServices();
121121

122+
/**
123+
* The log rate limit
124+
*/
125+
@JsonProperty("log_rate_limit")
126+
@Nullable
127+
abstract Integer getLogRateLimit();
128+
122129
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceApplicationSummary.java

+7
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,11 @@ abstract class _SpaceApplicationSummary extends AbstractApplicationEntity {
122122
@Nullable
123123
abstract String getVersion();
124124

125+
/**
126+
* The log rate limit
127+
*/
128+
@JsonProperty("log_rate_limit")
129+
@Nullable
130+
abstract Integer getLogRateLimit();
131+
125132
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java

+14
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,18 @@ abstract class _StackEntity {
4242
@Nullable
4343
abstract String getName();
4444

45+
/**
46+
* Build RootFS Image
47+
*/
48+
@JsonProperty("build_rootfs_image")
49+
@Nullable
50+
abstract String getBuildRootfsImage();
51+
52+
/**
53+
* Run RootFS Image
54+
*/
55+
@JsonProperty("run_rootfs_image")
56+
@Nullable
57+
abstract String getRunRootfsImage();
58+
4559
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_UsageSummary.java

+44
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
import com.fasterxml.jackson.annotation.JsonProperty;
2020
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
21+
22+
import org.cloudfoundry.Nullable;
2123
import org.immutables.value.Value;
2224

2325
/**
@@ -39,4 +41,46 @@ abstract class _UsageSummary {
3941
@JsonProperty("started_instances")
4042
abstract Integer getStartedInstances();
4143

44+
/**
45+
* The number of routes
46+
*/
47+
@JsonProperty("routes")
48+
@Nullable
49+
abstract Integer getRoutes();
50+
51+
/**
52+
* The number of service instances
53+
*/
54+
@JsonProperty("service_instances")
55+
@Nullable
56+
abstract Integer getServiceInstances();
57+
58+
/**
59+
* The number of reserved ports
60+
*/
61+
@JsonProperty("reserved_ports")
62+
@Nullable
63+
abstract Integer getReservedPorts();
64+
65+
/**
66+
* The number of domains
67+
*/
68+
@JsonProperty("domains")
69+
@Nullable
70+
abstract Integer getDomains();
71+
72+
/**
73+
* The number of tasks per app
74+
*/
75+
@JsonProperty("per_app_tasks")
76+
@Nullable
77+
abstract Integer getPerAppTasks();
78+
79+
/**
80+
* The number of service keys
81+
*/
82+
@JsonProperty("service_keys")
83+
@Nullable
84+
abstract Integer getServiceKeys();
85+
4286
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java

+7
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,11 @@ public abstract class Build extends Resource {
9393
@JsonProperty("staging_disk_in_mb")
9494
@Nullable
9595
public abstract Integer getStagingDisk();
96+
97+
/**
98+
* Log rate limit in bytes per second allocated for staging of the build
99+
*/
100+
@JsonProperty("staging_log_rate_limit_bytes_per_second")
101+
@Nullable
102+
public abstract Integer getStagingLogRateLimitBytesPerSecond();
96103
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java

+15
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.cloudfoundry.client.v3.processes;
1818

1919
import com.fasterxml.jackson.annotation.JsonProperty;
20+
import org.cloudfoundry.Nullable;
2021
import org.cloudfoundry.client.v3.Metadata;
2122
import org.cloudfoundry.client.v3.Resource;
2223

@@ -72,4 +73,18 @@ public abstract class Process extends Resource {
7273
*/
7374
@JsonProperty("type")
7475
public abstract String getType();
76+
77+
/**
78+
* The version UUID
79+
*/
80+
@JsonProperty("version")
81+
@Nullable
82+
public abstract String getVersion();
83+
84+
/**
85+
* The log rate limit
86+
*/
87+
@JsonProperty("log_rate_limit_in_bytes_per_second")
88+
@Nullable
89+
public abstract Integer getLogRateLimitInBytesPerSecond();
7590
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java

+21
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,25 @@ public abstract class ProcessStatistics {
104104
@JsonProperty("usage")
105105
@Nullable
106106
public abstract ProcessUsage getUsage();
107+
108+
/**
109+
* Routable
110+
*/
111+
@JsonProperty("routable")
112+
@Nullable
113+
abstract String getRoutable();
114+
115+
/**
116+
* The internal IP address of the instance
117+
*/
118+
@JsonProperty("instance_internal_ip")
119+
@Nullable
120+
public abstract String getInstanceInternalIp();
121+
122+
/**
123+
* The log rate limit
124+
*/
125+
@JsonProperty("log_rate_limit")
126+
@Nullable
127+
abstract Integer getLogRateLimit();
107128
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java

+14
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,18 @@ abstract class _ProcessUsage {
5656
@Nullable
5757
abstract String getTime();
5858

59+
/**
60+
* The CPU entitlement
61+
*/
62+
@JsonProperty("cpu_entitlement")
63+
@Nullable
64+
abstract Double getCpuEntitlement();
65+
66+
/**
67+
* The current logging usage of the instance
68+
*/
69+
@JsonProperty("log_rate")
70+
@Nullable
71+
abstract Integer getLogRateLimit();
72+
5973
}

0 commit comments

Comments
 (0)