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 2021/08/30 11:57:53 UTC

[camel-kamelets] branch main updated (4c184eb -> f32b4ca)

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

acosentino pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


    from 4c184eb  Regen docs
     new d1b54ad  Added XJ Identity Action Kamelet
     new b4f6adc  Added XJ Identity Action Kamelet
     new a12bd25  Added XJ Identity Action Kamelet
     new 45b6b43  Added XJ Identity Action Kamelet
     new 4a9b49f  Added XJ Identity Action Kamelet
     new f32b4ca  Added XJ Identity Action Kamelet

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ...-template-action.svg => xj-identity-action.svg} |  0
 docs/modules/ROOT/nav.adoc                         |  1 +
 ...t-field-action.adoc => xj-identity-action.adoc} | 42 +++++++++++-----------
 ...amelet.yaml => xj-identity-action.kamelet.yaml} | 24 ++++++-------
 ...inding.yaml => xj-identity-action-binding.yaml} |  6 ++--
 ...inding.yaml => xj-identity-action-binding.yaml} |  4 +--
 ...kamelet.yaml => xj-identity-action.kamelet.yaml | 24 ++++++-------
 7 files changed, 49 insertions(+), 52 deletions(-)
 copy docs/modules/ROOT/assets/images/kamelets/{velocity-template-action.svg => xj-identity-action.svg} (100%)
 copy docs/modules/ROOT/pages/{hoist-field-action.adoc => xj-identity-action.adoc} (68%)
 copy library/camel-kamelets/src/main/resources/kamelets/{mvel-template-action.kamelet.yaml => xj-identity-action.kamelet.yaml} (90%)
 copy templates/bindings/camel-k/{jsonata-action-binding.yaml => xj-identity-action-binding.yaml} (81%)
 copy templates/bindings/core/{jsonata-action-binding.yaml => xj-identity-action-binding.yaml} (72%)
 copy library/camel-kamelets/src/main/resources/kamelets/mvel-template-action.kamelet.yaml => xj-identity-action.kamelet.yaml (90%)

[camel-kamelets] 01/06: Added XJ Identity Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d1b54adb0b26ce09277e43b8884b5441851ab27e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Aug 30 13:36:06 2021 +0200

    Added XJ Identity Action Kamelet
---
 xj-identity-action.kamelet.yaml | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/xj-identity-action.kamelet.yaml b/xj-identity-action.kamelet.yaml
new file mode 100644
index 0000000..3e7f30e
--- /dev/null
+++ b/xj-identity-action.kamelet.yaml
@@ -0,0 +1,38 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: xj-identity-action
+  annotations:
+    camel.apache.org/kamelet.support.level: "Preview"
+    camel.apache.org/catalog.version: "main-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Actions"
+  labels:
+    camel.apache.org/kamelet.type: "action"
+spec:
+  definition:
+    title: "XJ Identity Action"
+    description: |-
+      Apply the XJ Identity Transformation. 
+      
+      There two possible direction of the transformation, from JSON to XML or from XML to JSON.
+    required:
+      - direction
+    type: object
+    properties:
+      direction:
+        title: Direction
+        description: The transform direction, possible values are XML2JSON or JSON2XML
+        type: String
+  dependencies:
+  - "camel:xj"
+  - "camel:kamelet"
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - to:
+          uri: "xj:identity"
+          parameters:
+            transformDirection: "{{direction}}"

[camel-kamelets] 04/06: Added XJ Identity Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 45b6b43ec00ee4907b13009cd2200062d0c11bb7
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Aug 30 13:52:29 2021 +0200

    Added XJ Identity Action Kamelet
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 625ea16..f187366 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -126,4 +126,5 @@
 * xref:ROOT:value-to-key-action.adoc[image:kamelets/value-to-key-action.svg[] Value to Key Action]
 * xref:ROOT:velocity-template-action.adoc[image:kamelets/velocity-template-action.svg[] Velocity Template Action]
 * xref:ROOT:webhook-source.adoc[image:kamelets/webhook-source.svg[] Webhook Source]
+* xref:ROOT:xj-identity-action.adoc[image:kamelets/xj-identity-action.svg[] XJ Identity Action]
 // THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

