You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/02/06 15:23:43 UTC

[camel] 02/06: CAMEL-14509 - Create an AWS-CloudWatch component based on SDK v2, regen

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 0a61c81b005ce078deb4c1843bf1d53af866557c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Feb 6 14:59:58 2020 +0100

    CAMEL-14509 - Create an AWS-CloudWatch component based on SDK v2, regen
---
 .../services/org/apache/camel/component.properties |  2 +-
 .../services/org/apache/camel/component/aws-cw     |  2 -
 .../org/apache/camel/configurer/aws-cw-component   |  2 -
 .../org/apache/camel/configurer/aws-cw-endpoint    |  2 -
 .../org/apache/camel/component/aws/cw/aws-cw.json  | 46 ----------------------
 .../aws/cw/CwComponentConfigurationTest.java       |  2 +-
 .../aws/cw/CwComponentVerifierExtensionTest.java   |  4 +-
 7 files changed, 4 insertions(+), 56 deletions(-)

diff --git a/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/component.properties
index a92c78a..354f6f1 100644
--- a/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/component.properties
+++ b/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -1,5 +1,5 @@
 # Generated by camel build tools - do NOT edit this file!
-components=aws-cw aws2-cw
+components=aws2-cw
 groupId=org.apache.camel
 artifactId=camel-aws2-cw
 version=3.1.0-SNAPSHOT
