diff options
4 files changed, 139 insertions, 485 deletions
diff --git a/docs/cmd_help.rst b/docs/cmd_help.rst index cf912c84..d5f69024 100644 --- a/docs/cmd_help.rst +++ b/docs/cmd_help.rst @@ -11,6 +11,7 @@ open-cli ========================== + [1] schema-refresh ----------------------------------------------- diff --git a/docs/cmd_help_onap_amsterdam.rst b/docs/cmd_help_onap_amsterdam.rst index 873d9694..f71191cc 100644 --- a/docs/cmd_help_onap_amsterdam.rst +++ b/docs/cmd_help_onap_amsterdam.rst @@ -9,353 +9,6 @@ .. _cli_cmd_help: -open-cli -========================== - - -[1] basic-login ------------------------------------------------ - - -usage: oclip basic-login - -basic login auth command - -Product: open-cli -Service: basic-auth -Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com - -Options:: - - [-m | --host-url] [-C | --no-catalog] [-h | --help] - [-f | --format] [-t | --no-title] [-V | --verify] - [-v | --version] [-d | --debug] [-s | --long] - [-D | --context] [-u | --host-username] [-p | --host-password] - -where:: - - -m | --host-url host url in http(s). It is of type URL. By - default, it is read from environment variable - OPEN_CLI_HOST_URL. - -C | --no-catalog whether to use given host-url directly without - looking into catalog, it will overrid the - service->mode. It is of type BOOL. It is - optional. - -h | --help print help message. It is of type BOOL. - -f | --format Output formats, supported formats such as table, - csv, json, yaml. It is of type STRING. - -t | --no-title whether to print title or not. It is of type BOOL. - -V | --verify verify the command using available command sample - file and mocking file. By default it goes with - mock style. To enable the verification in real - time, set DISABLE_MOCKING=true in the context - param. It is of type BOOL. It is optional. - -v | --version print service version. It is of type BOOL. - -d | --debug Enable debug output. It is of type BOOL. - -s | --long whether to print all attributes or only short - attributes. It is of type BOOL. - -D | --context command context. It is of type MAP. It is - optional. - -u | --host-username Host user name. It is of type STRING. By default, - it is read from environment variable - OPEN_CLI_HOST_USERNAME. - -p | --host-password Host user password. It is of type STRING. By - default, it is read from environment variable - OPEN_CLI_HOST_PASSWORD. Secured. - - -Results:: - - Authorization Authorization and is of type STRING. - - -Error:: - - On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE> - - - -[2] basic-logout ------------------------------------------------ - - -usage: oclip basic-logout - -basic logout auth command - -Product: open-cli -Service: basic-auth -Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com - -Options:: - - [-m | --host-url] [-C | --no-catalog] [-h | --help] - [-f | --format] [-t | --no-title] [-V | --verify] - [-v | --version] [-d | --debug] [-s | --long] - [-D | --context] - -where:: - - -m | --host-url host url in http(s). It is of type URL. By - default, it is read from environment variable - OPEN_CLI_HOST_URL. - -C | --no-catalog whether to use given host-url directly without - looking into catalog, it will overrid the - service->mode. It is of type BOOL. It is - optional. - -h | --help print help message. It is of type BOOL. - -f | --format Output formats, supported formats such as table, - csv, json, yaml. It is of type STRING. - -t | --no-title whether to print title or not. It is of type BOOL. - -V | --verify verify the command using available command sample - file and mocking file. By default it goes with - mock style. To enable the verification in real - time, set DISABLE_MOCKING=true in the context - param. It is of type BOOL. It is optional. - -v | --version print service version. It is of type BOOL. - -d | --debug Enable debug output. It is of type BOOL. - -s | --long whether to print all attributes or only short - attributes. It is of type BOOL. - -D | --context command context. It is of type MAP. It is - optional. - - -Error:: - - On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE> - - - -[3] catalog ------------------------------------------------ - - -usage: oclip catalog - -cli catalog command to find the base path for service. - -Product: open-cli -Service: catalog -Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com - -Options:: - - [-m | --host-url] [-C | --no-catalog] [-l | --catalog-service-name] - [-h | --help] [-f | --format] [-t | --no-title] - [-V | --verify] [-v | --version] [-d | --debug] - [-s | --long] [-D | --context] [-i | --catalog-service-version] - -where:: - - -m | --host-url host url in http(s). It is of type URL. By - default, it is read from environment variable - OPEN_CLI_HOST_URL. - -C | --no-catalog whether to use given host-url directly without - looking into catalog, it will overrid the - service->mode. It is of type BOOL. It is - optional. - -l | --catalog-service-name service name registered in catalog service. It is - of type STRING. By default, it is . - -h | --help print help message. It is of type BOOL. - -f | --format Output formats, supported formats such as table, - csv, json, yaml. It is of type STRING. - -t | --no-title whether to print title or not. It is of type BOOL. - -V | --verify verify the command using available command sample - file and mocking file. By default it goes with - mock style. To enable the verification in real - time, set DISABLE_MOCKING=true in the context - param. It is of type BOOL. It is optional. - -v | --version print service version. It is of type BOOL. - -d | --debug Enable debug output. It is of type BOOL. - -s | --long whether to print all attributes or only short - attributes. It is of type BOOL. - -D | --context command context. It is of type MAP. It is - optional. - -i | --catalog-service-version service version registered in catalog service. It - is of type STRING. By default, it is . - - -Results:: - - catalog-service-host-url Service connection url and is of type STRING. - catalog-service-base-path service base path, to append with host-url for - connecting the service. and is of type STRING. - - -Error:: - - On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE> - - - -[4] sample-test-verify ------------------------------------------------ - - -usage: oclip sample-test-verify - -Oclip sample command to test the command features - -Product: open-cli -Service: test -Author: null - -Options:: - - [-m | --host-url] [-C | --no-catalog] [-h | --help] - [-f | --format] [-t | --no-title] [-V | --verify] - [-v | --version] [-d | --debug] [-s | --long] - [-D | --context] [-u | --host-username] [-a | --no-auth] - [-p | --host-password] - -where:: - - -m | --host-url host url in http(s). It is of type URL. By - default, it is read from environment variable - OPEN_CLI_HOST_URL. - -C | --no-catalog whether to use given host-url directly without - looking into catalog, it will overrid the - service->mode. It is of type BOOL. It is - optional. - -h | --help print help message. It is of type BOOL. - -f | --format Output formats, supported formats such as table, - csv, json, yaml. It is of type STRING. - -t | --no-title whether to print title or not. It is of type BOOL. - -V | --verify verify the command using available command sample - file and mocking file. By default it goes with - mock style. To enable the verification in real - time, set DISABLE_MOCKING=true in the context - param. It is of type BOOL. It is optional. - -v | --version print service version. It is of type BOOL. - -d | --debug Enable debug output. It is of type BOOL. - -s | --long whether to print all attributes or only short - attributes. It is of type BOOL. - -D | --context command context. It is of type MAP. It is - optional. - -u | --host-username Host user name. It is of type STRING. By default, - it is read from environment variable - OPEN_CLI_HOST_USERNAME. - -a | --no-auth whether to authenticate user or not. It is of - type BOOL. - -p | --host-password Host user password. It is of type STRING. By - default, it is read from environment variable - OPEN_CLI_HOST_PASSWORD. Secured. - - -Results:: - - cloud Onap cloud and is of type STRING. - region Onap cloud region and is of type STRING. - tenant Onap cloud tenat and is of type STRING. - tenant-id Onap cloud tenat id and is of type STRING. - customer Onap cloud customer and is of type STRING. - service Onap cloud service and is of type STRING. - resource-version Onap cloud resource version and is of type STRING. - - -Error:: - - On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE> - - - -[5] schema-refresh ------------------------------------------------ - - -usage: oclip schema-refresh - -Oclip command to refresh schemas stored in open-cli-schema folders. - -Product: open-cli -Service: schema -Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com - -Options:: - - [-s | --long] [-D | --context] [-h | --help] - [-f | --format] [-t | --no-title] [-v | --version] - [-d | --debug] - -where:: - - -s | --long whether to print all attributes or only short - attributes. It is of type BOOL. - -D | --context command context. It is of type MAP. It is - optional. - -h | --help print help message. It is of type BOOL. - -f | --format Output formats, supported formats such as table, - csv, json, yaml. It is of type STRING. - -t | --no-title whether to print title or not. It is of type BOOL. - -v | --version print service version. It is of type BOOL. - -d | --debug Enable debug output. It is of type BOOL. - - -Results:: - - sr.no Serial Number and is of type STRING. - command Command name and is of type STRING. - product Command product version and is of type STRING. - schema Schema name and is of type STRING. - ocs-version Schema version and is of type STRING. - type Command type and is of type STRING. - - -Error:: - - On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE> - - - -[6] schema-validate ------------------------------------------------ - - -usage: oclip schema-validate - -Oclip command to validate schema - -Product: open-cli -Service: schema -Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com - -Options:: - - [-s | --long] [-D | --context] [-h | --help] - [-f | --format] [-t | --no-title] [-b | --ocs-version] - [-v | --version] [-d | --debug] [-l | --schema-location] - [-i | --internal-schema] - -where:: - - -s | --long whether to print all attributes or only short - attributes. It is of type BOOL. - -D | --context command context. It is of type MAP. It is - optional. - -h | --help print help message. It is of type BOOL. - -f | --format Output formats, supported formats such as table, - csv, json, yaml. It is of type STRING. - -t | --no-title whether to print title or not. It is of type BOOL. - -b | --ocs-version OCS version. It is of type STRING. It is optional. - -v | --version print service version. It is of type BOOL. - -d | --debug Enable debug output. It is of type BOOL. - -l | --schema-location Schema file location. It is of type URL. By - default, it is . - -i | --internal-schema Validate existing schema file. It is of type BOOL. - - -Results:: - - sl-no Serial Number of error and is of type STRING. - error Schema validation error and is of type STRING. - - -Error:: - - On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE> - - - onap-amsterdam ========================== diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/search/generic-search-schema.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/search/generic-search-schema.yaml index f4bb2f33..f719f6e6 100644 --- a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/search/generic-search-schema.yaml +++ b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/search/generic-search-schema.yaml @@ -1,75 +1,75 @@ -# Copyright 2018 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-open_cli_schema_version: 1.0
-name: generic-search
-description: generic-search
-#sample: https://172.19.44.123:8443/aai/v11/search/generic-query?key=customer.global-customer-id:Orange&include=all&start-node-type=customer&depth=6
-
-info:
- product: onap-beijing
- service: aai
- author: ONAP CLI Team onap-discuss@lists.onap.org
-
-parameters:
- - name: key
- description: key
- type: string
- short_option: k
- long_option: key
- is_optional: false
- - name: value
- description: value
- type: string
- short_option: z
- long_option: value
- is_optional: false
- - name: start-node-type
- description: start-node-type
- type: string
- short_option: r
- long_option: start-node-type
- is_optional: false
- - name: depth
- description: search depth
- type: digit
- short_option: e
- long_option: depth
- is_optional: false
-results:
- direction: landscape
- attributes:
- - name: resource-type
- description: Onap result-type
- scope: short
- type: string
- - name: resource-link
- description: Onap resource-link
- scope: short
- type: string
-
-http:
- service:
- auth: basic
- mode: direct
- request:
- uri: /aai/v11/search/generic-query?key=${key}:${value}&include=all&start-node-type=${start-node-type}&depth=${depth}
- method: GET
- success_codes:
- - 200
- - 201
- result_map:
- resource-type: $b{result-data.[*].resource-type}
- resource-link: $b{result-data.[*].resource-link}
-
+# Copyright 2018 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +open_cli_schema_version: 1.0 +name: aai-generic-search +description: generic-search +#sample: https://172.19.44.123:8443/aai/v11/search/generic-query?key=customer.global-customer-id:Orange&include=all&start-node-type=customer&depth=6 + +info: + product: onap-beijing + service: aai + author: ONAP CLI Team onap-discuss@lists.onap.org + +parameters: + - name: key + description: key + type: string + short_option: k + long_option: key + is_optional: false + - name: value + description: value + type: string + short_option: z + long_option: value + is_optional: false + - name: start-node-type + description: start-node-type + type: string + short_option: r + long_option: start-node-type + is_optional: false + - name: depth + description: search depth + type: digit + short_option: e + long_option: depth + is_optional: false +results: + direction: landscape + attributes: + - name: resource-type + description: Onap result-type + scope: short + type: string + - name: resource-link + description: Onap resource-link + scope: short + type: string + +http: + service: + auth: basic + mode: direct + request: + uri: /aai/v11/search/generic-query?key=${key}:${value}&include=all&start-node-type=${start-node-type}&depth=${depth} + method: GET + success_codes: + - 200 + - 201 + result_map: + resource-type: $b{result-data.[*].resource-type} + resource-link: $b{result-data.[*].resource-link} + diff --git a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/search/node-type-search-schema.yaml b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/search/node-type-search-schema.yaml index 1156f5f8..f550964f 100644 --- a/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/search/node-type-search-schema.yaml +++ b/products/onap-beijing/features/aai/src/main/resources/open-cli-schema/search/node-type-search-schema.yaml @@ -1,63 +1,63 @@ -# Copyright 2018 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-open_cli_schema_version: 1.0
-name: type-search
-description: type-search
-#sample: https://172.19.44.123:8443/aai/v11/search/nodes-query?search-node-type=customer&filter=global-customer-id:EQUALS:Orange
-
-info:
- product: onap-beijing
- service: aai
- author: ONAP CLI Team onap-discuss@lists.onap.org
-
-parameters:
- - name: node-type-name
- description: node type name
- type: string
- short_option: n
- long_option: node-type-name
- is_optional: false
- - name: filter
- description: filter for earch, like ,global-customer-id:EQUALS:Orange
- type: string
- short_option: c
- long_option: filter
- is_optional: false
-results:
- direction: landscape
- attributes:
- - name: resource-type
- description: Onap resource-type
- scope: short
- type: string
- - name: resource-link
- description: Onap resource-link
- scope: short
- type: string
-
-http:
- service:
- auth: basic
- mode: direct
- request:
- uri: /aai/v11/search/nodes-query?search-node-type=${node-type-name}&filter=${filter}
- method: GET
- success_codes:
- - 200
- - 201
- result_map:
- resource-type: $b{result-data.[*].resource-type}
- resource-link: $b{result-data.[*].resource-link}
-
+# Copyright 2018 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +open_cli_schema_version: 1.0 +name: aai-type-search +description: type-search +#sample: https://172.19.44.123:8443/aai/v11/search/nodes-query?search-node-type=customer&filter=global-customer-id:EQUALS:Orange + +info: + product: onap-beijing + service: aai + author: ONAP CLI Team onap-discuss@lists.onap.org + +parameters: + - name: node-type-name + description: node type name + type: string + short_option: n + long_option: node-type-name + is_optional: false + - name: filter + description: filter for earch, like ,global-customer-id:EQUALS:Orange + type: string + short_option: c + long_option: filter + is_optional: false +results: + direction: landscape + attributes: + - name: resource-type + description: Onap resource-type + scope: short + type: string + - name: resource-link + description: Onap resource-link + scope: short + type: string + +http: + service: + auth: basic + mode: direct + request: + uri: /aai/v11/search/nodes-query?search-node-type=${node-type-name}&filter=${filter} + method: GET + success_codes: + - 200 + - 201 + result_map: + resource-type: $b{result-data.[*].resource-type} + resource-link: $b{result-data.[*].resource-link} + |