diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000000..f72a5c1a857 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index 7d7fa1209e5..0bdee5d5c85 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 306d30ce691..c0fab20e869 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 00000000000..e12e71d05a7 --- /dev/null +++ b/cloudfoundry-client-reactor/cloudfoundry-client-reactor.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + \ 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 4dc2ec79c0a..4e23eea93e4 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 8efd6f66b45..e53ab748098 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 aadb83f8aa2..bd791faf15c 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 a8023d1c74f..d367c69e917 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 a8023d1c74f..d367c69e917 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 645e8768d8d..0ee0d5c3071 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 a8023d1c74f..d367c69e917 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 ccbff60e4a8..f136f02b962 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 a8023d1c74f..d367c69e917 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 00000000000..3edaa8488fd --- /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/CloudFoundryClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java index 75186dbd8cd..658589e3a8c 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.245.0"; /** * Main entry point to the Cloud Foundry Application Usage Events Client API 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 31dec6ef777..f26b73d08d4 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 4e6ff0e812e..0e1b7254db9 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 e2cfae9cd23..784c805c520 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 1135d51dc6b..c7d26c18433 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 5ad85ae19b9..51d0fcf8127 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 564ab275f9c..8f83dab7d7a 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 dc41d847591..1fd34d2893c 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/applications/_ApplicationRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java index 42449efe6c3..5fbc363e645 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; @@ -34,4 +36,10 @@ abstract class _ApplicationRelationships { @JsonProperty("space") abstract ToOneRelationship getSpace(); + /** + * The current droplet relationship + */ + @JsonProperty("current_droplet") + @Nullable + abstract ToOneRelationship getCurrentDroplet(); } 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 7d0e8387c0b..74ea21efb8a 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/deployments/Deployment.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java index 5332f4d7628..6829057fee6 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 00000000000..ef6e199d650 --- /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 5500d8339bb..2d266195699 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,13 @@ public abstract class Process extends Resource { @JsonProperty("health_check") public abstract HealthCheck getHealthCheck(); + /** + * The readiness health check + */ + @JsonProperty("readiness_health_check") + @Nullable + public abstract ReadinessHealthCheck getReadinessHealthCheck(); + /** * The instances */ @@ -56,12 +63,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 29758cba1b5..201e775531d 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,10 @@ 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 +61,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 00000000000..2d0a761fbcc --- /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/_Data.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_Data.java index 81ab913dc1d..67af40ec2b6 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/client/v3/processes/_ProcessStatisticsResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java index 2f1340f35fc..a6036a137f3 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 5a6398f668d..4bf70710c48 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 00000000000..25ae6e009f1 --- /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 4fe26b3665e..d00f2a2177f 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-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java index bec318c83f2..e7b9eaefe4a 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(); + } 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 0dc40da21f5..757e54bada1 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,10 @@ void noName() { .id("test-id") .build()) .build()) + .currentDroplet( + ToOneRelationship.builder() + .data(Relationship.builder().build()) + .build()) .build()) .build(); }); @@ -63,6 +67,10 @@ 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 c875469dd1f..4515b31fdc1 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/cloudfoundry-java-client.iml b/cloudfoundry-java-client.iml new file mode 100644 index 00000000000..dc6027d09ac --- /dev/null +++ b/cloudfoundry-java-client.iml @@ -0,0 +1,6 @@ + + + + + \ 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 00000000000..529270e66ef --- /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 8f2f4bcadd0..9c336b11e75 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 a39e55c66c1..0504676d8b9 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 00000000000..c5b03d7853a --- /dev/null +++ b/cloudfoundry-util/cloudfoundry-util.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/integration-test/.DS_Store b/integration-test/.DS_Store new file mode 100644 index 00000000000..9a874b5768f Binary files /dev/null and b/integration-test/.DS_Store differ diff --git a/integration-test/integration-test.iml b/integration-test/integration-test.iml new file mode 100644 index 00000000000..b084bb5bdf0 --- /dev/null +++ b/integration-test/integration-test.iml @@ -0,0 +1,6 @@ + + + + + \ 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 00000000000..ca5d0e6e719 Binary files /dev/null and b/integration-test/src/.DS_Store differ diff --git a/integration-test/src/test/.DS_Store b/integration-test/src/test/.DS_Store new file mode 100644 index 00000000000..8f81db79178 Binary files /dev/null and b/integration-test/src/test/.DS_Store differ diff --git a/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java index 5be7b4fe0e3..65d7a8e38ce 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 5b2f10bfb07..1c53b4e5375 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/operations/ApplicationsTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java index 2a87f6c5880..e04c488b0ca 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,30 @@ 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/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java index 27852f13fcf..a562fa42232 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 @@ -37,6 +37,7 @@ 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 { @@ -110,11 +111,25 @@ public void delete() { routerGroupId) .build()) .build())) - .then(requestListTcpRoutes(this.routingClient)) - .flatMapIterable(ListTcpRoutesResponse::getTcpRoutes) - .filter(route -> backendIp.equals(route.getBackendIp())) - .filter(route -> backendPort.equals(route.getBackendPort())) - .filter(route -> port.equals(route.getPort())) + .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)); diff --git a/integration-test/src/test/resources/.DS_Store b/integration-test/src/test/resources/.DS_Store new file mode 100644 index 00000000000..7cad7ba35a9 Binary files /dev/null and b/integration-test/src/test/resources/.DS_Store differ diff --git a/integration-test/src/test/resources/test-application 2/Staticfile b/integration-test/src/test/resources/test-application 2/Staticfile new file mode 100644 index 00000000000..e69de29bb2d diff --git a/integration-test/src/test/resources/test-application 2/index.html b/integration-test/src/test/resources/test-application 2/index.html new file mode 100644 index 00000000000..27310af2b48 --- /dev/null +++ b/integration-test/src/test/resources/test-application 2/index.html @@ -0,0 +1,10 @@ + + + + +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 00000000000..562531213c5 --- /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 00000000000..c3108cd812f --- /dev/null +++ b/test-service-broker/test-service-broker.iml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file