From 7e3a522d47e39aea335a447c439d1fc831dd46a5 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Fri, 30 Mar 2018 10:13:43 +0530 Subject: Update docs for beijing Issue-ID: CLI-100 Change-Id: I51a719419c5e06e7be2c9ebac29e9d696ea19473 Signed-off-by: Kanagaraj Manickam k00365106 --- docs/open_cli_schema_version_1_0.rst | 49 +++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 23 deletions(-) (limited to 'docs/open_cli_schema_version_1_0.rst') diff --git a/docs/open_cli_schema_version_1_0.rst b/docs/open_cli_schema_version_1_0.rst index 15bfe201..92547b98 100644 --- a/docs/open_cli_schema_version_1_0.rst +++ b/docs/open_cli_schema_version_1_0.rst @@ -12,22 +12,20 @@ Linux Commands for any given software products, by using YAML template based on the schematics defined in this document. In version 1.0, following aspects of commands are modeled as YAML schematics: -* Basic Command information +* Software product/service information * Command line arguments * Command outputs -* Software product information +* Command execution details like HTTP, SNMP (profiles) -* REST API details - -* Command usage +* Command usage and samples open_cli_schema_version ----------------------- OCLIP considers any YAML file with first line having the following entry -as proper template. +as OCS template. open_cli_schema_version: 1.0 @@ -592,6 +590,12 @@ A sample attribute for service-status could be: **scope: short** +default_value +^^^^^^^^^^^^^ +In some scenarios, author can set the default value to attribute which OCLIP assigns, +when the value for that attribute is not available from back-end service in product. + + http ---- OCLIP is enhanced to support REST API based products and *http* section is @@ -812,26 +816,25 @@ the service status and assign to result *attribute* service_status as : Here, $b is detailed in section 'macros' of this document. and '$.service_status' is jpath expression. -sample_response -~~~~~~~~~~~~~~~ -This entry allows to keep the sample HTTP response as reference to understand -the result_map jpath expressions. OCLIP does not use this entry and is optional. - macros ------- OCLIP platform provides various marcos to fill *http* entries with the value of *parameters*, *headers* , etc Every macro is in the form of followed by {}Followings are the supported macros: -+----------------+------------------------------------------------------------+ -| Macro | Definitions | -+================+============================================================+ -| ${param-name} | To retrieve the value from parameter named 'param-name' | -+----------------+------------------------------------------------------------+ -| $h{header-name}| To retrieve the value from header named 'header-name' | -+----------------+------------------------------------------------------------+ -| $q{query-name} | To retrieve the value from query named 'query-name' | -+----------------+------------------------------------------------------------+ -| $b{jpath} | To retrieve the value from response body using the 'jpath' | -| | expression. | -+----------------+------------------------------------------------------------+ ++------------------+------------------------------------------------------------+ +| Macro | Definitions | ++==================+============================================================+ +| ${param-name} | To retrieve the value from parameter named 'param-name' | ++------------------+------------------------------------------------------------+ +| $s{env:env-name} | To retrieve the value from environment variable 'env-name' | ++------------------+------------------------------------------------------------+ +| $s{uuid} | To set the value in uuid4 format | ++------------------+------------------------------------------------------------+ +| $h{header-name} | To retrieve the value from header named 'header-name' | ++------------------+------------------------------------------------------------+ +| $q{query-name} | To retrieve the value from query named 'query-name' | ++------------------+------------------------------------------------------------+ +| $b{jpath} | To retrieve the value from response body using the 'jpath' | +| | expression. | ++------------------+------------------------------------------------------------+ -- cgit 1.2.3-korg