[camel-kamelets] 06/06: Added XJ Identity Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f32b4ca4329c4ab954701604ca80447cbd77d5d5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Aug 30 13:52:48 2021 +0200

    Added XJ Identity Action Kamelet
---
 .../camel-k/xj-identity-action-binding.yaml        | 24 ++++++++++++++++++++++
 .../bindings/core/xj-identity-action-binding.yaml  | 13 ++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/templates/bindings/camel-k/xj-identity-action-binding.yaml b/templates/bindings/camel-k/xj-identity-action-binding.yaml
new file mode 100644
index 0000000..60e4ee4
--- /dev/null
+++ b/templates/bindings/camel-k/xj-identity-action-binding.yaml
@@ -0,0 +1,24 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: xj-identity-action-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: timer-source
+    properties:
+      message: "Hello"
+  steps:
+  - ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: xj-identity-action
+    properties:
+      direction: "The Direction"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
diff --git a/templates/bindings/core/xj-identity-action-binding.yaml b/templates/bindings/core/xj-identity-action-binding.yaml
new file mode 100644
index 0000000..90d4cf3
--- /dev/null
+++ b/templates/bindings/core/xj-identity-action-binding.yaml
@@ -0,0 +1,13 @@
+- route:
+    from:
+      uri: "kamelet:timer-source"
+      parameters:
+        period: 1000
+        message: "{ \"foo\": \"John\"}"
+    steps:
+      - to:
+          uri: "kamelet:xj-identity-action"
+          parameters:
+            direction: "The Direction"
+      - to:
+          uri: "log:info"

[camel-kamelets] 02/06: Added XJ Identity Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b4f6adc91c6abb8ffcabead568b083e4f60a7e1d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Aug 30 13:37:23 2021 +0200

    Added XJ Identity Action Kamelet
---
 .../src/main/resources/kamelets/xj-identity-action.kamelet.yaml       | 0
 xj-identity-action.kamelet.yaml                                       | 4 +---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/xj-identity-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/xj-identity-action.kamelet.yaml
similarity index 100%
copy from xj-identity-action.kamelet.yaml
copy to library/camel-kamelets/src/main/resources/kamelets/xj-identity-action.kamelet.yaml
diff --git a/xj-identity-action.kamelet.yaml b/xj-identity-action.kamelet.yaml
index 3e7f30e..fe9d244 100644
--- a/xj-identity-action.kamelet.yaml
+++ b/xj-identity-action.kamelet.yaml
@@ -14,9 +14,7 @@ spec:
   definition:
     title: "XJ Identity Action"
     description: |-
-      Apply the XJ Identity Transformation. 
-      
-      There two possible direction of the transformation, from JSON to XML or from XML to JSON.
+      Apply the XJ Identity Transformation to transform JSON to XML and XML to JSON. 
     required:
       - direction
     type: object

[camel-kamelets] 05/06: Added XJ Identity Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4a9b49f9948a73d682d3fefa1d64e9be74d3d189
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Aug 30 13:52:42 2021 +0200

    Added XJ Identity Action Kamelet
---
 .../assets/images/kamelets/xj-identity-action.svg  |  59 +++++++++
 docs/modules/ROOT/pages/xj-identity-action.adoc    | 137 +++++++++++++++++++++
 2 files changed, 196 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/xj-identity-action.svg b/docs/modules/ROOT/assets/images/kamelets/xj-identity-action.svg
