Update profiling arguments doc
[cli.git] / docs / user_guide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2017 Huawei Technologies Co., Ltd.
4
5 .. _cli_user_guide:
6
7 CLI user guide
8 ==============
9
10 **One Command to command whole Onap !!**
11
12 Provides unified commands to operate any products from Linux console and web command console.
13 Configure the following environment variables, before using it:
14
15 1. **OPEN_CLI_HOST_URL** - Catalog or service URL
16 2. **OPEN_CLI_HOST_USERNAME** - Service user name
17 3. **OPEN_CLI_HOST_PASSWORD** - Service user password
18
19 To Run a command
20 -----------------
21 Type **onap <command>** from linux console.
22
23 To Run in Interactive mode
24 --------------------------
25 Type **onap** from linux/web console.
26
27 And use the directive set to set the values for following parameters:
28
29 1. **host-url** - Catalog or service URL
30 2. **host-username** - Service user name
31 3. **host-password** - Service user password
32
33 Set the product version
34 ------------------------
35 CLI framework is enhanced to handle multiple product versions at same
36 time. so to choose the product version, set environment variable
37 **OPEN_CLI_PROUDCT_IN_USE**.
38
39 NOTE: In interactive mode, product version can be selected using
40 typing **use <product-version>**
41
42 Run *onap [-v|--version]* to see the CLI and available product version details
43
44 Profiling arguments
45 -------------------
46 In interactive mode, user can use profiles for for “set arguments value once and use it ever”.
47
48 Please follow the steps given below for setting profiles:
49
50 1.    Open the ONAP CLI interactive console
51
52 2.    Create the profile, say ‘test:aai’ by running ‘profile test:aai’
53 There is no limit in number of profiles. OCLIP will create a profile if not exist already,
54 otherwise on typing 'profile' on the console, corresponding profiles will be effective.
55 So you can switch across profiles by using this directive 'profile'.
56
57 3.    For example, to add the credentials, Run following steps:
58 a.    set host-url=<aai-url>
59 b.    set host-username=AAI
60 c.    set host-pasword=AAI
61 d.    Type 'set' to print all these arguments stored so far.
62
63 NOTE: Profiles are not limited to set only credentials, you can set any frequently using
64 common arguments, which are listed in command help.
65
66 4.    You can override these stored arguments by providing them as arguments directly while
67 running the CLI.
68
69 5.    Profile information is persisted, so when you disconnect and connect again the CLI console,
70 you can start use the same profile again.
71
72 NOTE: Use the directive 'set' for setting the values for parameters and 'unset' for reseting
73  the values.
74
75 Help
76 ----
77 *onap [-h|--help]*
78 *onap <command> [-h|--help]*
79
80 Debug Mode
81 ----------
82 To run in debug mode, set following environment variables:
83
84 1. OPEN_CLI_CLI_DEBUG - By default its false, otherwise Set to true
85
86 2. OPEN_CLI_CLI_DEBUG_PORT - By default it is 5005, otherwise set to new TCP port number
87
88 More details
89 -------------
90 https://wiki.onap.org
91
92 Command usage guide
93 -------------------
94 Following document provides the help message for commands supported in this release.
95
96 .. toctree::
97    :maxdepth: 1
98
99    cmd_help.rst
100
101 Command Samples
102 ---------------
103 Following document provides the samples for commands supported in this release.
104
105 .. toctree::
106    :maxdepth: 1
107
108    cmd_sample.rst
109
110 End to end service creation tutorial
111 ------------------------------------
112 Following document provides the tutorial for service creation using CLI.
113
114 .. toctree::
115    :maxdepth: 1
116
117    end_to_end_onap_cli_commands.rst