From a7e8b64e64759ce1a65b2df8decdc925dba1a9e7 Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Wed, 13 Nov 2024 09:50:43 +0000 Subject: [PATCH 1/6] adds missing v3 fields & supported version --- .../java/org/cloudfoundry/client/CloudFoundryClient.java | 2 +- .../client/v3/applications/_ApplicationRelationships.java | 6 ++++++ .../java/org/cloudfoundry/client/v3/processes/_Data.java | 7 +++++++ .../org/cloudfoundry/uaa/identityzones/_UserConfig.java | 7 +++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java index 75186dbd8c..2182f77b94 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java @@ -81,7 +81,7 @@ public interface CloudFoundryClient { /** * The currently supported Cloud Controller API version */ - String SUPPORTED_API_VERSION = "2.233.0"; + String SUPPORTED_API_VERSION = "2.243.0"; /** * Main entry point to the Cloud Foundry Application Usage Events Client API diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java index 42449efe6c..760e5ee22a 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java @@ -34,4 +34,10 @@ abstract class _ApplicationRelationships { @JsonProperty("space") abstract ToOneRelationship getSpace(); + /** + * The current droplet relationship + */ + @JsonProperty("current_droplet") + abstract ToOneRelationship getCurrentDroplet(); + } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_Data.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_Data.java index 81ab913dc1..67af40ec2b 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_Data.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_Data.java @@ -46,4 +46,11 @@ abstract class _Data { @Nullable abstract Integer getTimeout(); + /** + * The interval in seconds between health check requests + */ + @JsonProperty("interval") + @Nullable + abstract Integer getInterval(); + } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java index bec318c83f..e7b9eaefe4 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java @@ -60,5 +60,12 @@ abstract class _UserConfig { @Nullable abstract Boolean getcheckOriginEnabled(); + /** + * Flag for switching off the loop over all origins in a zone (defaults to true) + */ + @JsonProperty("allowOriginLoop") + @Nullable + abstract Boolean getAllowOriginLoop(); + } From e269dbdc8060fa402820c3d9e5720253a8558080 Mon Sep 17 00:00:00 2001 From: Yavor16 Date: Fri, 6 Dec 2024 11:35:43 +0200 Subject: [PATCH 2/6] add readiness health check support in client add integration test Upgrade JUnit4 to JUnit5 Java 17 and 21 CI is now manually triggered ala workflow_dispatch Revert removal of Test import * make sure that we also compile the integration tests during Github CI updates Conditonal CloudFoundry version based test to JUnit 5 Do not use ExtendWith * when the extension has a mandatory field to initialize, because ExtendWith only works with default constructor Junit4 to Junit4 Integration Tests migration * add the extension registration declaratively (using an annotation) Modified getOrganizationId() & getSpaceId() as per V3 adding security groups v3 create api adding create security group impl and tests adding get security group api and tests adding get security group impl + test adding list security groups impl + api adding update security group api adding update security group api v3 impl adding security groups delete api v3 impl and tests adding bind running/staging security group v3 api adding bind impl adding unbind security group adding list running/staging api and tests adding create security group test adding integration tests adding integration tests fixing setup/teardown fixing integration tests refactoring integration tests Ignore .idea/ for real now Migration to Junit5 * tests from radoslav commits Make integration tests chatty * cause they have interesting things to display Add globally enabled Spotless apply; include integration-test mask off non-permission bits apply spotless formatting * on top of Hans Schulz "mask off non-permission bits" porting check route to v3 api porting delete orphaned routes pushing delete route cleaning up leftovers in tests applying default style and fixing missing imports PR #1194: rebase and format with spotless defaultApplication-api minor changes Modified Junit tests to adopt V3 changes. rebasing 1173 fix health check type serialization Update tcp-routes.yml Update tcp-routes.yml Update IntegrationTestConfiguration.java fix formatting test --- .DS_Store | Bin 0 -> 8196 bytes .gitignore | 2 +- ci/tcp-routes.yml | 6 + .../cloudfoundry-client-reactor.iml | 121 ++++++++++++++++++ .../ReactorApplicationsV3Test.java | 42 ++++++ .../v3/processes/ReactorProcessesTest.java | 52 ++++++++ .../v3/apps/GET_{id}_processes_response.json | 16 +++ .../GET_{id}_processes_{type}_response.json | 8 ++ ...ocesses_{type}_actions_scale_response.json | 8 ++ .../client/v3/processes/GET_response.json | 16 +++ .../v3/processes/GET_{id}_response.json | 8 ++ .../v3/processes/PATCH_{id}_response.json | 8 ++ .../POST_{id}_actions_scale_response.json | 8 ++ cloudfoundry-client/cloudfoundry-client.iml | 6 + .../v2/applications/_ApplicationEntity.java | 4 + .../_ApplicationInstanceInfo.java | 4 + .../v2/applications/_InstanceStatistics.java | 3 + .../client/v2/applications/_Statistics.java | 4 + .../_SummaryApplicationResponse.java | 3 + .../client/v2/applications/_Usage.java | 4 + .../client/v2/stacks/_StackEntity.java | 8 ++ .../cloudfoundry/client/v3/builds/Build.java | 4 + .../client/v3/processes/Process.java | 13 ++ .../v3/processes/ProcessStatistics.java | 12 ++ .../processes/ReadinessHealthCheckType.java | 69 ++++++++++ .../processes/_ProcessStatisticsResource.java | 2 + .../client/v3/processes/_ProcessUsage.java | 6 +- .../v3/processes/_ReadinessHealthCheck.java | 43 +++++++ .../v3/processes/_UpdateProcessRequest.java | 7 + cloudfoundry-java-client.iml | 11 ++ .../cloudfoundry-operations.iml | 6 + .../ApplicationManifestUtilsV3.java | 34 +++++ .../applications/_ManifestV3Process.java | 25 ++++ cloudfoundry-util/cloudfoundry-util.iml | 87 +++++++++++++ integration-test/.DS_Store | Bin 0 -> 6148 bytes integration-test/integration-test.iml | 6 + integration-test/src/.DS_Store | Bin 0 -> 6148 bytes integration-test/src/test/.DS_Store | Bin 0 -> 6148 bytes .../operations/ApplicationsTest.java | 17 +++ integration-test/src/test/resources/.DS_Store | Bin 0 -> 6148 bytes .../resources/test-application 2/Staticfile | 0 .../resources/test-application 2/index.html | 10 ++ test-log-cache/test-log-cache.iml | 54 ++++++++ test-service-broker/test-service-broker.iml | 6 + 44 files changed, 741 insertions(+), 2 deletions(-) create mode 100644 .DS_Store create mode 100644 cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml create mode 100644 cloudfoundry-client/cloudfoundry-client.iml create mode 100644 cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ReadinessHealthCheckType.java create mode 100644 cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ReadinessHealthCheck.java create mode 100644 cloudfoundry-java-client.iml create mode 100644 cloudfoundry-operations/cloudfoundry-operations.iml create mode 100644 cloudfoundry-util/cloudfoundry-util.iml create mode 100644 integration-test/.DS_Store create mode 100644 integration-test/integration-test.iml create mode 100644 integration-test/src/.DS_Store create mode 100644 integration-test/src/test/.DS_Store create mode 100644 integration-test/src/test/resources/.DS_Store create mode 100644 integration-test/src/test/resources/test-application 2/Staticfile create mode 100644 integration-test/src/test/resources/test-application 2/index.html create mode 100644 test-log-cache/test-log-cache.iml create mode 100644 test-service-broker/test-service-broker.iml diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f72a5c1a85758c5ae52105d8be007245dc8a13e7 GIT binary patch literal 8196 zcmeHM-EPw`6h7|CnrZ?S4cH`v6p7odY(pRrH(j?~OyWmcC%6DKnx<^g(zr^}7Bo%j zE$|M!0^*7%fp_5wKL2z|TsF2{Ak^8C{Wu)`rONaXgDG{iyIQWMai~zK z6Vrzerti%335ChK!@euUiPaR^(lTHf7-vA7-3!#BU^C<`dK+Sv~~5&xi=WI7trWp#a2enjn* zl=T~N6!K^n8p7Jm(-95YV^H3NbP9LGdE(hESjrNAPOFpQh;vTfaLn8Zj^WgWGh(Zq8YYvMn*gS3#`F z>?-=JzMr&04}nN5SFt=4&rzgPb_*i5R%4%F0 z(Tw0F_L5z>cZd+SNA3LBm{>1a-Pw$8BG+0U&TOH!NFJQYXT94wK5Hk#XjXj z-jJ2f&dNe{!qb$R-@G{gZyf*qf5KU?)3Xd*YzA0yy|G>g2cx%HlMZp#c9Gv8izMWR y3Z)8)+=l>MAN?>y-G!*osc9T4L<`ct{}5pJf6zYqN1NU8?Ear+Lq468Tl@xztZS(N literal 0 HcmV?d00001 diff --git a/.gitignore b/.gitignore index 7d7fa1209e..0bdee5d5c8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ bin/ .settings/ .factorypath .gradle -.history/ +.history/ \ No newline at end of file diff --git a/ci/tcp-routes.yml b/ci/tcp-routes.yml index 306d30ce69..c0fab20e86 100644 --- a/ci/tcp-routes.yml +++ b/ci/tcp-routes.yml @@ -25,3 +25,9 @@ path: /product-properties/.cloud_controller.default_quota_memory_limit_mb value: value: ((DEFAULT_QUOTA_MEM_MB)) +- type: replace + path: /resource-config/compute/instances + value: 4 +- type: replace + path: /resource-config/compute/instance_type/id + value: "2xlarge.mem" diff --git a/cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml b/cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml new file mode 100644 index 0000000000..474eb735cf --- /dev/null +++ b/cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3Test.java index 4dc2ec79c0..4e23eea93e 100644 --- a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3Test.java +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3Test.java @@ -117,6 +117,8 @@ import org.cloudfoundry.client.v3.processes.ProcessState; import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource; import org.cloudfoundry.client.v3.processes.ProcessUsage; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheck; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; import org.cloudfoundry.client.v3.routes.Application; import org.cloudfoundry.client.v3.routes.Destination; import org.cloudfoundry.client.v3.routes.Process; @@ -807,6 +809,16 @@ void getProcess() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) @@ -1627,6 +1639,16 @@ void listProcesses() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) @@ -1685,6 +1707,16 @@ void listProcesses() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) @@ -2052,6 +2084,16 @@ void scale() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcessesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcessesTest.java index 8efd6f66b4..e53ab74809 100644 --- a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcessesTest.java +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcessesTest.java @@ -43,6 +43,8 @@ import org.cloudfoundry.client.v3.processes.ProcessState; import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource; import org.cloudfoundry.client.v3.processes.ProcessUsage; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheck; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; import org.cloudfoundry.client.v3.processes.ScaleProcessRequest; import org.cloudfoundry.client.v3.processes.ScaleProcessResponse; import org.cloudfoundry.client.v3.processes.TerminateProcessInstanceRequest; @@ -121,6 +123,16 @@ void get() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) @@ -309,6 +321,16 @@ void list() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) @@ -367,6 +389,16 @@ void list() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) @@ -458,6 +490,16 @@ void scale() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) @@ -545,6 +587,16 @@ void update() { .endpoint(null) .build()) .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) .metadata( Metadata.builder() .annotations(Collections.emptyMap()) diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_response.json index aadb83f8aa..bd791faf15 100644 --- a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_response.json +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_response.json @@ -28,6 +28,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} @@ -68,6 +76,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_response.json index a8023d1c74..d367c69e91 100644 --- a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_response.json +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_response.json @@ -12,6 +12,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_response.json index a8023d1c74..d367c69e91 100644 --- a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_response.json +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_response.json @@ -12,6 +12,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_response.json index 645e8768d8..0ee0d5c307 100644 --- a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_response.json +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_response.json @@ -28,6 +28,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} @@ -68,6 +76,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_response.json index a8023d1c74..d367c69e91 100644 --- a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_response.json +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_response.json @@ -12,6 +12,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_response.json index ccbff60e4a..f136f02b96 100644 --- a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_response.json +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_response.json @@ -12,6 +12,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_response.json index a8023d1c74..d367c69e91 100644 --- a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_response.json +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_response.json @@ -12,6 +12,14 @@ "endpoint": null } }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, "metadata": { "annotations": {}, "labels": {} diff --git a/cloudfoundry-client/cloudfoundry-client.iml b/cloudfoundry-client/cloudfoundry-client.iml new file mode 100644 index 0000000000..3edaa8488f --- /dev/null +++ b/cloudfoundry-client/cloudfoundry-client.iml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java index 31dec6ef77..f26b73d08d 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java @@ -58,6 +58,10 @@ abstract class _ApplicationEntity extends AbstractApplicationEntity { @Nullable abstract String getEventsUrl(); + @JsonProperty("log_rate_limit") + @Nullable + abstract String getLogRateLimit(); + /** * The package state */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java index 4e6ff0e812..0e1b7254db 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java @@ -56,6 +56,10 @@ abstract class _ApplicationInstanceInfo { @Nullable abstract Integer getDebugPort(); + @JsonProperty("routable") + @Nullable + abstract Boolean getRoutable(); + /** * The details */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java index e2cfae9cd2..784c805c52 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java @@ -46,6 +46,9 @@ abstract class _InstanceStatistics { @Nullable abstract Statistics getStatistics(); + @JsonProperty("routable") + @Nullable + abstract Boolean getLogRate(); /** * Routable */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java index 1135d51dc6..c7d26c1843 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java @@ -34,6 +34,10 @@ abstract class _Statistics { @Nullable abstract Long getDiskQuota(); + @JsonProperty("log_rate_limit") + @Nullable + abstract String getLogRateLimit(); + /** * The application file descriptor quota */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java index 5ad85ae19b..51d0fcf812 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java @@ -40,6 +40,9 @@ abstract class _SummaryApplicationResponse extends AbstractApplicationEntity { @Nullable abstract List getAvailableDomains(); + @JsonProperty("log_rate_limit") + @Nullable + abstract String getLogRate(); /** * The detected buildpack */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java index 564ab275f9..8f83dab7d7 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java @@ -35,6 +35,10 @@ abstract class _Usage { @Nullable abstract Double getCpu(); + @JsonProperty("log_rate") + @Nullable + abstract String getLogRate(); + /** * The CPU entitlement */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java index dc41d84759..1fd34d2893 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java @@ -35,6 +35,14 @@ abstract class _StackEntity { @Nullable abstract String getDescription(); + @JsonProperty("build_rootfs_image") + @Nullable + abstract String getDescriptioan(); + + @JsonProperty("run_rootfs_image") + @Nullable + abstract String getDescriptioana(); + /** * The name */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java index 7d0e8387c0..74ea21efb8 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java @@ -100,4 +100,8 @@ public abstract class Build extends Resource { @JsonProperty("staging_log_rate_limit_bytes_per_second") @Nullable public abstract Integer getStagingLogRateLimitBytesPerSecond(); + + @JsonProperty("staging_log_rate_limit_bytes_per_second") + @Nullable + public abstract Integer staging_log_rate_limit_bytes_per_second(); } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java index 5500d8339b..a8de50b637 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java @@ -44,6 +44,12 @@ public abstract class Process extends Resource { @JsonProperty("health_check") public abstract HealthCheck getHealthCheck(); + /** + * The readiness health check + */ + @JsonProperty("readiness_health_check") + public abstract ReadinessHealthCheck getReadinessHealthCheck(); + /** * The instances */ @@ -56,12 +62,19 @@ public abstract class Process extends Resource { @JsonProperty("memory_in_mb") public abstract Integer getMemoryInMb(); + @JsonProperty("version") + @Nullable + public abstract String getMemoryInMbs(); + /** * The metadata */ @JsonProperty("metadata") public abstract Metadata getMetadata(); + @JsonProperty("log_rate_limit_in_bytes_per_second") + public abstract Integer getMetadataa(); + /** * The relationships */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java index 29758cba1b..c4a69d0dc3 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java @@ -39,6 +39,9 @@ public abstract class ProcessStatistics { @Nullable public abstract Long getDiskQuota(); + @JsonProperty("instance_internal_ip") + @Nullable + public abstract String instance_internal_ip(); /** * The file descriptor quota */ @@ -57,8 +60,17 @@ public abstract class ProcessStatistics { * The index */ @JsonProperty("index") + @Nullable public abstract Integer getIndex(); + @JsonProperty("routable") + @Nullable + public abstract Boolean routable(); + + @JsonProperty("log_rate_limit") + @Nullable + public abstract Integer log_rate_limit(); + /** * The instance port mappings */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ReadinessHealthCheckType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ReadinessHealthCheckType.java new file mode 100644 index 0000000000..2d0a761fbc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ReadinessHealthCheckType.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum ReadinessHealthCheckType { + + /** + * An http health check + */ + HTTP("http"), + + /** + * A port health check + */ + PORT("port"), + + /** + * A process health check + */ + PROCESS("process"); + + private final String value; + + ReadinessHealthCheckType(String value) { + this.value = value; + } + + @JsonCreator + public static ReadinessHealthCheckType from(String s) { + switch (s.toLowerCase()) { + case "http": + return HTTP; + case "port": + return PORT; + case "process": + return PROCESS; + default: + throw new IllegalArgumentException( + String.format("Unknown health check type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java index 2f1340f35f..a6036a137f 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java @@ -16,7 +16,9 @@ package org.cloudfoundry.client.v3.processes; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; import org.immutables.value.Value; import java.util.ArrayList; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java index 5a6398f668..4bf70710c4 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java @@ -56,6 +56,10 @@ abstract class _ProcessUsage { @Nullable abstract String getTime(); + @JsonProperty("log_rate") + @Nullable + abstract Integer log_rate(); + /** * The CPU entitlement */ @@ -63,7 +67,7 @@ abstract class _ProcessUsage { @Nullable abstract Double getCpuEntitlement(); - /** + /** * The current logging usage of the instance */ @JsonProperty("log_rate") diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ReadinessHealthCheck.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ReadinessHealthCheck.java new file mode 100644 index 0000000000..25ae6e009f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ReadinessHealthCheck.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The health check + */ +@JsonDeserialize +@Value.Immutable +abstract class _ReadinessHealthCheck { + + /** + * The data + */ + @JsonProperty("data") + @Nullable + abstract Data getData(); + + /** + * The type + */ + @JsonProperty("type") + abstract ReadinessHealthCheckType getType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessRequest.java index 4fe26b3665..d00f2a2177 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessRequest.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessRequest.java @@ -43,6 +43,13 @@ abstract class _UpdateProcessRequest { @Nullable abstract HealthCheck getHealthCheck(); + /** + * The readiness health check + */ + @JsonProperty("readiness_health_check") + @Nullable + abstract ReadinessHealthCheck getReadinessHealthCheck(); + /** * The process id */ diff --git a/cloudfoundry-java-client.iml b/cloudfoundry-java-client.iml new file mode 100644 index 0000000000..b0376c82a9 --- /dev/null +++ b/cloudfoundry-java-client.iml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/cloudfoundry-operations/cloudfoundry-operations.iml b/cloudfoundry-operations/cloudfoundry-operations.iml new file mode 100644 index 0000000000..529270e66e --- /dev/null +++ b/cloudfoundry-operations/cloudfoundry-operations.iml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java index 8f2f4bcadd..9c336b11e7 100644 --- a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java @@ -33,6 +33,7 @@ import java.util.regex.Pattern; import java.util.stream.Stream; import org.cloudfoundry.client.v3.processes.HealthCheckType; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.Yaml; import reactor.core.Exceptions; @@ -209,6 +210,27 @@ private static ManifestV3Process getProcess( variables, s -> HealthCheckType.from((String) s), builder::healthCheckType); + asString( + raw, + "readiness-health-check-http-endpoint", + variables, + builder::readinessHealthCheckHttpEndpoint); + asInteger( + raw, + "readiness-health-check-invocation-timeout", + variables, + builder::readinessHealthCheckInvocationTimeout); + asInteger( + raw, + "readiness-health-check-interval", + variables, + builder::readinessHealthCheckInterval); + as( + raw, + "readiness-health-check-type", + variables, + s -> ReadinessHealthCheckType.from((String) s), + builder::readinessHealthCheckType); asInteger(raw, "instances", variables, builder::instances); asString(raw, "memory", variables, builder::memory); asInteger(raw, "timeout", variables, builder::timeout); @@ -293,6 +315,18 @@ private static Map toProcessYaml(ManifestV3Process process) { putIfPresent(yaml, "health-check-http-endpoint", process.getHealthCheckHttpEndpoint()); putIfPresent( yaml, "health-check-invocation-timeout", process.getHealthCheckInvocationTimeout()); + putIfPresent(yaml, "health-check-type", process.getHealthCheckType()); + putIfPresent(yaml, "readiness-health-check-type", process.getReadinessHealthCheckType()); + putIfPresent( + yaml, + "readiness-health-check-http-endpoint", + process.getReadinessHealthCheckHttpEndpoint()); + putIfPresent( + yaml, + "readiness-health-check-invocation-timeout", + process.getReadinessHealthCheckInvocationTimeout()); + putIfPresent( + yaml, "readiness-health-check-interval", process.getReadinessHealthCheckInterval()); putIfPresent(yaml, "health-check-type", process.getHealthCheckType().getValue()); putIfPresent(yaml, "instances", process.getInstances()); putIfPresent(yaml, "memory", process.getMemory()); diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Process.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Process.java index a39e55c66c..0504676d8b 100644 --- a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Process.java +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Process.java @@ -19,6 +19,7 @@ import org.cloudfoundry.Nullable; import org.cloudfoundry.client.v3.processes.HealthCheckType; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; import org.immutables.value.Value; @Value.Immutable @@ -54,6 +55,30 @@ abstract class _ManifestV3Process { @Nullable abstract HealthCheckType getHealthCheckType(); + /** + * Type of rediness health check to perform + */ + @Nullable + abstract ReadinessHealthCheckType getReadinessHealthCheckType(); + + /** + * The HTTP rediness health check endpoint + */ + @Nullable + abstract String getReadinessHealthCheckHttpEndpoint(); + + /** + * The timeout in seconds for individual rediness health check requests for http and port health checks + */ + @Nullable + abstract Integer getReadinessHealthCheckInvocationTimeout(); + + /** + * The timeout in seconds for individual rediness health check requests for http and port health checks + */ + @Nullable + abstract Integer getReadinessHealthCheckInterval(); + /** * The number of instances of this process */ diff --git a/cloudfoundry-util/cloudfoundry-util.iml b/cloudfoundry-util/cloudfoundry-util.iml new file mode 100644 index 0000000000..1e52896cdc --- /dev/null +++ b/cloudfoundry-util/cloudfoundry-util.iml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/integration-test/.DS_Store b/integration-test/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9a874b5768f336915163bb88cd434575b859f936 GIT binary patch literal 6148 zcmeH~Jr2S!425ml0g0s}V-^m;4I%_5-~tF3k&vj^b9A16778<}(6eNJu~Vz<8=6`~ zboab&MFtUB!i}=AFfm2m$tVxGT*u4pe81nUlA49C} z?O@64YO)2RT{MRe%{!}2F))pG(Sih~)xkgosK7*lF7m<7{{#Hn{6A@7N(HFEpDCdI z{ + + + + \ No newline at end of file diff --git a/integration-test/src/.DS_Store b/integration-test/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ca5d0e6e71945129431efcf086d0e96e397046d8 GIT binary patch literal 6148 zcmeH~F^f4mh3n7#7gpu zObo#Gk7);t0M>LTwjO3?%m>_Y#trxB_H+5ZUN2sxtvcW-eZ*`(w*@I61*Cu!kOER* zK?>wCzTPb8ne-@9Kng5F0slS}y0a!*XM8#sVgw)umczJ?S%NHHAZxO9vO=?*9xPie z#t^SZJ6ZC&nrxlD9hSp~<(h|QedXQN6$w;|Bv*)=KooXQYjz> z{+R+c98QNlUn+L=`lb|P3!`lj=0l-{1Gr+XjI@G3S0p#RUAJ6 literal 0 HcmV?d00001 diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java index 2a87f6c588..87b4541e48 100644 --- a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java @@ -1526,6 +1526,23 @@ public void setHealthCheck() throws IOException { .verify(Duration.ofMinutes(5)); } + @Test + public void setReadinessHealthCheck() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, false) + .then(this.cloudFoundryOperations.applications() + .setHealthCheck(SetApplicationHealthCheckRequest.builder() + .name(applicationName) + .type(ApplicationHealthCheck.PROCESS) + .build())) + .then(requestGetHealthCheck(this.cloudFoundryOperations, applicationName)) + .as(StepVerifier::create) + .expectNext(ApplicationHealthCheck.PROCESS) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + @Test public void sshEnabled() throws IOException { String applicationName = this.nameFactory.getApplicationName(); diff --git a/integration-test/src/test/resources/.DS_Store b/integration-test/src/test/resources/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7cad7ba35a9266c491276038e7c971246fadef14 GIT binary patch literal 6148 zcmeHKO>Yx15FMw1Zd6sQP?37H#5IT{5-1XvRVW9pENTyc(%o!SRxIl%yCH`t(w@s7 z;+ODu+BddSwF;yx+5>WtUY;{olLU^2YOIp6C4ODiH zXOz$kpMvr&Yw7qG8Q`-EsirAaD6gO21ZP>}91WG}vYMrZNn!gVofUai_j*57Yp4C- z;cl=S>;<3V&t@6dNxi5>$@~Mi-WyY-n|hKS=hNjlJa}!&I?2oF+&bjh6eb@}@-j2a zky(^kWqo5e5OjjhI6PdfUi5}t-5;*Idet8cdR;wy*xvB zJG8RzaRc8`xpkl4;(1w^@(i{-&*R&8Ax(p~g_(G6_)qkR^}@@a&XHA + + + +Hello Web! + + +

