You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by mr...@apache.org on 2018/03/28 17:53:48 UTC

[incubator-openwhisk-wskdeploy] branch master updated: Updated documentation and examples to use the new packages syntax (#827)

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

mrutkowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new 9890b17  Updated documentation and examples to use the new packages syntax (#827)
9890b17 is described below

commit 9890b1715ceb9df139892229e888b3b80c003895
Author: Bruno Girin <br...@gmail.com>
AuthorDate: Wed Mar 28 18:53:45 2018 +0100

    Updated documentation and examples to use the new packages syntax (#827)
    
    * #826 Updated documentation and examples to use the new packages syntax
    
    * #826 Fix for hello_world_typed_parms file
---
 ...deployment_hello_world_triggerrule_unbound.yaml |  2 +-
 docs/examples/manifest_hello_world.yaml            | 14 ++---
 .../manifest_hello_world_advanced_parms.yaml       | 62 +++++++++----------
 .../manifest_hello_world_env_var_parms.yaml        | 26 ++++----
 .../examples/manifest_hello_world_fixed_parms.yaml | 20 +++----
 docs/examples/manifest_hello_world_runtime.yaml    | 16 ++---
 .../examples/manifest_hello_world_triggerrule.yaml | 52 ++++++++--------
 .../manifest_hello_world_triggerrule_unbound.yaml  | 52 ++++++++--------
 .../examples/manifest_hello_world_typed_parms.yaml | 30 +++++-----
 docs/examples/manifest_sequence_basic.yaml         | 70 +++++++++++-----------
 docs/wskdeploy_action_advanced_parms.md            | 62 +++++++++----------
 docs/wskdeploy_action_env_var_parms.md             | 20 +++----
 docs/wskdeploy_action_fixed_parms.md               | 20 +++----
 docs/wskdeploy_action_helloworld.md                | 14 ++---
 docs/wskdeploy_action_runtime.md                   | 16 ++---
 docs/wskdeploy_action_typed_parms.md               | 28 ++++-----
 16 files changed, 252 insertions(+), 252 deletions(-)

diff --git a/docs/examples/deployment_hello_world_triggerrule_unbound.yaml b/docs/examples/deployment_hello_world_triggerrule_unbound.yaml
index a6d36b8..0c05e78 100644
--- a/docs/examples/deployment_hello_world_triggerrule_unbound.yaml
+++ b/docs/examples/deployment_hello_world_triggerrule_unbound.yaml
@@ -15,7 +15,7 @@
 #
 
 project:
-  package:
+  packages:
     hello_world_package:
       triggers:
         meetPerson:
diff --git a/docs/examples/manifest_hello_world.yaml b/docs/examples/manifest_hello_world.yaml
index 2ae051b..5c6842a 100644
--- a/docs/examples/manifest_hello_world.yaml
+++ b/docs/examples/manifest_hello_world.yaml
@@ -15,10 +15,10 @@
 #
 
 # Example: Basic Hello World using a NodeJS (JavaScript) action
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world:
-      function: src/hello.js
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world:
+        function: src/hello.js
diff --git a/docs/examples/manifest_hello_world_advanced_parms.yaml b/docs/examples/manifest_hello_world_advanced_parms.yaml
index 7923527..6bbef87 100644
--- a/docs/examples/manifest_hello_world_advanced_parms.yaml
+++ b/docs/examples/manifest_hello_world_advanced_parms.yaml
@@ -15,34 +15,34 @@
 #
 
 # Example: input and output parameters with advanced fields
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_advanced_parms:
-      function: src/hello_plus.js
-      inputs:
-        name:
-          type: string
-          description: name of person
-          default: unknown person
-        place:
-          type: string
-          description: location of person
-          value: the Shire
-        children:
-          type: integer
-          description: Number of children
-          default: 0
-        height:
-          type: float
-          description: height in meters
-          default: 0.0
-      outputs:
-        greeting:
-          type: string
-          description: greeting string
-        details:
-          type: string
-          description: detailed information about the person
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_advanced_parms:
+        function: src/hello_plus.js
+        inputs:
+          name:
+            type: string
+            description: name of person
+            default: unknown person
+          place:
+            type: string
+            description: location of person
+            value: the Shire
+          children:
+            type: integer
+            description: Number of children
+            default: 0
+          height:
+            type: float
+            description: height in meters
+            default: 0.0
+        outputs:
+          greeting:
+            type: string
+            description: greeting string
+          details:
+            type: string
+            description: detailed information about the person
diff --git a/docs/examples/manifest_hello_world_env_var_parms.yaml b/docs/examples/manifest_hello_world_env_var_parms.yaml
index 97dcaf1..6700e47 100644
--- a/docs/examples/manifest_hello_world_env_var_parms.yaml
+++ b/docs/examples/manifest_hello_world_env_var_parms.yaml
@@ -15,16 +15,16 @@
 #
 
 # Example: “Hello world” with input values set from environment variables
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_env_var_parms:
-      function: src/hello.js
-      inputs:
-        name: $FIRSTNAME
-        place:
-          value: ${TOWN}, ${COUNTRY}
-      outputs:
-        greeting: string
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_env_var_parms:
+        function: src/hello.js
+        inputs:
+          name: $FIRSTNAME
+          place:
+            value: ${TOWN}, ${COUNTRY}
+        outputs:
+          greeting: string
diff --git a/docs/examples/manifest_hello_world_fixed_parms.yaml b/docs/examples/manifest_hello_world_fixed_parms.yaml
index 58d6fc7..9d74307 100644
--- a/docs/examples/manifest_hello_world_fixed_parms.yaml
+++ b/docs/examples/manifest_hello_world_fixed_parms.yaml
@@ -15,13 +15,13 @@
 #
 
 # Example: “Hello world” with fixed input values for ‘name’ and ‘place’
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_fixed_parms:
-      function: src/hello.js
-      inputs:
-        name: Sam
-        place: the Shire
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_fixed_parms:
+        function: src/hello.js
+        inputs:
+          name: Sam
+          place: the Shire
diff --git a/docs/examples/manifest_hello_world_runtime.yaml b/docs/examples/manifest_hello_world_runtime.yaml
index 537eeac..cfd8a04 100644
--- a/docs/examples/manifest_hello_world_runtime.yaml
+++ b/docs/examples/manifest_hello_world_runtime.yaml
@@ -15,11 +15,11 @@
 #
 
 # Example: explicit selection of the NodeJS version 6 runtime
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_runtime:
-      function: src/hello.js
-      runtime: nodejs@6
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_runtime:
+        function: src/hello.js
+        runtime: nodejs@6
diff --git a/docs/examples/manifest_hello_world_triggerrule.yaml b/docs/examples/manifest_hello_world_triggerrule.yaml
index 189b3ca..b7516e7 100644
--- a/docs/examples/manifest_hello_world_triggerrule.yaml
+++ b/docs/examples/manifest_hello_world_triggerrule.yaml
@@ -14,31 +14,31 @@
 # specific language governing permissions and limitations under the License.
 #
 
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_triggerrule:
-      function: src/hello_plus.js
-      inputs:
-        name: string
-        place: string
-        children: integer
-        height: float
-      outputs:
-        greeting: string
-        details: string
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_triggerrule:
+        function: src/hello_plus.js
+        inputs:
+          name: string
+          place: string
+          children: integer
+          height: float
+        outputs:
+          greeting: string
+          details: string
 
-  triggers:
-    meetPerson:
-      inputs:
-        name: Sam
-        place: the Shire
-        children: 13
-        height: 1.2
+    triggers:
+      meetPerson:
+        inputs:
+          name: Sam
+          place: the Shire
+          children: 13
+          height: 1.2
 
-  rules:
-    meetPersonRule:
-      trigger: meetPerson
-      action: hello_world_triggerrule
+    rules:
+      meetPersonRule:
+        trigger: meetPerson
+        action: hello_world_triggerrule
diff --git a/docs/examples/manifest_hello_world_triggerrule_unbound.yaml b/docs/examples/manifest_hello_world_triggerrule_unbound.yaml
index d0c5f3f..8d3671b 100644
--- a/docs/examples/manifest_hello_world_triggerrule_unbound.yaml
+++ b/docs/examples/manifest_hello_world_triggerrule_unbound.yaml
@@ -14,31 +14,31 @@
 # specific language governing permissions and limitations under the License.
 #
 
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_triggerrule:
-      function: src/hello_plus.js
-      inputs:
-        name: string
-        place: string
-        children: integer
-        height: float
-      outputs:
-        greeting: string
-        details: string
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_triggerrule:
+        function: src/hello_plus.js
+        inputs:
+          name: string
+          place: string
+          children: integer
+          height: float
+        outputs:
+          greeting: string
+          details: string
 
-  triggers:
-    meetPerson:
-      inputs:
-        name: string
-        place: string
-        children: integer
-        height: float
+    triggers:
+      meetPerson:
+        inputs:
+          name: string
+          place: string
+          children: integer
+          height: float
 
-  rules:
-    meetPersonRule:
-      trigger: meetPerson
-      action: hello_world_triggerrule
+    rules:
+      meetPersonRule:
+        trigger: meetPerson
+        action: hello_world_triggerrule
diff --git a/docs/examples/manifest_hello_world_typed_parms.yaml b/docs/examples/manifest_hello_world_typed_parms.yaml
index ac4880c..65033b3 100644
--- a/docs/examples/manifest_hello_world_typed_parms.yaml
+++ b/docs/examples/manifest_hello_world_typed_parms.yaml
@@ -15,18 +15,18 @@
 #
 
 # Example: “Hello world” with typed input and output parameter declarations
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_typed_parms:
-      function: src/hello_plus.js
-      inputs:
-        name: string
-        place: string
-        children: integer
-        height: float
-      outputs:
-        greeting: string
-        details: string
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_typed_parms:
+        function: src/hello_plus.js
+        inputs:
+          name: string
+          place: string
+          children: integer
+          height: float
+        outputs:
+          greeting: string
+          details: string
diff --git a/docs/examples/manifest_sequence_basic.yaml b/docs/examples/manifest_sequence_basic.yaml
index 2d63bf8..0c67001 100644
--- a/docs/examples/manifest_sequence_basic.yaml
+++ b/docs/examples/manifest_sequence_basic.yaml
@@ -15,38 +15,38 @@
 #
 
 # Example: processing data in a sequence
-package:
-  name: fellowship_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    member_join:
-      function: src/member_join.js
-      inputs:
-        name:
-          type: string
-          description: name of person
-          default: unknown
-        place:
-          type: string
-          description: location of person
-          default: unknown
-        job:
-          type: string
-          description: current occupation
-          default: 0
-      outputs:
-        member:
-          type: json
-          description: member record
-    member_process:
-      function: src/member_process.js
-      inputs:
-        member: {}
-    member_equip:
-      function: src/member_equip.js
-      inputs:
-        member: {}
-  sequences:
-    fellowship_membership:
-      actions: member_join, member_process, member_equip
+packages:
+  fellowship_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      member_join:
+        function: src/member_join.js
+        inputs:
+          name:
+            type: string
+            description: name of person
+            default: unknown
+          place:
+            type: string
+            description: location of person
+            default: unknown
+          job:
+            type: string
+            description: current occupation
+            default: 0
+        outputs:
+          member:
+            type: json
+            description: member record
+      member_process:
+        function: src/member_process.js
+        inputs:
+          member: {}
+      member_equip:
+        function: src/member_equip.js
+        inputs:
+          member: {}
+    sequences:
+      fellowship_membership:
+        actions: member_join, member_process, member_equip
diff --git a/docs/wskdeploy_action_advanced_parms.md b/docs/wskdeploy_action_advanced_parms.md
index 7f54c01..218205d 100644
--- a/docs/wskdeploy_action_advanced_parms.md
+++ b/docs/wskdeploy_action_advanced_parms.md
@@ -30,37 +30,37 @@ If we want to do more than declare the type (i.e., ‘string’, ‘integer’,
 
 #### _Example: input and output parameters with explicit types and descriptions_
 ```yaml
-package:
-  name: hello_world_package
-  ... # Package keys omitted for brevity
-  actions:
-    hello_world_advanced_parms:
-      function: src/hello_plus.js
-      runtime: nodejs@6
-      inputs:
-        name:
-          type: string
-          description: name of person
-          default: unknown person
-        place:
-          type: string
-          description: location of person
-          value: the Shire
-        children:
-          type: integer
-          description: Number of children
-          default: 0
-        height:
-          type: float
-          description: height in meters
-          default: 0.0
-      outputs:
-        greeting:
-          type: string
-          description: greeting string
-        details:
-          type: string
-          description: detailed information about the person
+packages:
+  hello_world_package:
+    ... # Package keys omitted for brevity
+    actions:
+      hello_world_advanced_parms:
+        function: src/hello_plus.js
+        runtime: nodejs@6
+        inputs:
+          name:
+            type: string
+            description: name of person
+            default: unknown person
+          place:
+            type: string
+            description: location of person
+            value: the Shire
+          children:
+            type: integer
+            description: Number of children
+            default: 0
+          height:
+            type: float
+            description: height in meters
+            default: 0.0
+        outputs:
+          greeting:
+            type: string
+            description: greeting string
+          details:
+            type: string
+            description: detailed information about the person
 ```
 
 ### Deploying
diff --git a/docs/wskdeploy_action_env_var_parms.md b/docs/wskdeploy_action_env_var_parms.md
index 3126b15..d2c946c 100644
--- a/docs/wskdeploy_action_env_var_parms.md
+++ b/docs/wskdeploy_action_env_var_parms.md
@@ -31,16 +31,16 @@ It shows how to:
 ### Manifest File
 #### _Example: “Hello world” with input values set from environment variables_
 ```yaml
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_env_var_parms:
-      function: src/hello.js
-      inputs:
-        name: $FIRSTNAME
-        place: ${TOWN}, ${COUNTRY}
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_env_var_parms:
+        function: src/hello.js
+        inputs:
+          name: $FIRSTNAME
+          place: ${TOWN}, ${COUNTRY}
 ```
 
 ### Deploying
diff --git a/docs/wskdeploy_action_fixed_parms.md b/docs/wskdeploy_action_fixed_parms.md
index 81021ca..79b2c07 100644
--- a/docs/wskdeploy_action_fixed_parms.md
+++ b/docs/wskdeploy_action_fixed_parms.md
@@ -29,16 +29,16 @@ It shows how to:
 ### Manifest File
 #### _Example: “Hello world” with fixed input values for ‘name’ and ‘place’_
 ```yaml
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_fixed_parms:
-      function: src/hello.js
-      inputs:
-        name: Sam
-        place: the Shire
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_fixed_parms:
+        function: src/hello.js
+        inputs:
+          name: Sam
+          place: the Shire
 ```
 
 ### Deploying
diff --git a/docs/wskdeploy_action_helloworld.md b/docs/wskdeploy_action_helloworld.md
index c167f74..624ef5e 100644
--- a/docs/wskdeploy_action_helloworld.md
+++ b/docs/wskdeploy_action_helloworld.md
@@ -29,13 +29,13 @@ It shows how to:
 ### Manifest file
 #### _Example: “Hello world” using a NodeJS (JavaScript) action_
 ```yaml
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world:
-      function: src/hello.js
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world:
+        function: src/hello.js
 ```
 
 where "hello.js", within the package-relative subdirectory named ‘src’, contains the following JavaScript code:
diff --git a/docs/wskdeploy_action_runtime.md b/docs/wskdeploy_action_runtime.md
index 3baff1a..c70fa25 100644
--- a/docs/wskdeploy_action_runtime.md
+++ b/docs/wskdeploy_action_runtime.md
@@ -30,14 +30,14 @@ This example shows how to:
 ### Manifest file
 #### _Example: explicit selection of the NodeJS version 6 runtime_
 ```yaml
-package:
-  name: hello_world_package
-  version: 1.0
-  license: Apache-2.0
-  actions:
-    hello_world_runtime:
-      function: src/hello.js
-      runtime: nodejs@6
+packages:
+  hello_world_package:
+    version: 1.0
+    license: Apache-2.0
+    actions:
+      hello_world_runtime:
+        function: src/hello.js
+        runtime: nodejs@6
 ```
 
 ### Deploying
diff --git a/docs/wskdeploy_action_typed_parms.md b/docs/wskdeploy_action_typed_parms.md
index 0a9d710..403d51b 100644
--- a/docs/wskdeploy_action_typed_parms.md
+++ b/docs/wskdeploy_action_typed_parms.md
@@ -32,20 +32,20 @@ It shows how to:
 ### Manifest File
 #### _Example: 'Hello world' with typed input and output parameter declarations_
 ```yaml
-package:
-  name: hello_world_package
-  ... # Package keys omitted for brevity
-  actions:
-    hello_world_typed_parms:
-      function: src/hello_plus.js
-      inputs:
-        name: string
-        place: string
-        children: integer
-        height: float
-      outputs:
-        greeting: string
-        details: string
+packages:
+  hello_world_package:
+    ... # Package keys omitted for brevity
+    actions:
+      hello_world_typed_parms:
+        function: src/hello_plus.js
+        inputs:
+          name: string
+          place: string
+          children: integer
+          height: float
+        outputs:
+          greeting: string
+          details: string
 ```
 where the function '```hello_plus.js```', within the package-relative subdirectory named ‘```src```’, is updated to use the new parameters:
 ```javascript

-- 
To stop receiving notification emails like this one, please contact
mrutkowski@apache.org.