aboutsummaryrefslogtreecommitdiffstats
path: root/docs/user_guide.rst
blob: 4dc633f8ce8ffd513c9912a1e5ae8be2e24e1302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. Copyright 2017 Huawei Technologies Co., Ltd.

.. _cli_user_guide:

CLI user guide
==============

**One Command to command whole Onap !!**

Provides unified commands to operate any products from Linux console and web command console.
Configure the following environment variables, before using it:

1. **OPEN_CLI_HOST_URL** - Catalog or service URL
2. **OPEN_CLI_HOST_USERNAME** - Service user name
3. **OPEN_CLI_HOST_PASSWORD** - Service user password

To Run a command
-----------------
Type **oclip <command>** from linux console.

To Run in Interactive mode
--------------------------
Type **oclip** from linux/web console.

And use the directive set to set the values for following parameters:

1. **host-url** - Catalog or service URL
2. **host-username** - Service user name
3. **host-password** - Service user password

Set the product version
------------------------
CLI framework is enhanced to handle multiple product versions at same
time. so to choose the product version, set environment variable
**OPEN_CLI_PROUDCT_IN_USE**.

NOTE: In interactive mode, product version can be selected using
typing **use <product-version>**

Run *oclip [-v|--version]* to see the CLI and available product version details

Profiling arguments
-------------------
In interactive mode, user can use profiles for for “set arguments value once and use it ever”.

Please follow the steps given below for setting profiles:

1.    Open the CLI interactive console

2.    Create the profile, say ‘test:aai’ by running ‘profile test:aai’
There is no limit in number of profiles. OCLIP will create a profile if not exist already,
otherwise on typing 'profile' on the console, corresponding profiles will be effective.
So you can switch across profiles by using this directive 'profile'.

3.    For example, to add the credentials, Run following steps:
a.    set host-url=<aai-url>
b.    set host-username=AAI
c.    set host-pasword=AAI
d.    Type 'set' to print all these arguments stored so far.

NOTE: Profiles are not limited to set only credentials, you can set any frequently using
common arguments, which are listed in command help.

4.    You can override these stored arguments by providing them as arguments directly while
running the CLI.

5.    Profile information is persisted, so when you disconnect and connect again the CLI console,
you can start use the same profile again.

NOTE: Use the directive 'set' for setting the values for parameters and 'unset' for reseting
 the values.

Help
----
*oclip [-h|--help]*
*oclip <command> [-h|--help]*

Debug Mode
----------
To run in debug mode, set following environment variables:

1. OPEN_CLI_CLI_DEBUG - By default its false, otherwise Set to true

2. OPEN_CLI_CLI_DEBUG_PORT - By default it is 5005, otherwise set to new TCP port number

More details
-------------
https://wiki.onap.org

Command usage guide
-------------------
Following document provides the help message for commands supported in this release.

.. toctree::
   :maxdepth: 1

   cmd_help.rst

Command Samples
---------------
Following document provides the samples for commands supported in this release.

.. toctree::
   :maxdepth: 1

   cmd_sample.rst

End to end service creation tutorial
------------------------------------
Following document provides the tutorial for service creation using CLI.

.. toctree::
   :maxdepth: 1

   end_to_end_onap_cli_commands.rst