aboutsummaryrefslogtreecommitdiffstats
path: root/docs/developer_guide.rst
diff options
context:
space:
mode:
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"}