Hello Web!

+ + diff --git a/test-log-cache/test-log-cache.iml b/test-log-cache/test-log-cache.iml new file mode 100644 index 0000000000..562531213c --- /dev/null +++ b/test-log-cache/test-log-cache.iml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-service-broker/test-service-broker.iml b/test-service-broker/test-service-broker.iml new file mode 100644 index 0000000000..c3108cd812 --- /dev/null +++ b/test-service-broker/test-service-broker.iml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file From b7db6c2eba353c295683333da578e34def669fc6 Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Thu, 14 Nov 2024 12:06:53 +0000 Subject: [PATCH 3/6] healthcheck polishing --- .../_ApplicationRelationships.java | 4 +- .../client/v3/deployments/Deployment.java | 7 ++++ .../client/v3/deployments/_Options.java | 33 +++++++++++++++ .../client/v3/processes/Process.java | 1 + .../CreateApplicationRequestTest.java | 4 ++ .../v3/applications/RelationshipsTest.java | 2 + .../org/cloudfoundry/CloudFoundryVersion.java | 4 +- .../cloudfoundry/client/v3/ProcessesTest.java | 41 +++++++++++++++++++ .../routing/v1/TcpRoutesTest.java | 18 ++++++-- 9 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Options.java diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java index 760e5ee22a..5fbc363e64 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java @@ -18,6 +18,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import org.cloudfoundry.Nullable; import org.cloudfoundry.client.v3.ToOneRelationship; import org.immutables.value.Value; @@ -38,6 +40,6 @@ abstract class _ApplicationRelationships { * The current droplet relationship */ @JsonProperty("current_droplet") + @Nullable abstract ToOneRelationship getCurrentDroplet(); - } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java index 5332f4d762..3fa990a335 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java @@ -99,4 +99,11 @@ public abstract class Deployment extends Resource { @JsonProperty("strategy") @Nullable public abstract DeploymentStrategy getStrategy(); + + /** + * The options for the deployment + */ + @JsonProperty("options") + @Nullable + public abstract Options getOptions(); } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Options.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Options.java new file mode 100644 index 0000000000..ef6e199d65 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Options.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Options { + + /** + * The The maximum number of new instances to deploy simultaneously + */ + @JsonProperty("max_in_flight") + abstract Integer getMaxInFlight(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java index a8de50b637..2d26619569 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java @@ -48,6 +48,7 @@ public abstract class Process extends Resource { * The readiness health check */ @JsonProperty("readiness_health_check") + @Nullable public abstract ReadinessHealthCheck getReadinessHealthCheck(); /** diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java index 0dc40da21f..45070789c6 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java @@ -39,6 +39,8 @@ void noName() { .id("test-id") .build()) .build()) + .currentDroplet(ToOneRelationship.builder() + .data(Relationship.builder().build()).build()) .build()) .build(); }); @@ -63,6 +65,8 @@ void valid() { ToOneRelationship.builder() .data(Relationship.builder().id("test-id").build()) .build()) + .currentDroplet(ToOneRelationship.builder() + .data(Relationship.builder().build()).build()) .build()) .build(); } diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java index c875469dd1..87305633ed 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java @@ -40,6 +40,8 @@ void valid() { ToOneRelationship.builder() .data(Relationship.builder().id("test-id").build()) .build()) + .currentDroplet(ToOneRelationship.builder() + .data(Relationship.builder().build()).build()) .build(); } } diff --git a/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java index 5be7b4fe0e..65d7a8e38c 100644 --- a/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java +++ b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java @@ -55,7 +55,9 @@ public enum CloudFoundryVersion { PCF_2_13(Version.forIntegers(2, 186, 0)), - PCF_3_0(Version.forIntegers(3, 0, 0)), + PCF_4_v2(Version.forIntegers(2, 209, 0)), + + PCF_4_v3(Version.forIntegers(3, 138, 0)), UNSPECIFIED(Version.forIntegers(0)); diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java index 5b2f10bfb0..1c53b4e537 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java @@ -237,6 +237,47 @@ private static Mono createApplication( .build()); } + @Test + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_4_v2) + public void updateReadinessHealthCheckType() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplication(this.cloudFoundryOperations, applicationName, path) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId)) + .flatMap( + processId -> + this.cloudFoundryClient + .processes() + .update( + UpdateProcessRequest.builder() + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .data( + Data.builder() + .endpoint( + "/test_endpoint") + .invocationTimeout( + 1) + .interval(2) + .build()) + .type( + ReadinessHealthCheckType + .PORT) + .build()) + .processId(processId) + .build()) + .then(Mono.just(processId))) + .flatMap(processId -> requestGetProcess(this.cloudFoundryClient, processId)) + .map(GetProcessResponse::getReadinessHealthCheck) + .map(ReadinessHealthCheck::getType) + .as(StepVerifier::create) + .expectNext(ReadinessHealthCheckType.PORT) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + private static Mono getApplicationId( CloudFoundryOperations cloudFoundryOperations, String applicationName) { return requestGetApplication(cloudFoundryOperations, applicationName) diff --git a/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java index 27852f13fc..17419490a0 100644 --- a/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java @@ -16,7 +16,11 @@ package org.cloudfoundry.routing.v1; + +import static org.cloudfoundry.util.DelayUtils.exponentialBackOff; import java.time.Duration; +import java.util.List; + import org.cloudfoundry.AbstractIntegrationTest; import org.cloudfoundry.NameFactory; import org.cloudfoundry.routing.RoutingClient; @@ -32,11 +36,14 @@ import org.cloudfoundry.routing.v1.tcproutes.TcpRoute; import org.cloudfoundry.routing.v1.tcproutes.TcpRouteConfiguration; import org.cloudfoundry.routing.v1.tcproutes.TcpRouteDeletion; +import org.cloudfoundry.routing.v1.tcproutes.TcpRoutes; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; + import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; +import reactor.util.retry.Retry; public final class TcpRoutesTest extends AbstractIntegrationTest { @@ -96,7 +103,7 @@ public void delete() { port, routerGroupId)) .flatMap( - routerGroupId -> + routerGroupId -> this.routingClient .tcpRoutes() .delete( @@ -109,12 +116,17 @@ public void delete() { .routerGroupId( routerGroupId) .build()) - .build())) - .then(requestListTcpRoutes(this.routingClient)) + .build()) + ) + .thenMany(requestListTcpRoutes(this.routingClient) .flatMapIterable(ListTcpRoutesResponse::getTcpRoutes) .filter(route -> backendIp.equals(route.getBackendIp())) .filter(route -> backendPort.equals(route.getBackendPort())) .filter(route -> port.equals(route.getPort())) + .flatMap(e -> !"".equals(e.getBackendIp()) ? Flux.error(new RuntimeException("route still found")) : Flux.just(e) + ) + .retryWhen(Retry.indefinitely().filter(e -> "route still found".equals(e.getMessage()))) + ) .as(StepVerifier::create) .expectComplete() .verify(Duration.ofMinutes(5)); From 4dc532f52240370fc0d6487ccd99a2b9d4bafb4e Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Tue, 2 Apr 2024 15:38:59 +0100 Subject: [PATCH 4/6] bump supported API --- .../main/java/org/cloudfoundry/client/CloudFoundryClient.java | 2 +- .../test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java index 2182f77b94..658589e3a8 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java @@ -81,7 +81,7 @@ public interface CloudFoundryClient { /** * The currently supported Cloud Controller API version */ - String SUPPORTED_API_VERSION = "2.243.0"; + String SUPPORTED_API_VERSION = "2.245.0"; /** * Main entry point to the Cloud Foundry Application Usage Events Client API diff --git a/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java index 17419490a0..848d3d8644 100644 --- a/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java @@ -123,7 +123,9 @@ public void delete() { .filter(route -> backendIp.equals(route.getBackendIp())) .filter(route -> backendPort.equals(route.getBackendPort())) .filter(route -> port.equals(route.getPort())) - .flatMap(e -> !"".equals(e.getBackendIp()) ? Flux.error(new RuntimeException("route still found")) : Flux.just(e) + .flatMap(e -> !"".equals(e.getBackendIp()) ? + Flux.error(new RuntimeException("route still found")) : + Flux.just(e) ) .retryWhen(Retry.indefinitely().filter(e -> "route still found".equals(e.getMessage()))) ) From af92cf8ea24af75079c341dbaf1038e53eb0f33b Mon Sep 17 00:00:00 2001 From: David O'Sullivan Date: Tue, 3 Dec 2024 15:39:05 +0000 Subject: [PATCH 5/6] spotless plugin changes --- .../client/v3/deployments/Deployment.java | 2 +- .../v3/processes/ProcessStatistics.java | 1 + .../CreateApplicationRequestTest.java | 12 ++++-- .../v3/applications/RelationshipsTest.java | 4 +- .../operations/ApplicationsTest.java | 29 ++++++++----- .../routing/v1/TcpRoutesTest.java | 41 ++++++++++--------- 6 files changed, 51 insertions(+), 38 deletions(-) diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java index 3fa990a335..6829057fee 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java @@ -100,7 +100,7 @@ public abstract class Deployment extends Resource { @Nullable public abstract DeploymentStrategy getStrategy(); - /** + /** * The options for the deployment */ @JsonProperty("options") diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java index c4a69d0dc3..201e775531 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java @@ -42,6 +42,7 @@ public abstract class ProcessStatistics { @JsonProperty("instance_internal_ip") @Nullable public abstract String instance_internal_ip(); + /** * The file descriptor quota */ diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java index 45070789c6..757e54bada 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java @@ -39,8 +39,10 @@ void noName() { .id("test-id") .build()) .build()) - .currentDroplet(ToOneRelationship.builder() - .data(Relationship.builder().build()).build()) + .currentDroplet( + ToOneRelationship.builder() + .data(Relationship.builder().build()) + .build()) .build()) .build(); }); @@ -65,8 +67,10 @@ void valid() { ToOneRelationship.builder() .data(Relationship.builder().id("test-id").build()) .build()) - .currentDroplet(ToOneRelationship.builder() - .data(Relationship.builder().build()).build()) + .currentDroplet( + ToOneRelationship.builder() + .data(Relationship.builder().build()) + .build()) .build()) .build(); } diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java index 87305633ed..4515b31fdc 100644 --- a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java @@ -40,8 +40,8 @@ void valid() { ToOneRelationship.builder() .data(Relationship.builder().id("test-id").build()) .build()) - .currentDroplet(ToOneRelationship.builder() - .data(Relationship.builder().build()).build()) + .currentDroplet( + ToOneRelationship.builder().data(Relationship.builder().build()).build()) .build(); } } diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java index 87b4541e48..e04c488b0c 100644 --- a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java @@ -1530,17 +1530,24 @@ public void setHealthCheck() throws IOException { public void setReadinessHealthCheck() throws IOException { String applicationName = this.nameFactory.getApplicationName(); - createApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, false) - .then(this.cloudFoundryOperations.applications() - .setHealthCheck(SetApplicationHealthCheckRequest.builder() - .name(applicationName) - .type(ApplicationHealthCheck.PROCESS) - .build())) - .then(requestGetHealthCheck(this.cloudFoundryOperations, applicationName)) - .as(StepVerifier::create) - .expectNext(ApplicationHealthCheck.PROCESS) - .expectComplete() - .verify(Duration.ofMinutes(5)); + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .setHealthCheck( + SetApplicationHealthCheckRequest.builder() + .name(applicationName) + .type(ApplicationHealthCheck.PROCESS) + .build())) + .then(requestGetHealthCheck(this.cloudFoundryOperations, applicationName)) + .as(StepVerifier::create) + .expectNext(ApplicationHealthCheck.PROCESS) + .expectComplete() + .verify(Duration.ofMinutes(5)); } @Test diff --git a/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java index 848d3d8644..a562fa4223 100644 --- a/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java @@ -16,11 +16,7 @@ package org.cloudfoundry.routing.v1; - -import static org.cloudfoundry.util.DelayUtils.exponentialBackOff; import java.time.Duration; -import java.util.List; - import org.cloudfoundry.AbstractIntegrationTest; import org.cloudfoundry.NameFactory; import org.cloudfoundry.routing.RoutingClient; @@ -36,10 +32,8 @@ import org.cloudfoundry.routing.v1.tcproutes.TcpRoute; import org.cloudfoundry.routing.v1.tcproutes.TcpRouteConfiguration; import org.cloudfoundry.routing.v1.tcproutes.TcpRouteDeletion; -import org.cloudfoundry.routing.v1.tcproutes.TcpRoutes; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; - import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -103,7 +97,7 @@ public void delete() { port, routerGroupId)) .flatMap( - routerGroupId -> + routerGroupId -> this.routingClient .tcpRoutes() .delete( @@ -116,19 +110,26 @@ public void delete() { .routerGroupId( routerGroupId) .build()) - .build()) - ) - .thenMany(requestListTcpRoutes(this.routingClient) - .flatMapIterable(ListTcpRoutesResponse::getTcpRoutes) - .filter(route -> backendIp.equals(route.getBackendIp())) - .filter(route -> backendPort.equals(route.getBackendPort())) - .filter(route -> port.equals(route.getPort())) - .flatMap(e -> !"".equals(e.getBackendIp()) ? - Flux.error(new RuntimeException("route still found")) : - Flux.just(e) - ) - .retryWhen(Retry.indefinitely().filter(e -> "route still found".equals(e.getMessage()))) - ) + .build())) + .thenMany( + requestListTcpRoutes(this.routingClient) + .flatMapIterable(ListTcpRoutesResponse::getTcpRoutes) + .filter(route -> backendIp.equals(route.getBackendIp())) + .filter(route -> backendPort.equals(route.getBackendPort())) + .filter(route -> port.equals(route.getPort())) + .flatMap( + e -> + !"".equals(e.getBackendIp()) + ? Flux.error( + new RuntimeException( + "route still found")) + : Flux.just(e)) + .retryWhen( + Retry.indefinitely() + .filter( + e -> + "route still found" + .equals(e.getMessage())))) .as(StepVerifier::create) .expectComplete() .verify(Duration.ofMinutes(5)); From 7bb05347e8ba6a491d4c4fa2796d7feb9466e165 Mon Sep 17 00:00:00 2001 From: Anthony Dahanne Date: Fri, 6 Dec 2024 11:48:26 -0500 Subject: [PATCH 6/6] compiles fine --- .DS_Store | Bin 8196 -> 0 bytes .gitignore | 3 +- ci/tcp-routes.yml | 6 - .../cloudfoundry-client-reactor.iml | 121 ------------------ cloudfoundry-client/cloudfoundry-client.iml | 6 - .../v2/applications/_ApplicationEntity.java | 4 - .../_ApplicationInstanceInfo.java | 4 - .../v2/applications/_InstanceStatistics.java | 3 - .../client/v2/applications/_Statistics.java | 4 - .../_SummaryApplicationResponse.java | 3 - .../client/v2/applications/_Usage.java | 4 - .../client/v2/stacks/_StackEntity.java | 8 -- .../cloudfoundry/client/v3/builds/Build.java | 4 - .../client/v3/processes/Process.java | 7 - .../v3/processes/ProcessStatistics.java | 12 -- .../processes/_ProcessStatisticsResource.java | 2 - .../client/v3/processes/_ProcessUsage.java | 4 - cloudfoundry-java-client.iml | 11 -- .../cloudfoundry-operations.iml | 6 - .../ApplicationManifestUtilsV3.java | 3 +- cloudfoundry-util/cloudfoundry-util.iml | 87 ------------- integration-test/.DS_Store | Bin 6148 -> 0 bytes integration-test/integration-test.iml | 6 - integration-test/src/.DS_Store | Bin 6148 -> 0 bytes integration-test/src/test/.DS_Store | Bin 6148 -> 0 bytes .../cloudfoundry/client/v3/ProcessesTest.java | 13 +- integration-test/src/test/resources/.DS_Store | Bin 6148 -> 0 bytes test-log-cache/test-log-cache.iml | 54 -------- test-service-broker/test-service-broker.iml | 6 - 29 files changed, 4 insertions(+), 377 deletions(-) delete mode 100644 .DS_Store delete mode 100644 cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml delete mode 100644 cloudfoundry-client/cloudfoundry-client.iml delete mode 100644 cloudfoundry-java-client.iml delete mode 100644 cloudfoundry-operations/cloudfoundry-operations.iml delete mode 100644 cloudfoundry-util/cloudfoundry-util.iml delete mode 100644 integration-test/.DS_Store delete mode 100644 integration-test/integration-test.iml delete mode 100644 integration-test/src/.DS_Store delete mode 100644 integration-test/src/test/.DS_Store delete mode 100644 integration-test/src/test/resources/.DS_Store delete mode 100644 test-log-cache/test-log-cache.iml delete mode 100644 test-service-broker/test-service-broker.iml diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index f72a5c1a85758c5ae52105d8be007245dc8a13e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHM-EPw`6h7|CnrZ?S4cH`v6p7odY(pRrH(j?~OyWmcC%6DKnx<^g(zr^}7Bo%j zE$|M!0^*7%fp_5wKL2z|TsF2{Ak^8C{Wu)`rONaXgDG{iyIQWMai~zK z6Vrzerti%335ChK!@euUiPaR^(lTHf7-vA7-3!#BU^C<`dK+Sv~~5&xi=WI7trWp#a2enjn* zl=T~N6!K^n8p7Jm(-95YV^H3NbP9LGdE(hESjrNAPOFpQh;vTfaLn8Zj^WgWGh(Zq8YYvMn*gS3#`F z>?-=JzMr&04}nN5SFt=4&rzgPb_*i5R%4%F0 z(Tw0F_L5z>cZd+SNA3LBm{>1a-Pw$8BG+0U&TOH!NFJQYXT94wK5Hk#XjXj z-jJ2f&dNe{!qb$R-@G{gZyf*qf5KU?)3Xd*YzA0yy|G>g2cx%HlMZp#c9Gv8izMWR y3Z)8)+=l>MAN?>y-G!*osc9T4L<`ct{}5pJf6zYqN1NU8?Ear+Lq468Tl@xztZS(N diff --git a/.gitignore b/.gitignore index 0bdee5d5c8..93988501f5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ bin/ .settings/ .factorypath .gradle -.history/ \ No newline at end of file +.history/ +*.iml \ No newline at end of file diff --git a/ci/tcp-routes.yml b/ci/tcp-routes.yml index c0fab20e86..306d30ce69 100644 --- a/ci/tcp-routes.yml +++ b/ci/tcp-routes.yml @@ -25,9 +25,3 @@ path: /product-properties/.cloud_controller.default_quota_memory_limit_mb value: value: ((DEFAULT_QUOTA_MEM_MB)) -- type: replace - path: /resource-config/compute/instances - value: 4 -- type: replace - path: /resource-config/compute/instance_type/id - value: "2xlarge.mem" diff --git a/cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml b/cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml deleted file mode 100644 index 474eb735cf..0000000000 --- a/cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cloudfoundry-client/cloudfoundry-client.iml b/cloudfoundry-client/cloudfoundry-client.iml deleted file mode 100644 index 3edaa8488f..0000000000 --- a/cloudfoundry-client/cloudfoundry-client.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java index f26b73d08d..31dec6ef77 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java @@ -58,10 +58,6 @@ abstract class _ApplicationEntity extends AbstractApplicationEntity { @Nullable abstract String getEventsUrl(); - @JsonProperty("log_rate_limit") - @Nullable - abstract String getLogRateLimit(); - /** * The package state */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java index 0e1b7254db..4e6ff0e812 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java @@ -56,10 +56,6 @@ abstract class _ApplicationInstanceInfo { @Nullable abstract Integer getDebugPort(); - @JsonProperty("routable") - @Nullable - abstract Boolean getRoutable(); - /** * The details */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java index 784c805c52..e2cfae9cd2 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java @@ -46,9 +46,6 @@ abstract class _InstanceStatistics { @Nullable abstract Statistics getStatistics(); - @JsonProperty("routable") - @Nullable - abstract Boolean getLogRate(); /** * Routable */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java index c7d26c1843..1135d51dc6 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java @@ -34,10 +34,6 @@ abstract class _Statistics { @Nullable abstract Long getDiskQuota(); - @JsonProperty("log_rate_limit") - @Nullable - abstract String getLogRateLimit(); - /** * The application file descriptor quota */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java index 51d0fcf812..5ad85ae19b 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java @@ -40,9 +40,6 @@ abstract class _SummaryApplicationResponse extends AbstractApplicationEntity { @Nullable abstract List getAvailableDomains(); - @JsonProperty("log_rate_limit") - @Nullable - abstract String getLogRate(); /** * The detected buildpack */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java index 8f83dab7d7..564ab275f9 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java @@ -35,10 +35,6 @@ abstract class _Usage { @Nullable abstract Double getCpu(); - @JsonProperty("log_rate") - @Nullable - abstract String getLogRate(); - /** * The CPU entitlement */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java index 1fd34d2893..dc41d84759 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java @@ -35,14 +35,6 @@ abstract class _StackEntity { @Nullable abstract String getDescription(); - @JsonProperty("build_rootfs_image") - @Nullable - abstract String getDescriptioan(); - - @JsonProperty("run_rootfs_image") - @Nullable - abstract String getDescriptioana(); - /** * The name */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java index 74ea21efb8..7d0e8387c0 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java @@ -100,8 +100,4 @@ public abstract class Build extends Resource { @JsonProperty("staging_log_rate_limit_bytes_per_second") @Nullable public abstract Integer getStagingLogRateLimitBytesPerSecond(); - - @JsonProperty("staging_log_rate_limit_bytes_per_second") - @Nullable - public abstract Integer staging_log_rate_limit_bytes_per_second(); } diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java index 2d26619569..9cad9ca22b 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java @@ -63,19 +63,12 @@ public abstract class Process extends Resource { @JsonProperty("memory_in_mb") public abstract Integer getMemoryInMb(); - @JsonProperty("version") - @Nullable - public abstract String getMemoryInMbs(); - /** * The metadata */ @JsonProperty("metadata") public abstract Metadata getMetadata(); - @JsonProperty("log_rate_limit_in_bytes_per_second") - public abstract Integer getMetadataa(); - /** * The relationships */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java index 201e775531..4b5cd36fc5 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java @@ -39,10 +39,6 @@ public abstract class ProcessStatistics { @Nullable public abstract Long getDiskQuota(); - @JsonProperty("instance_internal_ip") - @Nullable - public abstract String instance_internal_ip(); - /** * The file descriptor quota */ @@ -64,14 +60,6 @@ public abstract class ProcessStatistics { @Nullable public abstract Integer getIndex(); - @JsonProperty("routable") - @Nullable - public abstract Boolean routable(); - - @JsonProperty("log_rate_limit") - @Nullable - public abstract Integer log_rate_limit(); - /** * The instance port mappings */ diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java index a6036a137f..2f1340f35f 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java @@ -16,9 +16,7 @@ package org.cloudfoundry.client.v3.processes; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import org.cloudfoundry.Nullable; import org.immutables.value.Value; import java.util.ArrayList; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java index 4bf70710c4..ab0a13340c 100644 --- a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java @@ -56,10 +56,6 @@ abstract class _ProcessUsage { @Nullable abstract String getTime(); - @JsonProperty("log_rate") - @Nullable - abstract Integer log_rate(); - /** * The CPU entitlement */ diff --git a/cloudfoundry-java-client.iml b/cloudfoundry-java-client.iml deleted file mode 100644 index b0376c82a9..0000000000 --- a/cloudfoundry-java-client.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/cloudfoundry-operations/cloudfoundry-operations.iml b/cloudfoundry-operations/cloudfoundry-operations.iml deleted file mode 100644 index 529270e66e..0000000000 --- a/cloudfoundry-operations/cloudfoundry-operations.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java index 9c336b11e7..fb7dc2e1bf 100644 --- a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java @@ -315,7 +315,7 @@ private static Map toProcessYaml(ManifestV3Process process) { putIfPresent(yaml, "health-check-http-endpoint", process.getHealthCheckHttpEndpoint()); putIfPresent( yaml, "health-check-invocation-timeout", process.getHealthCheckInvocationTimeout()); - putIfPresent(yaml, "health-check-type", process.getHealthCheckType()); + putIfPresent(yaml, "health-check-type", process.getHealthCheckType().getValue()); putIfPresent(yaml, "readiness-health-check-type", process.getReadinessHealthCheckType()); putIfPresent( yaml, @@ -327,7 +327,6 @@ private static Map toProcessYaml(ManifestV3Process process) { process.getReadinessHealthCheckInvocationTimeout()); putIfPresent( yaml, "readiness-health-check-interval", process.getReadinessHealthCheckInterval()); - putIfPresent(yaml, "health-check-type", process.getHealthCheckType().getValue()); putIfPresent(yaml, "instances", process.getInstances()); putIfPresent(yaml, "memory", process.getMemory()); putIfPresent(yaml, "timeout", process.getTimeout()); diff --git a/cloudfoundry-util/cloudfoundry-util.iml b/cloudfoundry-util/cloudfoundry-util.iml deleted file mode 100644 index 1e52896cdc..0000000000 --- a/cloudfoundry-util/cloudfoundry-util.iml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/integration-test/.DS_Store b/integration-test/.DS_Store deleted file mode 100644 index 9a874b5768f336915163bb88cd434575b859f936..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425ml0g0s}V-^m;4I%_5-~tF3k&vj^b9A16778<}(6eNJu~Vz<8=6`~ zboab&MFtUB!i}=AFfm2m$tVxGT*u4pe81nUlA49C} z?O@64YO)2RT{MRe%{!}2F))pG(Sih~)xkgosK7*lF7m<7{{#Hn{6A@7N(HFEpDCdI z{ - - - - \ No newline at end of file diff --git a/integration-test/src/.DS_Store b/integration-test/src/.DS_Store deleted file mode 100644 index ca5d0e6e71945129431efcf086d0e96e397046d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~F^f4mh3n7#7gpu zObo#Gk7);t0M>LTwjO3?%m>_Y#trxB_H+5ZUN2sxtvcW-eZ*`(w*@I61*Cu!kOER* zK?>wCzTPb8ne-@9Kng5F0slS}y0a!*XM8#sVgw)umczJ?S%NHHAZxO9vO=?*9xPie z#t^SZJ6ZC&nrxlD9hSp~<(h|QedXQN6$w;|Bv*)=KooXQYjz> z{+R+c98QNlUn+L=`lb|P3!`lj=0l-{1Gr+XjI@G3S0p#RUAJ6 diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java index 1c53b4e537..b509114793 100644 --- a/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java @@ -27,19 +27,8 @@ import org.cloudfoundry.client.CloudFoundryClient; import org.cloudfoundry.client.v3.applications.GetApplicationProcessRequest; import org.cloudfoundry.client.v3.applications.GetApplicationProcessResponse; -import org.cloudfoundry.client.v3.processes.GetProcessRequest; -import org.cloudfoundry.client.v3.processes.GetProcessResponse; -import org.cloudfoundry.client.v3.processes.GetProcessStatisticsRequest; -import org.cloudfoundry.client.v3.processes.GetProcessStatisticsResponse; -import org.cloudfoundry.client.v3.processes.HealthCheck; -import org.cloudfoundry.client.v3.processes.HealthCheckType; -import org.cloudfoundry.client.v3.processes.ListProcessesRequest; +import org.cloudfoundry.client.v3.processes.*; import org.cloudfoundry.client.v3.processes.Process; -import org.cloudfoundry.client.v3.processes.ProcessResource; -import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource; -import org.cloudfoundry.client.v3.processes.ScaleProcessRequest; -import org.cloudfoundry.client.v3.processes.TerminateProcessInstanceRequest; -import org.cloudfoundry.client.v3.processes.UpdateProcessRequest; import org.cloudfoundry.operations.CloudFoundryOperations; import org.cloudfoundry.operations.applications.ApplicationDetail; import org.cloudfoundry.operations.applications.ApplicationHealthCheck; diff --git a/integration-test/src/test/resources/.DS_Store b/integration-test/src/test/resources/.DS_Store deleted file mode 100644 index 7cad7ba35a9266c491276038e7c971246fadef14..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKO>Yx15FMw1Zd6sQP?37H#5IT{5-1XvRVW9pENTyc(%o!SRxIl%yCH`t(w@s7 z;+ODu+BddSwF;yx+5>WtUY;{olLU^2YOIp6C4ODiH zXOz$kpMvr&Yw7qG8Q`-EsirAaD6gO21ZP>}91WG}vYMrZNn!gVofUai_j*57Yp4C- z;cl=S>;<3V&t@6dNxi5>$@~Mi-WyY-n|hKS=hNjlJa}!&I?2oF+&bjh6eb@}@-j2a zky(^kWqo5e5OjjhI6PdfUi5}t-5;*Idet8cdR;wy*xvB zJG8RzaRc8`xpkl4;(1w^@(i{-&*R&8Ax(p~g_(G6_)qkR^}@@a&XHA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test-service-broker/test-service-broker.iml b/test-service-broker/test-service-broker.iml deleted file mode 100644 index c3108cd812..0000000000 --- a/test-service-broker/test-service-broker.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file