diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-03-13 12:13:38 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-03-13 12:18:20 +0530 |
commit | 1239610d64ddfce2e3d1ff3378adcf96f24ee0a0 (patch) | |
tree | 8d520f92f0919c2fa041d3537daabe516441a7d1 | |
parent | 5a18f1efac8d6fdebdefe7ba5870d1892bd26ac8 (diff) |
DOC: Batching support
Issue-ID: CLI-93
Change-Id: If5a477782d381836ed97c67fcd88373db1549bde
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r-- | docs/user_guide.rst | 23 | ||||
-rw-r--r-- | profiles/http/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 519364dc..f4bde4b7 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -88,6 +88,29 @@ NOTE: Use the directive 'set' for setting the values for parameters and 'unset' In Beijing release, new default profile named as 'onap-beijing' is delivered with all default ONAP service credentials. so user could use this profile to avoid setting the credentials every time. +Batching support & Parameter file +--------------------------------- +For a given scenario where, user wants to run a command with different set of inputs, this feature could be used. + +For example, in ONAP, user wants to register multiple clouds at a given time, so user can create a parameter file +as given below and capture inputs for one or more clouds: + +parameter file name: /usr/mrkanag/cloud-list.yaml + +cloud-1: + - name: cloud-region-1 + - description: Provides the test cloud environment +cloud-2: + - name: cloud-region-2 + - description: Provides the production cloud environment + +To register all these clouds in ONAP execute the cloud-register command with parameter file in inputs as below: + +onap -p /usr/mrkanag/cloud-list.yaml cloud-register + +Now OCLIP will iterate the command cloud-register for every cloud mentioned in the parameter file /usr/mrkanag/cloud-list.yaml. +When user use this approach to execute the command with multiple entries in parameter file is called as *batching*. + Help ---- *oclip [-h|--help]* diff --git a/profiles/http/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml b/profiles/http/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml index 3120f93e..f7da6da2 100644 --- a/profiles/http/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml +++ b/profiles/http/src/test/resources/open-cli-schema/sample-test1-schema-http.yaml @@ -76,7 +76,7 @@ http: body: '{"name":"${name}","vendor":"${vendor}","version":"${vim-version}","description":"${description}","type":"${type}","url":"${url}","userName":"${username}","password":"${password}","domain":"${domain}","tenant":"${tenant}"}' headers: context: - - remove_empty_node: true + remove_empty_node: true success_codes: - 201 - 200 |