diff --git a/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/component/aws-cw b/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/component/aws-cw
deleted file mode 100644
index b6084c2..0000000
--- a/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/component/aws-cw
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.aws.cw.CwComponent
diff --git a/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cw-component b/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cw-component
deleted file mode 100644
index 39894df..0000000
--- a/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cw-component
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.aws.cw.CwComponentConfigurer
diff --git a/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cw-endpoint b/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cw-endpoint
deleted file mode 100644
index a42cd28..0000000
--- a/components/camel-aws2-cw/src/generated/resources/META-INF/services/org/apache/camel/configurer/aws-cw-endpoint
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.aws.cw.CwEndpointConfigurer
diff --git a/components/camel-aws2-cw/src/generated/resources/org/apache/camel/component/aws/cw/aws-cw.json b/components/camel-aws2-cw/src/generated/resources/org/apache/camel/component/aws/cw/aws-cw.json
deleted file mode 100644
index 90a51f4..0000000
--- a/components/camel-aws2-cw/src/generated/resources/org/apache/camel/component/aws/cw/aws-cw.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
-  "component": {
-    "kind": "component",
-    "scheme": "aws-cw",
-    "extendsScheme": "",
-    "syntax": "aws-cw:namespace",
-    "title": "AWS CloudWatch",
-    "description": "The aws-cw component is used for sending metrics to an Amazon CloudWatch.",
-    "label": "cloud,monitoring",
-    "deprecated": false,
-    "async": false,
-    "consumerOnly": false,
-    "producerOnly": true,
-    "lenientProperties": false,
-    "javaType": "org.apache.camel.component.aws.cw.CwComponent",
-    "firstVersion": "2.11.0",
-    "groupId": "org.apache.camel",
-    "artifactId": "camel-aws-cw",
-    "version": "3.1.0-SNAPSHOT"
-  },
-  "componentProperties": {
-    "configuration": { "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws.cw.CwConfiguration", "deprecated": false, "secret": false, "description": "The AWS CW default configuration" },
-    "accessKey": { "kind": "property", "displayName": "Access Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Access Key" },
-    "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Amazon AWS Secret Key" },
-    "region": { "kind": "property", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "The region in which CW client needs to work" },
-    "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
-    "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the r [...]
-  },
-  "properties": {
-    "namespace": { "kind": "path", "displayName": "Namespace", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "The metric namespace" },
-    "amazonCwClient": { "kind": "parameter", "displayName": "Amazon Cw Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.services.cloudwatch.AmazonCloudWatch", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "To use the AmazonCloudWatch as the client" },
-    "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the  [...]
-    "name": { "kind": "parameter", "displayName": "Name", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "The metric name" },
-    "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "To define a proxy host when instantiating the CW client" },
-    "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "To define a proxy port when instantiating the CW client" },
-    "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "com.amazonaws.Protocol", "enum": [ "HTTP", "HTTPS" ], "deprecated": false, "secret": false, "defaultValue": "HTTPS", "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "To define a proxy protocol when instantiating the CW client" },
-    "region": { "kind": "parameter", "displayName": "Region", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "The region in which CW client needs to work. When using this parameter, the configuration will expect the capitalized name of the region (for example AP_EAST_1 [...]
-    "timestamp": { "kind": "parameter", "displayName": "Timestamp", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.util.Date", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "The metric timestamp" },
-    "unit": { "kind": "parameter", "displayName": "Unit", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "The metric unit" },
-    "value": { "kind": "parameter", "displayName": "Value", "group": "producer", "label": "", "required": false, "type": "number", "javaType": "java.lang.Double", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "The metric value" },
-    "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" },
-    "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." },
-    "accessKey": { "kind": "parameter", "displayName": "Access Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "Amazon AWS Access Key" },
-    "secretKey": { "kind": "parameter", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": true, "configurationClass": "org.apache.camel.component.aws.cw.CwConfiguration", "configurationField": "configuration", "description": "Amazon AWS Secret Key" }
-  }
-}
diff --git a/components/camel-aws2-cw/src/test/java/org/apache/camel/component/aws/cw/CwComponentConfigurationTest.java b/components/camel-aws2-cw/src/test/java/org/apache/camel/component/aws/cw/CwComponentConfigurationTest.java
index 1d92466..4f4d2a5 100644
--- a/components/camel-aws2-cw/src/test/java/org/apache/camel/component/aws/cw/CwComponentConfigurationTest.java
+++ b/components/camel-aws2-cw/src/test/java/org/apache/camel/component/aws/cw/CwComponentConfigurationTest.java
@@ -37,7 +37,7 @@ public class CwComponentConfigurationTest extends CamelTestSupport {
     public void createEndpointWithAllOptions() throws Exception {
         CloudWatchClient cloudWatchClient = mock(CloudWatchClient.class);
         context.getRegistry().bind("amazonCwClient", cloudWatchClient);
-        CwComponent component = context.getComponent("aws-cw", CwComponent.class);
+        CwComponent component = context.getComponent("aws2-cw", CwComponent.class);
         CwEndpoint endpoint = (CwEndpoint) component.createEndpoint("aws2-cw://camel.apache.org/test?amazonCwClient=#amazonCwClient&name=testMetric&value=2&unit=Count&timestamp=#now");
 
         assertEquals("camel.apache.org/test", endpoint.getConfiguration().getNamespace());
diff --git a/components/camel-aws2-cw/src/test/java/org/apache/camel/component/aws/cw/CwComponentVerifierExtensionTest.java b/components/camel-aws2-cw/src/test/java/org/apache/camel/component/aws/cw/CwComponentVerifierExtensionTest.java
index d01190a..0a04e3e 100644
--- a/components/camel-aws2-cw/src/test/java/org/apache/camel/component/aws/cw/CwComponentVerifierExtensionTest.java
+++ b/components/camel-aws2-cw/src/test/java/org/apache/camel/component/aws/cw/CwComponentVerifierExtensionTest.java
@@ -37,7 +37,7 @@ public class CwComponentVerifierExtensionTest extends CamelTestSupport {
 
     @Test
     public void testParameters() throws Exception {
-        Component component = context().getComponent("aws-cw");
+        Component component = context().getComponent("aws2-cw");
 
         ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new);
 
@@ -54,7 +54,7 @@ public class CwComponentVerifierExtensionTest extends CamelTestSupport {
 
     @Test
     public void testConnectivity() throws Exception {
-        Component component = context().getComponent("aws-cw");
+        Component component = context().getComponent("aws2-cw");
         ComponentVerifierExtension verifier = component.getExtension(ComponentVerifierExtension.class).orElseThrow(IllegalStateException::new);
 
         Map<String, Object> parameters = new HashMap<>();