new file mode 100644
index 0000000..fa06352
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/xj-identity-action.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   viewBox="0 -256 1792 1792"
+   id="svg3025"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   width="100%"
+   height="100%"
+   sodipodi:docname="cog_font_awesome.svg">
+  <metadata
+     id="metadata3035">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs3033" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview3031"
+     showgrid="false"
+     inkscape:zoom="0.13169643"
+     inkscape:cx="896"
+     inkscape:cy="896"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg3025" />
+  <g
+     transform="matrix(1,0,0,-1,121.49153,1285.4237)"
+     id="g3027">
+    <path
+       d="m 1024,640 q 0,106 -75,181 -75,75 -181,75 -106,0 -181,-75 -75,-75 -75,-181 0,-106 75,-181 75,-75 181,-75 106,0 181,75 75,75 75,181 z m 512,109 V 527 q 0,-12 -8,-23 -8,-11 -20,-13 l -185,-28 q -19,-54 -39,-91 35,-50 107,-138 10,-12 10,-25 0,-13 -9,-23 -27,-37 -99,-108 -72,-71 -94,-71 -12,0 -26,9 l -138,108 q -44,-23 -91,-38 -16,-136 -29,-186 -7,-28 -36,-28 H 657 q -14,0 -24.5,8.5 Q 622,-111 621,-98 L 593,86 q -49,16 -90,37 L 362,16 Q 352,7 337,7 323,7 312,18 186,132 147,186 q -7 [...]
+       id="path3029"
+       inkscape:connector-curvature="0"
+       style="fill:currentColor" />
+  </g>
+</svg>
diff --git a/docs/modules/ROOT/pages/xj-identity-action.adoc b/docs/modules/ROOT/pages/xj-identity-action.adoc
new file mode 100644
index 0000000..b99e0e9
--- /dev/null
+++ b/docs/modules/ROOT/pages/xj-identity-action.adoc
@@ -0,0 +1,137 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/xj-identity-action.svg[] XJ Identity Action
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Apply the XJ Identity Transformation to transform JSON to XML and XML to JSON. 
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `xj-identity-action` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *direction {empty}* *| Direction| The transform direction, possible values are XML2JSON or JSON2XML| String| | 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `xj-identity-action` can be used in various contexts.
+
+=== Knative Action
+
+The `xj-identity-action` Kamelet can be used as intermediate step in a Knative binding.
+
+.xj-identity-action-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: xj-identity-action-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: timer-source
+    properties:
+      message: "Hello"
+  steps:
+  - ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: xj-identity-action
+    properties:
+      direction: "The Direction"
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+
+----
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `xj-identity-action-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the action using the following command:
+
+[source,shell]
+----
+kubectl apply -f xj-identity-action-binding.yaml
+----
+
+==== *Binding to Knative using the Kamel CLI:*
+
+The procedure described above can be simplified into a single execution of the `kamel bind` command:
+
+[source,shell]
+----
+kamel bind timer-source?message=Hello --step xj-identity-action -p "step-0.direction=The Direction" channel/mychannel
+----
+
+This will create the KameletBinding under the hood and apply it to the current namespace in the cluster.
+
+=== Kafka Action
+
+The `xj-identity-action` Kamelet can be used as intermediate step in a Kafka binding.
+
+.xj-identity-action-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: xj-identity-action-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: timer-source
+    properties:
+      message: "Hello"
+  steps:
+  - ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: xj-identity-action
+    properties:
+      direction: "The Direction"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+
+----
+
+Ensure that you've installed https://strimzi.io/[Strimzi] and created a topic named `my-topic` in the current namespace.
+Make also sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `xj-identity-action-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the action using the following command:
+
+[source,shell]
+----
+kubectl apply -f xj-identity-action-binding.yaml
+----
+
+==== *Binding to Kafka using the Kamel CLI:*
+
+The procedure described above can be simplified into a single execution of the `kamel bind` command:
+
+[source,shell]
+----
+kamel bind timer-source?message=Hello --step xj-identity-action -p "step-0.direction=The Direction" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+----
+
+This will create the KameletBinding under the hood and apply it to the current namespace in the cluster.
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

[camel-kamelets] 03/06: Added XJ Identity Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a12bd251c1b7f2a80a39da7da3f3e3f4076cf806
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Aug 30 13:37:53 2021 +0200

    Added XJ Identity Action Kamelet
---
 .../src/main/resources/kamelets/xj-identity-action.kamelet.yaml       | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/xj-identity-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/xj-identity-action.kamelet.yaml
index 3e7f30e..fe9d244 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/xj-identity-action.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/xj-identity-action.kamelet.yaml
@@ -14,9 +14,7 @@ spec:
   definition:
     title: "XJ Identity Action"
     description: |-
-      Apply the XJ Identity Transformation. 
-      
-      There two possible direction of the transformation, from JSON to XML or from XML to JSON.
+      Apply the XJ Identity Transformation to transform JSON to XML and XML to JSON. 
     required:
       - direction
     type: object