You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/28 17:53:47 UTC

[GitHub] mrutkows closed pull request #827: Updated documentation and examples to use the new packages syntax

mrutkows closed pull request #827: Updated documentation and examples to use the new packages syntax
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/827
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/examples/deployment_hello_world_triggerrule_unbound.yaml b/docs/examples/deployment_hello_world_triggerrule_unbound.yaml
index a6d36b81..0c05e78e 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 2ae051b5..5c6842aa 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 79235276..6bbef87e 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 97dcaf18..6700e471 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 58d6fc78..9d743076 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 537eeac8..cfd8a04f 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 189b3ca0..b7516e7e 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 d0c5f3f0..8d3671b7 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 ac4880cc..65033b30 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 2d63bf8b..0c670016 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 7f54c01d..218205d7 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 3126b158..d2c946cf 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 81021cae..79b2c07f 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 c167f74a..624ef5e6 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 3baff1a4..c70fa25d 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 0a9d7102..403d51b4 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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services