This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new fec4fb053a05 CAMEL-22083: camel infra run names the connection details
as the Camel properties (#30849)
fec4fb053a05 is described below
commit fec4fb053a051e450744a874042931687e1be92b
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 26 10:27:21 2026 +0100
CAMEL-22083: camel infra run names the connection details as the Camel
properties (#30849)
camel infra run printed the Java methods of the test-infra service as
the JSON keys, so getPort was printed next to port. The keys are now
property names: a getter loses its get, a getter of a detail that the
service names as the Camel option too is left out, and so are the
deprecated methods.
ClickHouse, Neo4j, OpenSearch, Pinecone, Weaviate, OPA, OpenFGA and
Apicurio Registry get default methods named as the options of their
component (serverUrl, databaseUrl, hostAddresses, host, apiUrl,
registryUrl, ...), so camel cmd send --infra can use them.
* CAMEL-22083: Javadoc on the remaining option methods of the ClickHouse,
Neo4j and Weaviate infra services
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../ROOT/pages/camel-4x-upgrade-guide-4_24.adoc | 12 ++
.../ROOT/pages/camel-jbang-dev-services.adoc | 26 ++--
.../dsl/jbang/core/commands/infra/InfraRun.java | 82 ++++++++---
.../commands/action/CamelSendActionInfraTest.java | 50 +++++++
.../infra/InfraRunServicePropertiesTest.java | 155 +++++++++++++++++++++
.../services/ApicurioRegistryInfraService.java | 7 +
.../services/ClickHouseInfraService.java | 28 ++++
.../infra/neo4j/services/Neo4jInfraService.java | 21 +++
.../test/infra/opa/services/OpaInfraService.java | 7 +
.../openfga/services/OpenFgaInfraService.java | 7 +
.../services/OpenSearchInfraService.java | 7 +
.../pinecone/services/PineconeInfraService.java | 7 +
.../weaviate/services/WeaviateInfraService.java | 28 ++++
13 files changed, 411 insertions(+), 26 deletions(-)
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
index 04260c6cadac..d1450550a0a7 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc
@@ -2931,6 +2931,18 @@ with code `1` (fix the route) instead of `70` (internal
error), and prints the e
The stack trace is in the log of the integration, and is no longer printed a
second time on stderr (add `--verbose`
for it). Scripts that checked for `70` after a failed start should check for
`1`.
+=== camel-jbang - camel infra run names the connection details as properties
+
+The connection details that `camel infra run`, `camel infra get` and `camel
infra ps --json` print (and that
+`camel infra run` writes to `~/.camel/infra-<service>-<pid>.json`) were named
as the Java methods of the test-infra
+service, such as `getPort` and `getBootstrapServers`, often next to the same
detail named as the Camel option, such as
+`port`. They are now named as properties: a getter loses its `get`
(`getFtpRootDir` is `ftpRootDir`,
+`getBootstrapServers` is `bootstrapServers`), a getter of a detail that the
service also names as the Camel option is
+left out (FTP prints `port`, not `getPort` as well), and so are the deprecated
ones (`hostname` of FTP, use `host`).
+ClickHouse, Neo4j, OpenSearch, Pinecone, Weaviate, OPA, OpenFGA and Apicurio
Registry now also print their details
+named as the options of their component, such as `serverUrl` of
`camel-clickhouse`. A script that reads a `get...` key
+should read the key without `get`, or the Camel option.
+
=== camel-jbang - a Camel version that does not exist exits with 3
A `--camel-version` that was never released, in `camel catalog`, `camel doc`
and `camel validate`, now says
diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang-dev-services.adoc
b/docs/user-manual/modules/ROOT/pages/camel-jbang-dev-services.adoc
index bdbcf9fab2d6..c0a49ac5a0a4 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang-dev-services.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang-dev-services.adoc
@@ -41,7 +41,9 @@ Some services offer multiple implementations — pass the
implementation name as
camel infra run kafka redpanda
----
-Once running, the service prints its connection details as JSON:
+Once running, the service prints its connection details as JSON. They are
named as the options of the Camel component,
+such as `brokers` of `camel-kafka` or `host`, `port`, `username` and
`password` of `camel-ftp`, so they can be set on an
+endpoint as they are (as `camel cmd send --infra` does):
[source,bash]
----
@@ -49,8 +51,13 @@ $ camel infra run ftp
Starting service ftp
{
- "getPort" : 52472,
- "getFtpRootDir" : "file://path/to/current/directory/target/ftp/..."
+ "directoryName" : "myTestDirectory",
+ "endpointUri" :
"ftp:localhost:52472/myTestDirectory?username=admin&password=RAW(admin)",
+ "ftpRootDir" : "file://path/to/current/directory/target/ftp/...",
+ "host" : "localhost",
+ "password" : "admin",
+ "port" : 52472,
+ "username" : "admin"
}
----
@@ -60,7 +67,8 @@ $ camel infra run kafka redpanda
Starting service kafka with implementation redpanda
{
- "getBootstrapServers" : "localhost:32771"
+ "bootstrapServers" : "localhost:32771",
+ "brokers" : "localhost:32771"
}
----
@@ -74,7 +82,8 @@ Use `--background` to run the service detached from the
terminal. The command wa
$ camel infra run kafka --background
Running kafka in background with PID: 80093 (waiting for it to start)
{
- "getBootstrapServers" : "localhost:9092"
+ "bootstrapServers" : "localhost:9092",
+ "brokers" : "localhost:9092"
}
Log: /Users/me/.camel/80093-run.log
----
@@ -190,9 +199,10 @@ Retrieve connection details for a running service:
----
$ camel infra get openldap
{
- "getPort" : 32774,
- "getSslPort" : 32775,
- "getHost" : "localhost"
+ "host" : "localhost",
+ "port" : 32774,
+ "sslPort" : 32775,
+ ...
}
----
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/infra/InfraRun.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/infra/InfraRun.java
index b54c3e38f915..ba88741a1281 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/infra/InfraRun.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/infra/InfraRun.java
@@ -27,6 +27,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.CountDownLatch;
@@ -364,24 +365,7 @@ public class InfraRun extends InfraBaseCommand {
throw e;
}
- Method[] serviceMethods =
cl.loadClass(serviceInterface).getDeclaredMethods();
- Map<String, Object> properties = new TreeMap<>();
- for (Method method : serviceMethods) {
- // Skip methods that return complex objects or have side effects
- if (method.getParameterCount() == 0
- && !method.getName().equals("registerProperties")
- && !method.getName().equals("getContainer")) {
- Object value = null;
- try {
- value = method.invoke(actualService);
- } catch (Exception e) {
- // ignore
- }
- if (value != null) {
- properties.put(method.getName(), value);
- }
- }
- }
+ Map<String, Object> properties =
serviceProperties(cl.loadClass(serviceInterface), actualService);
if (testInfraService.serviceVersion() != null &&
!testInfraService.serviceVersion().isEmpty()) {
properties.put("serviceVersion",
testInfraService.serviceVersion());
@@ -466,6 +450,68 @@ public class InfraRun extends InfraBaseCommand {
return 0;
}
+ /**
+ * The connection details of a service, named as the options of the Camel
component it is for (CAMEL-22083): a
+ * method {@code port()} is {@code port}, and a getter {@code
getFtpRootDir()} is {@code ftpRootDir}. A getter that
+ * has a method of the same name, such as {@code getPort()} next to {@code
port()}, and a deprecated method are left
+ * out.
+ */
+ static Map<String, Object> serviceProperties(Class<?> serviceInterface,
Object service) {
+ Map<String, Method> methods = new TreeMap<>();
+ for (Method method : serviceInterface.getDeclaredMethods()) {
+ // skip methods that take arguments, return complex objects or
have side effects
+ if (method.getParameterCount() != 0 ||
method.isAnnotationPresent(Deprecated.class)
+ || method.getName().equals("registerProperties") ||
method.getName().equals("getContainer")) {
+ continue;
+ }
+ String name = propertyName(method.getName());
+ Method other = methods.get(name);
+ // the method named as the property wins over its getter
+ if (other == null || other.getName().length() >
method.getName().length()) {
+ methods.put(name, method);
+ }
+ }
+ Map<String, Object> properties = new TreeMap<>();
+ methods.forEach((name, method) -> {
+ Object value = null;
+ try {
+ value = method.invoke(service);
+ } catch (Exception e) {
+ // ignore
+ }
+ if (value != null) {
+ properties.put(name, value);
+ }
+ });
+ return properties;
+ }
+
+ /**
+ * The property of a method: the name of a getter without get or is
({@code getFtpRootDir} is {@code ftpRootDir},
+ * {@code getCQL3Port} is {@code cql3Port}), else the name of the method.
+ */
+ static String propertyName(String method) {
+ String name = null;
+ if (method.length() > 3 && method.startsWith("get") &&
Character.isUpperCase(method.charAt(3))) {
+ name = method.substring(3);
+ } else if (method.length() > 2 && method.startsWith("is") &&
Character.isUpperCase(method.charAt(2))) {
+ name = method.substring(2);
+ }
+ if (name == null) {
+ return method;
+ }
+ // the leading capitals in lower case, but the last of them when a
word follows: CQL3Port is cql3Port
+ int upper = 0;
+ while (upper < name.length() &&
Character.isUpperCase(name.charAt(upper))) {
+ upper++;
+ }
+ if (upper == name.length()) {
+ return name.toLowerCase(Locale.ROOT);
+ }
+ int lower = upper > 1 && Character.isLowerCase(name.charAt(upper)) ?
upper - 1 : upper;
+ return name.substring(0, lower).toLowerCase(Locale.ROOT) +
name.substring(lower);
+ }
+
/**
* The one line for a service that did not start because a port it maps on
the host is taken, naming the running
* infra service that has it, instead of the stack trace of the container
runtime.
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/action/CamelSendActionInfraTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/action/CamelSendActionInfraTest.java
index c4a935bbbc5b..e4e3da005c21 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/action/CamelSendActionInfraTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/action/CamelSendActionInfraTest.java
@@ -316,6 +316,56 @@ public class CamelSendActionInfraTest extends
CamelCommandBaseTestSupport {
"http:localhost:8080/lra-coordinator",
"host", "localhost"));
+ // CAMEL-22083: the services that got methods named as the options of
their component
+ testCases.add(Arguments.of(
+ "clickhouse",
+ createJson("serverUrl", "http://localhost:8123", "database",
"default",
+ "username", "default", "password", "secret"),
+ "clickhouse:default",
+ "serverUrl", "http://localhost:8123"));
+
+ testCases.add(Arguments.of(
+ "neo4j",
+ createJson("databaseUrl", "bolt://localhost:7687", "username",
"neo4j", "password", "secret"),
+ "neo4j:myVectors",
+ "databaseUrl", "bolt://localhost:7687"));
+
+ testCases.add(Arguments.of(
+ "opensearch",
+ createJson("hostAddresses", "localhost:9200"),
+ "opensearch:myCluster",
+ "hostAddresses", "localhost:9200"));
+
+ testCases.add(Arguments.of(
+ "pinecone",
+ createJson("host", "http://localhost:5080"),
+ "pinecone:myCollection",
+ "host", "http://localhost:5080"));
+
+ testCases.add(Arguments.of(
+ "weaviate",
+ createJson("host", "localhost:8080", "scheme", "http",
"grpcHost", "localhost", "grpcPort", 50051),
+ "weaviate:myCollection",
+ "grpcPort", "50051"));
+
+ testCases.add(Arguments.of(
+ "opa",
+ createJson("serverUrl", "http://localhost:8181"),
+ "opa:authz/allow",
+ "serverUrl", "http://localhost:8181"));
+
+ testCases.add(Arguments.of(
+ "openfga",
+ createJson("apiUrl", "http://localhost:8080"),
+ "openfga:check",
+ "apiUrl", "http://localhost:8080"));
+
+ testCases.add(Arguments.of(
+ "apicurio-registry",
+ createJson("registryUrl",
"http://localhost:8080/apis/registry/v3"),
+ "apicurio-registry:myGroup/myArtifact",
+ "registryUrl", "http://localhost:8080/apis/registry/v3"));
+
return testCases.stream();
}
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/infra/InfraRunServicePropertiesTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/infra/InfraRunServicePropertiesTest.java
new file mode 100644
index 000000000000..43eea2287f8b
--- /dev/null
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/infra/InfraRunServicePropertiesTest.java
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.apache.camel.dsl.jbang.core.commands.infra;
+
+import java.util.Map;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * CAMEL-22083: camel infra run names the connection details of a service as
the options of the Camel component, not as
+ * the Java methods of the service.
+ */
+class InfraRunServicePropertiesTest {
+
+ /**
+ * A service as most of test-infra has it: the methods named as the
options of the component, and the getters of the
+ * tests of the components.
+ */
+ public interface SampleInfraService {
+
+ @Deprecated
+ int getPort();
+
+ int port();
+
+ @Deprecated
+ String hostname();
+
+ String host();
+
+ String getUsername();
+
+ String getFtpRootDir();
+
+ int getCQL3Port();
+
+ String getServiceBaseURL();
+
+ boolean isRunning();
+
+ String uiUrl();
+
+ String greeting(String name);
+
+ void registerProperties();
+ }
+
+ public static class SampleService implements SampleInfraService {
+
+ @Override
+ public int getPort() {
+ return 2121;
+ }
+
+ @Override
+ public int port() {
+ return 2121;
+ }
+
+ @Override
+ public String hostname() {
+ return "localhost";
+ }
+
+ @Override
+ public String host() {
+ return "localhost";
+ }
+
+ @Override
+ public String getUsername() {
+ return "admin";
+ }
+
+ @Override
+ public String getFtpRootDir() {
+ return "/tmp/ftp";
+ }
+
+ @Override
+ public int getCQL3Port() {
+ return 9042;
+ }
+
+ @Override
+ public String getServiceBaseURL() {
+ return "http://localhost:8080/fhir";
+ }
+
+ @Override
+ public boolean isRunning() {
+ return true;
+ }
+
+ @Override
+ public String uiUrl() {
+ // no UI: not in the details
+ return null;
+ }
+
+ @Override
+ public String greeting(String name) {
+ return "Hello " + name;
+ }
+
+ @Override
+ public void registerProperties() {
+ // not a detail of the service
+ }
+ }
+
+ @Test
+ void theDetailsAreNamedAsProperties() {
+ Map<String, Object> properties =
InfraRun.serviceProperties(SampleInfraService.class, new SampleService());
+
+ assertThat(properties).containsExactly(
+ Map.entry("cql3Port", 9042),
+ Map.entry("ftpRootDir", "/tmp/ftp"),
+ Map.entry("host", "localhost"),
+ Map.entry("port", 2121),
+ Map.entry("running", true),
+ Map.entry("serviceBaseURL", "http://localhost:8080/fhir"),
+ Map.entry("username", "admin"));
+ }
+
+ @Test
+ void propertyNames() {
+ assertThat(InfraRun.propertyName("getPort")).isEqualTo("port");
+
assertThat(InfraRun.propertyName("getBootstrapServers")).isEqualTo("bootstrapServers");
+
assertThat(InfraRun.propertyName("getCQL3Endpoint")).isEqualTo("cql3Endpoint");
+ assertThat(InfraRun.propertyName("getURL")).isEqualTo("url");
+ assertThat(InfraRun.propertyName("isRunning")).isEqualTo("running");
+ // not a getter
+ assertThat(InfraRun.propertyName("brokers")).isEqualTo("brokers");
+ assertThat(InfraRun.propertyName("get")).isEqualTo("get");
+ assertThat(InfraRun.propertyName("getaway")).isEqualTo("getaway");
+ assertThat(InfraRun.propertyName("island")).isEqualTo("island");
+ }
+}
diff --git
a/test-infra/camel-test-infra-apicurio-registry/src/main/java/org/apache/camel/test/infra/apicurio/registry/services/ApicurioRegistryInfraService.java
b/test-infra/camel-test-infra-apicurio-registry/src/main/java/org/apache/camel/test/infra/apicurio/registry/services/ApicurioRegistryInfraService.java
index 7a8b8380ff79..2c2626d7a737 100644
---
a/test-infra/camel-test-infra-apicurio-registry/src/main/java/org/apache/camel/test/infra/apicurio/registry/services/ApicurioRegistryInfraService.java
+++
b/test-infra/camel-test-infra-apicurio-registry/src/main/java/org/apache/camel/test/infra/apicurio/registry/services/ApicurioRegistryInfraService.java
@@ -22,6 +22,13 @@ public interface ApicurioRegistryInfraService extends
InfrastructureService {
String getApicurioRegistryUrl();
+ /**
+ * The registryUrl option of camel-apicurio-registry.
+ */
+ default String registryUrl() {
+ return getApicurioRegistryUrl();
+ }
+
String host();
int port();
diff --git
a/test-infra/camel-test-infra-clickhouse/src/main/java/org/apache/camel/test/infra/clickhouse/services/ClickHouseInfraService.java
b/test-infra/camel-test-infra-clickhouse/src/main/java/org/apache/camel/test/infra/clickhouse/services/ClickHouseInfraService.java
index b70e4a7c36d8..37ff2c65d9a6 100644
---
a/test-infra/camel-test-infra-clickhouse/src/main/java/org/apache/camel/test/infra/clickhouse/services/ClickHouseInfraService.java
+++
b/test-infra/camel-test-infra-clickhouse/src/main/java/org/apache/camel/test/infra/clickhouse/services/ClickHouseInfraService.java
@@ -34,4 +34,32 @@ public interface ClickHouseInfraService extends
InfrastructureService {
String getPassword();
String getDatabaseName();
+
+ /**
+ * The serverUrl option of camel-clickhouse.
+ */
+ default String serverUrl() {
+ return getHttpUrl();
+ }
+
+ /**
+ * The database of camel-clickhouse.
+ */
+ default String database() {
+ return getDatabaseName();
+ }
+
+ /**
+ * The username option of camel-clickhouse.
+ */
+ default String username() {
+ return getUsername();
+ }
+
+ /**
+ * The password option of camel-clickhouse.
+ */
+ default String password() {
+ return getPassword();
+ }
}
diff --git
a/test-infra/camel-test-infra-neo4j/src/main/java/org/apache/camel/test/infra/neo4j/services/Neo4jInfraService.java
b/test-infra/camel-test-infra-neo4j/src/main/java/org/apache/camel/test/infra/neo4j/services/Neo4jInfraService.java
index a0ed56cbba02..3a99edd70b73 100644
---
a/test-infra/camel-test-infra-neo4j/src/main/java/org/apache/camel/test/infra/neo4j/services/Neo4jInfraService.java
+++
b/test-infra/camel-test-infra-neo4j/src/main/java/org/apache/camel/test/infra/neo4j/services/Neo4jInfraService.java
@@ -26,6 +26,27 @@ public interface Neo4jInfraService extends
InfrastructureService {
String getNeo4jDatabasePassword();
+ /**
+ * The databaseUrl option of camel-neo4j.
+ */
+ default String databaseUrl() {
+ return getNeo4jDatabaseUri();
+ }
+
+ /**
+ * The username option of camel-neo4j.
+ */
+ default String username() {
+ return getNeo4jDatabaseUser();
+ }
+
+ /**
+ * The password option of camel-neo4j.
+ */
+ default String password() {
+ return getNeo4jDatabasePassword();
+ }
+
default String uiUrl() {
return null;
}
diff --git
a/test-infra/camel-test-infra-opa/src/main/java/org/apache/camel/test/infra/opa/services/OpaInfraService.java
b/test-infra/camel-test-infra-opa/src/main/java/org/apache/camel/test/infra/opa/services/OpaInfraService.java
index 616511e571ec..c4a08b689e0b 100644
---
a/test-infra/camel-test-infra-opa/src/main/java/org/apache/camel/test/infra/opa/services/OpaInfraService.java
+++
b/test-infra/camel-test-infra-opa/src/main/java/org/apache/camel/test/infra/opa/services/OpaInfraService.java
@@ -28,6 +28,13 @@ public interface OpaInfraService extends
InfrastructureService {
*/
String getOpaUrl();
+ /**
+ * The serverUrl option of camel-opa.
+ */
+ default String serverUrl() {
+ return getOpaUrl();
+ }
+
String host();
int port();
diff --git
a/test-infra/camel-test-infra-openfga/src/main/java/org/apache/camel/test/infra/openfga/services/OpenFgaInfraService.java
b/test-infra/camel-test-infra-openfga/src/main/java/org/apache/camel/test/infra/openfga/services/OpenFgaInfraService.java
index 219ba650835b..02fcdc640bc9 100644
---
a/test-infra/camel-test-infra-openfga/src/main/java/org/apache/camel/test/infra/openfga/services/OpenFgaInfraService.java
+++
b/test-infra/camel-test-infra-openfga/src/main/java/org/apache/camel/test/infra/openfga/services/OpenFgaInfraService.java
@@ -28,6 +28,13 @@ public interface OpenFgaInfraService extends
InfrastructureService {
*/
String getOpenFgaUrl();
+ /**
+ * The apiUrl option of camel-openfga.
+ */
+ default String apiUrl() {
+ return getOpenFgaUrl();
+ }
+
String host();
int port();
diff --git
a/test-infra/camel-test-infra-opensearch/src/main/java/org/apache/camel/test/infra/opensearch/services/OpenSearchInfraService.java
b/test-infra/camel-test-infra-opensearch/src/main/java/org/apache/camel/test/infra/opensearch/services/OpenSearchInfraService.java
index b43715f081e8..2ba9069387a9 100644
---
a/test-infra/camel-test-infra-opensearch/src/main/java/org/apache/camel/test/infra/opensearch/services/OpenSearchInfraService.java
+++
b/test-infra/camel-test-infra-opensearch/src/main/java/org/apache/camel/test/infra/opensearch/services/OpenSearchInfraService.java
@@ -29,6 +29,13 @@ public interface OpenSearchInfraService extends
InfrastructureService {
return String.format("%s:%d", getOpenSearchHost(), getPort());
}
+ /**
+ * The hostAddresses option of camel-opensearch.
+ */
+ default String hostAddresses() {
+ return getHttpHostAddress();
+ }
+
String getUsername();
String getPassword();
diff --git
a/test-infra/camel-test-infra-pinecone/src/main/java/org/apache/camel/test/infra/pinecone/services/PineconeInfraService.java
b/test-infra/camel-test-infra-pinecone/src/main/java/org/apache/camel/test/infra/pinecone/services/PineconeInfraService.java
index 3c9907a6dbb5..dfce0d85568b 100644
---
a/test-infra/camel-test-infra-pinecone/src/main/java/org/apache/camel/test/infra/pinecone/services/PineconeInfraService.java
+++
b/test-infra/camel-test-infra-pinecone/src/main/java/org/apache/camel/test/infra/pinecone/services/PineconeInfraService.java
@@ -28,4 +28,11 @@ public interface PineconeInfraService extends
InfrastructureService {
String getPineconeHost();
int getPineconePort();
+
+ /**
+ * The host option of camel-pinecone.
+ */
+ default String host() {
+ return getPineconeEndpointUrl();
+ }
}
diff --git
a/test-infra/camel-test-infra-weaviate/src/main/java/org/apache/camel/test/infra/weaviate/services/WeaviateInfraService.java
b/test-infra/camel-test-infra-weaviate/src/main/java/org/apache/camel/test/infra/weaviate/services/WeaviateInfraService.java
index ff69da5b832c..d87967523b5f 100644
---
a/test-infra/camel-test-infra-weaviate/src/main/java/org/apache/camel/test/infra/weaviate/services/WeaviateInfraService.java
+++
b/test-infra/camel-test-infra-weaviate/src/main/java/org/apache/camel/test/infra/weaviate/services/WeaviateInfraService.java
@@ -30,4 +30,32 @@ public interface WeaviateInfraService extends
InfrastructureService {
int getWeaviatePort();
int getWeaviateGrpcPort();
+
+ /**
+ * The host option of camel-weaviate: the host and the port of the HTTP
API.
+ */
+ default String host() {
+ return getWeaviateHost() + ":" + getWeaviatePort();
+ }
+
+ /**
+ * The scheme option of camel-weaviate.
+ */
+ default String scheme() {
+ return "http";
+ }
+
+ /**
+ * The grpcHost option of camel-weaviate.
+ */
+ default String grpcHost() {
+ return getWeaviateHost();
+ }
+
+ /**
+ * The grpcPort option of camel-weaviate.
+ */
+ default int grpcPort() {
+ return getWeaviateGrpcPort();
+ }
}