aboutsummaryrefslogtreecommitdiffstats
path: root/docs/developer_guide.rst
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-10-16 13:55:50 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-10-16 13:55:50 +0530
commit6b8a853b2ceccf79c952b2bc0b89da545b5cc6dd (patch)
tree6e543d7ccbaeafc2a79767ff018c7a4e00395142 /docs/developer_guide.rst
parentdd0f4438e8dea6ef68a043488545e3efcb3fa78a (diff)
Add sample yaml
CLI-40 Change-Id: I60758eed0d4bfca59a407a9acc4636bb51827895 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'docs/developer_guide.rst')
-rw-r--r--docs/developer_guide.rst53
1 files changed, 52 insertions, 1 deletions
diff --git a/docs/developer_guide.rst b/docs/developer_guide.rst
index e345e624..2e2278e5 100644
--- a/docs/developer_guide.rst
+++ b/docs/developer_guide.rst
@@ -87,6 +87,57 @@ Follow the steps below to implement new commands in ONAP using YAML:
#. Use the command 'onap schema-validate' to validate the YAML before testing its functionality.
-#. Run 'onap schema-refresh' command to take the new YAML file. We recommed validating the YAML before running this command.
+#. Run 'onap schema-refresh' command to take the new YAML file. We recommended validating the YAML before running this command.
#. To test this command, run the command 'onap CMD-NAME --help'.
+
+Sample YAML
+~~~~~~~~~~~~
+
+Find more details about YAML specification at :ref:`open_cli_schema_version_1_0`.
+
+Sample hello-world YAML ::
+
+ open_cli_schema_version: 1.0
+
+ name: hello-world-http
+
+ description: First cmd hello world using http running under lighttpd in cli at http://<cli-ip>:8080/version.json
+
+ version: sample-1.0
+
+ service:
+ name: sample-service
+ version: 1.0.0
+ auth: none
+ mode: direct
+
+ parameters:
+ - name: name
+ description: name of the person
+ long_option: name
+ short_option: b
+ default_value: ${DEMO_NAME}
+ type: string
+ is_optional: false
+
+ results:
+ direction: landscape
+ attributes:
+ - name: output
+ description: hello world output
+ type: string
+ scope: short
+
+ http:
+ request:
+ uri: /version.json
+ method: GET
+ success_codes:
+ - 200
+ - 201
+ result_map:
+ output: Hello ${name}, You are running on $b{$.name} $b{$.version}
+
+ sample_response:
+ body: {"name": "oclip", "version": "1.0"}