CLI deployment using OOM and HEAT
=================================
-ONAP CLI is integrated with OOM and HEAT based ONAP deployment.
+ONAP CLI deployment is enabled with OOM and HEAT based ONAP installation.
-HEAT based deployment
----------------------
+OpenStack HEAT based deployment
+------------------------------
As part of HEAT based deployment, ONAL CLI docker image is integrated into ONAP Portal and when portal_vm is
successfully installed, it will be available at http://portal.api.simpledemo.openecomp.org:8080
OOM based deployment
--------------------
ONAL CLI docker image is integrated with OOM and is available under name 'cli'
+
+Once successfully installed, CLI is available under onap-cli name-space. So user can access the CLI at
+http://<k8s-host>:30260
+
CLI developer guide
===================
-Develop OCLIP using plug-ins or YAML.
+OCLI provides following approaches for developing CLI:
As a Plug-in
------------
version: sample-1.0
- service:
- name: sample-service
- version: 1.0.0
- auth: none
- mode: direct
-
parameters:
- name: name
description: name of the person
request:
uri: /version.json
method: GET
+
+ service:
+ name: sample-service
+ version: v1
+ auth: none
+ mode: direct
+
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"}
ONAP CLI provides logging based on slf4j and ONAP_CLI_HOME/conf/logging.properties is used to configure it.
-By default it reports the logs under ONAP_CLI_HOME/logs folder.
+By default, it reports the logs under ONAP_CLI_HOME/logs folder.
+
+To enable the debugging, set the logging level to DEBUG/INFO. By default its set to ERROR.
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
**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
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 <macro name>
followed by {<macro details>}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. |
++------------------+------------------------------------------------------------+
In ONAP Amsterdam release, CLI provides following ONAP operations as command:
-* ONAP service discovery
+* ONAP micro-service discovery
* External system on-boarding (VIM, VNFM, EMS & SDNC)
-* Customer and subscription management (Only available thru CLI)
-* Cloud and tenant on-boarding (Only available thru CLI)
+* Customer and Subscription management (Only available thru CLI)
+* Cloud and Tenant on-boarding (Only available thru CLI)
* Design-time artifacts (VSP, VF, Service model) management
* Network-service (vFW, vLB, etc) life-cycle management
**New Features**
-In this release CLI provides all those features supported in previous release. In addition,
+In this release, CLI provides all those features supported in previous release. In addition,
+following features are enabled:
* Policy management
* VNF/PNF management
+* OCLIP SNMP profile support
+* OCLIP CLI verification support
+
+Similar to earlier release, user can perform customer, subscription, cloud and tenant management only
+by using CLI as portal does not support.
**Bug Fixes**
-* CLI-105 Ignore those yamls which does not have open cli schema version
-* CLI-103 Support HTTP delete with Body
-* CLI-101 Add context param under http for ignoring empty json nodes
-* CLI-99 Optional Parameter default value set to blank
-* CLI-98 Debug option is not working
-* CLI-97 schema-validate fails to validate http profile
-* CLI-96 broken interactive console
+* CLI-105 Ignore those yamls which does not have open cli schema version
+* CLI-103 Support HTTP delete with http body (SO, AAI requires)
+* CLI-101 Add context parameter for ignoring empty json nodes in http body
+* CLI-99 Optional parameter's default value is set to blank
* CLI-95 Add profile support for multiple sessions
* CLI-94 EOL openecomp CLIs
-* CLI-87 Fix yaml for reported validation error
* CLI-86 Create documentation for end to end cli commands for onap
-* CLI-82 Spelling - customer-list, customer-show in browser cli
-* CLI-75 long option need not be same as name
* CLI-74 Setup Mock environment for a command
-* CLI-61 Add validation for results section in OCS in schema-validate
-
+* CLI-61 Add validation for results section in yaml