Merge "Removed the use of deprecated "toString""
[cli.git] / docs / cmd_help.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-18 Huawei Technologies Co., Ltd.
4
5
6 .. toctree::
7    :maxdepth: 2
8
9
10 .. _cli_cmd_help:
11
12 open-cli
13 ==========================
14
15
16 [1] basic-login
17 -----------------------------------------------
18
19
20
21 usage: oclip basic-login
22
23 Provides HTTP basic authorization support.
24
25
26 Product: open-cli
27 Service: basic-auth
28 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
29
30 Options::
31
32  [-m | --host-url] [-C | --no-catalog] [-f | --format]
33  [-h | --help] [-V | --verify] [-t | --no-title]
34  [-d | --debug] [-v | --version] [-s | --long]
35  [-D | --context] [-u | --host-username] [-p | --host-password]
36
37 where::
38
39  -m | --host-url        host url in http(s). It is of type URL. By
40                         default, it is read from environment variable
41                         OPEN_CLI_HOST_URL.
42  -C | --no-catalog      Whether to use given host-url directly or
43                         discover it from catalog, it will override the
44                         service->mode. It is of type BOOL. It is
45                         optional.
46  -f | --format          Output formats, supported formats such as table,
47                         csv, json, yaml. It is of type STRING.
48  -h | --help            print help message. It is of type BOOL.
49  -V | --verify          Helps to verify the command using samples
50                         provides under open-cli-samples directory. By
51                         default, it goes with mock.To enable the
52                         verification of samples in real time, set
53                         DISABLE_MOCKING=true in the context parameter. It
54                         is of type BOOL. It is optional.
55  -t | --no-title        whether to print title or not. It is of type BOOL.
56  -d | --debug           Enable debug output. It is of type BOOL.
57  -v | --version         print service version. It is of type BOOL.
58  -s | --long            whether to print all attributes or only short
59                         attributes. It is of type BOOL.
60  -D | --context         command context. It is of type MAP. It is
61                         optional.
62  -u | --host-username   Host user name. It is of type STRING. By default,
63                         it is read from environment variable
64                         OPEN_CLI_HOST_USERNAME.
65  -p | --host-password   Host user password. It is of type STRING. By
66                         default, it is read from environment variable
67                         OPEN_CLI_HOST_PASSWORD. Secured.
68
69
70 Results::
71
72  Authorization  Authorization and is of type STRING.
73
74
75 Error::
76
77  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
78
79
80
81 [2] basic-logout
82 -----------------------------------------------
83
84
85
86 usage: oclip basic-logout
87
88 Provides HTTP basic authorization support. As part of logout, it invalidates authorization key generated while login.
89
90
91 Product: open-cli
92 Service: basic-auth
93 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
94
95 Options::
96
97  [-m | --host-url] [-C | --no-catalog] [-f | --format]
98  [-h | --help] [-V | --verify] [-t | --no-title]
99  [-d | --debug] [-v | --version] [-s | --long]
100  [-D | --context]
101
102 where::
103
104  -m | --host-url    host url in http(s). It is of type URL. By
105                     default, it is read from environment variable
106                     OPEN_CLI_HOST_URL.
107  -C | --no-catalog  Whether to use given host-url directly or
108                     discover it from catalog, it will override the
109                     service->mode. It is of type BOOL. It is
110                     optional.
111  -f | --format      Output formats, supported formats such as table,
112                     csv, json, yaml. It is of type STRING.
113  -h | --help        print help message. It is of type BOOL.
114  -V | --verify      Helps to verify the command using samples
115                     provides under open-cli-samples directory. By
116                     default, it goes with mock.To enable the
117                     verification of samples in real time, set
118                     DISABLE_MOCKING=true in the context parameter. It
119                     is of type BOOL. It is optional.
120  -t | --no-title    whether to print title or not. It is of type BOOL.
121  -d | --debug       Enable debug output. It is of type BOOL.
122  -v | --version     print service version. It is of type BOOL.
123  -s | --long        whether to print all attributes or only short
124                     attributes. It is of type BOOL.
125  -D | --context     command context. It is of type MAP. It is
126                     optional.
127
128
129 Error::
130
131  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
132
133
134
135 [3] catalog
136 -----------------------------------------------
137
138
139
140 usage: oclip catalog
141
142 Provides catalog discovery support to find the base api path for given service from product's catalog service.
143 If any product wants to support catalog, it could derive from this command. Currently ONAP uses it and creates
144 derived command by using ONAP MSB service.
145
146
147 Product: open-cli
148 Service: catalog
149 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
150
151 Options::
152
153  [-m | --host-url] [-C | --no-catalog] [-l | --catalog-service-name]
154  [-f | --format] [-h | --help] [-V | --verify]
155  [-t | --no-title] [-d | --debug] [-v | --version]
156  [-s | --long] [-D | --context] [-i | --catalog-service-version]
157
158 where::
159
160  -m | --host-url                  host url in http(s). It is of type URL. By
161                                   default, it is read from environment variable
162                                   OPEN_CLI_HOST_URL.
163  -C | --no-catalog                Whether to use given host-url directly or
164                                   discover it from catalog, it will override the
165                                   service->mode. It is of type BOOL. It is
166                                   optional.
167  -l | --catalog-service-name      service name registered in catalog service. It is
168                                   of type STRING. By default, it is .
169  -f | --format                    Output formats, supported formats such as table,
170                                   csv, json, yaml. It is of type STRING.
171  -h | --help                      print help message. It is of type BOOL.
172  -V | --verify                    Helps to verify the command using samples
173                                   provides under open-cli-samples directory. By
174                                   default, it goes with mock.To enable the
175                                   verification of samples in real time, set
176                                   DISABLE_MOCKING=true in the context parameter. It
177                                   is of type BOOL. It is optional.
178  -t | --no-title                  whether to print title or not. It is of type BOOL.
179  -d | --debug                     Enable debug output. It is of type BOOL.
180  -v | --version                   print service version. It is of type BOOL.
181  -s | --long                      whether to print all attributes or only short
182                                   attributes. It is of type BOOL.
183  -D | --context                   command context. It is of type MAP. It is
184                                   optional.
185  -i | --catalog-service-version   service version registered in catalog service. It
186                                   is of type STRING. By default, it is .
187
188
189 Results::
190
191  catalog-service-host-url   Service connection url and is of type STRING.
192  catalog-service-base-path  service base path, to append with host-url for
193                             connecting the service. and is of type STRING.
194
195
196 Error::
197
198  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
199
200
201
202 [4] execution-list
203 -----------------------------------------------
204
205
206
207 usage: oclip execution-list
208
209 List the executions of the given command so far
210
211 Product: open-cli
212 Service: execution
213 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
214
215 Options::
216
217  [-e | --request-id] [-b | --service] [-f | --format]
218  [-h | --help] [-t | --no-title] [-d | --debug]
219  [-x | --start-time] [-v | --version] [-n | --command]
220  [-l | --product] [-y | --end-time] [-s | --long]
221  [-D | --context] [-c | --profile]
222
223 where::
224
225  -e | --request-id  Request id. It is of type STRING. It is optional.
226                     By default, it is .
227  -b | --service     For a given service. It is of type STRING. It is
228                     optional. By default, it is .
229  -f | --format      Output formats, supported formats such as table,
230                     csv, json, yaml. It is of type STRING.
231  -h | --help        print help message. It is of type BOOL.
232  -t | --no-title    whether to print title or not. It is of type BOOL.
233  -d | --debug       Enable debug output. It is of type BOOL.
234  -x | --start-time  From start time. It is of type STRING. It is
235                     optional. By default, it is .
236  -v | --version     print service version. It is of type BOOL.
237  -n | --command     For a given command. It is of type STRING. It is
238                     optional. By default, it is .
239  -l | --product     For a given product version. It is of type
240                     STRING. It is optional. By default, it is .
241  -y | --end-time    Till end time. It is of type STRING. It is
242                     optional. By default, it is .
243  -s | --long        whether to print all attributes or only short
244                     attributes. It is of type BOOL.
245  -D | --context     command context. It is of type MAP. It is
246                     optional.
247  -c | --profile     For a given profile. It is of type STRING. It is
248                     optional. By default, it is .
249
250
251 Results::
252
253  request-id     Request id and is of type STRING.
254  execution-id   Execution id and is of type STRING.
255  product        Product and is of type STRING.
256  service        service and is of type STRING.
257  command        command and is of type STRING.
258  profile        Profile and is of type STRING.
259  status         Execution status and is of type STRING.
260  start-time     Command execution starting Time and is of type
261                 STRING.
262  end-time       Command execution finishing Time and is of type
263                 STRING.
264  input          Input and is of type STRING.
265  output         Output and is of type STRING.
266
267
268 Error::
269
270  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
271
272
273
274 [5] execution-show
275 -----------------------------------------------
276
277
278
279 usage: oclip execution-show
280
281 Show the complete executions for the given request id
282
283 Product: open-cli
284 Service: execution
285 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
286
287 Options::
288
289  [-l | --execution-id] [-D | --context] [-s | --long]
290  [-h | --help] [-f | --format] [-t | --no-title]
291  [-d | --debug] [-v | --version]
292
293 where::
294
295  -l | --execution-id  Execution id. It is of type STRING. By default,
296                       it is .
297  -D | --context       command context. It is of type MAP. It is
298                       optional.
299  -s | --long          whether to print all attributes or only short
300                       attributes. It is of type BOOL.
301  -h | --help          print help message. It is of type BOOL.
302  -f | --format        Output formats, supported formats such as table,
303                       csv, json, yaml. It is of type STRING.
304  -t | --no-title      whether to print title or not. It is of type BOOL.
305  -d | --debug         Enable debug output. It is of type BOOL.
306  -v | --version       print service version. It is of type BOOL.
307
308
309 Results::
310
311  request-id   Request id and is of type STRING.
312  product      Product and is of type STRING.
313  service      service and is of type STRING.
314  command      command and is of type STRING.
315  profile      Profile and is of type STRING.
316  input        Input and is of type STRING.
317  status       Execution status and is of type STRING.
318  start-time   Command execution starting Time and is of type
319               STRING.
320  end-time     Command execution finishing Time and is of type
321               STRING.
322  output       Output and is of type STRING.
323
324
325 Error::
326
327  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
328
329
330
331 [6] product-list
332 -----------------------------------------------
333
334
335
336 usage: oclip product-list
337
338 List available products registered in OCLIP
339
340 Product: open-cli
341 Service: product
342 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
343
344 Options::
345
346  [-D | --context] [-s | --long] [-h | --help]
347  [-f | --format] [-t | --no-title] [-d | --debug]
348  [-v | --version]
349
350 where::
351
352  -D | --context   command context. It is of type MAP. It is
353                   optional.
354  -s | --long      whether to print all attributes or only short
355                   attributes. It is of type BOOL.
356  -h | --help      print help message. It is of type BOOL.
357  -f | --format    Output formats, supported formats such as table,
358                   csv, json, yaml. It is of type STRING.
359  -t | --no-title  whether to print title or not. It is of type BOOL.
360  -d | --debug     Enable debug output. It is of type BOOL.
361  -v | --version   print service version. It is of type BOOL.
362
363
364 Results::
365
366  product      Product name and is of type STRING.
367  description  Product description and is of type STRING.
368
369
370 Error::
371
372  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
373
374
375 [8] schema-list
376 -----------------------------------------------
377
378
379
380 usage: oclip schema-list
381
382 OCLIP command to list available schema
383
384 Product: open-cli
385 Service: schema
386 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
387
388 Options::
389
390  [-l | --product] [-D | --context] [-s | --long]
391  [-h | --help] [-f | --format] [-t | --no-title]
392  [-d | --debug] [-v | --version] [-n | --service]
393
394 where::
395
396  -l | --product   For a given product version. It is of type
397                   STRING. By default, it is .
398  -D | --context   command context. It is of type MAP. It is
399                   optional.
400  -s | --long      whether to print all attributes or only short
401                   attributes. It is of type BOOL.
402  -h | --help      print help message. It is of type BOOL.
403  -f | --format    Output formats, supported formats such as table,
404                   csv, json, yaml. It is of type STRING.
405  -t | --no-title  whether to print title or not. It is of type BOOL.
406  -d | --debug     Enable debug output. It is of type BOOL.
407  -v | --version   print service version. It is of type BOOL.
408  -n | --service   For a given service in a product. It is of type
409                   STRING. It is optional. By default, it is .
410
411
412 Results::
413
414  command      Command name and is of type STRING.
415  schema       Schema name and is of type STRING.
416  service      Service name and is of type STRING.
417  ocs-version  Schema version and is of type STRING.
418  type         Command type and is of type STRING.
419  enabled      Command is enabled or not and is of type STRING.
420  rpc          Command is executed remotely and is of type
421               STRING.
422
423
424 Error::
425
426  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
427
428
429
430 [9] schema-refresh
431 -----------------------------------------------
432
433
434
435 usage: oclip schema-refresh
436
437 OCLIP command to refresh schemas stored in open-cli-schema folders.
438
439 Product: open-cli
440 Service: schema
441 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
442
443 Options::
444
445  [-D | --context] [-s | --long] [-h | --help]
446  [-f | --format] [-t | --no-title] [-d | --debug]
447  [-v | --version]
448
449 where::
450
451  -D | --context   command context. It is of type MAP. It is
452                   optional.
453  -s | --long      whether to print all attributes or only short
454                   attributes. It is of type BOOL.
455  -h | --help      print help message. It is of type BOOL.
456  -f | --format    Output formats, supported formats such as table,
457                   csv, json, yaml. It is of type STRING.
458  -t | --no-title  whether to print title or not. It is of type BOOL.
459  -d | --debug     Enable debug output. It is of type BOOL.
460  -v | --version   print service version. It is of type BOOL.
461
462
463 Results::
464
465  command      Command name and is of type STRING.
466  product      Command product version and is of type STRING.
467  schema       Schema name and is of type STRING.
468  ocs-version  Schema version and is of type STRING.
469  type         Command type and is of type STRING.
470  enabled      Command is enabled or not and is of type STRING.
471
472
473 Error::
474
475  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
476
477
478
479 [10] schema-show
480 -----------------------------------------------
481
482
483
484 usage: oclip schema-show
485
486 OCLIP command to show available schema in JSON format
487
488 Product: open-cli
489 Service: schema
490 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
491
492 Options::
493
494  [-l | --product] [-D | --context] [-s | --long]
495  [-h | --help] [-f | --format] [-t | --no-title]
496  [-d | --debug] [-x | --service] [-v | --version]
497  [-n | --command]
498
499 where::
500
501  -l | --product   For a given product version. It is of type
502                   STRING. By default, it is .
503  -D | --context   command context. It is of type MAP. It is
504                   optional.
505  -s | --long      whether to print all attributes or only short
506                   attributes. It is of type BOOL.
507  -h | --help      print help message. It is of type BOOL.
508  -f | --format    Output formats, supported formats such as table,
509                   csv, json, yaml. It is of type STRING.
510  -t | --no-title  whether to print title or not. It is of type BOOL.
511  -d | --debug     Enable debug output. It is of type BOOL.
512  -x | --service   For a given service. It is of type STRING. It is
513                   optional. By default, it is .
514  -v | --version   print service version. It is of type BOOL.
515  -n | --command   Schema details to fetch. It is of type STRING. By
516                   default, it is .
517
518
519 Results::
520
521  schema   Scheam json and is of type JSON.
522
523
524 Error::
525
526  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
527
528
529
530 [11] schema-switch
531 -----------------------------------------------
532
533
534
535 usage: oclip schema-switch
536
537 OCLIP command to switch the given command enable/disable
538
539 Product: open-cli
540 Service: schema
541 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
542
543 Options::
544
545  [-l | --name] [-i | --product] [-D | --context]
546  [-s | --long] [-h | --help] [-f | --format]
547  [-t | --no-title] [-d | --debug] [-v | --version]
548
549 where::
550
551  -l | --name      Command name. It is of type STRING. By default,
552                   it is .
553  -i | --product   Product name. It is of type STRING. By default,
554                   it is .
555  -D | --context   command context. It is of type MAP. It is
556                   optional.
557  -s | --long      whether to print all attributes or only short
558                   attributes. It is of type BOOL.
559  -h | --help      print help message. It is of type BOOL.
560  -f | --format    Output formats, supported formats such as table,
561                   csv, json, yaml. It is of type STRING.
562  -t | --no-title  whether to print title or not. It is of type BOOL.
563  -d | --debug     Enable debug output. It is of type BOOL.
564  -v | --version   print service version. It is of type BOOL.
565
566
567 Error::
568
569  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
570
571
572
573 [12] schema-validate
574 -----------------------------------------------
575
576
577
578 usage: oclip schema-validate
579
580 OCLIP command to validate schema
581
582 Product: open-cli
583 Service: schema
584 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
585
586 Options::
587
588  [-D | --context] [-s | --long] [-h | --help]
589  [-b | --ocs-version] [-f | --format] [-t | --no-title]
590  [-d | --debug] [-v | --version] [-l | --schema-location]
591  [-i | --internal-schema]
592
593 where::
594
595  -D | --context           command context. It is of type MAP. It is
596                           optional.
597  -s | --long              whether to print all attributes or only short
598                           attributes. It is of type BOOL.
599  -h | --help              print help message. It is of type BOOL.
600  -b | --ocs-version       OCS version. It is of type STRING. It is optional.
601  -f | --format            Output formats, supported formats such as table,
602                           csv, json, yaml. It is of type STRING.
603  -t | --no-title          whether to print title or not. It is of type BOOL.
604  -d | --debug             Enable debug output. It is of type BOOL.
605  -v | --version           print service version. It is of type BOOL.
606  -l | --schema-location   Schema file location. It is of type URL. By
607                           default, it is .
608  -i | --internal-schema   Validate existing schema file. It is of type BOOL.
609
610
611 Results::
612
613  error  Schema validation error and is of type STRING.
614
615
616 Error::
617
618  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
619
620
621
622 [13] service-list
623 -----------------------------------------------
624
625
626
627 usage: oclip service-list
628
629 List the services in given product registered in OCLIP
630
631 Product: open-cli
632 Service: product
633 Author: Kanagaraj Manickam kanagaraj.manickam@huawei.com
634
635 Options::
636
637  [-l | --product] [-D | --context] [-s | --long]
638  [-h | --help] [-f | --format] [-t | --no-title]
639  [-d | --debug] [-v | --version]
640
641 where::
642
643  -l | --product   For a given product version. It is of type
644                   STRING. By default, it is .
645  -D | --context   command context. It is of type MAP. It is
646                   optional.
647  -s | --long      whether to print all attributes or only short
648                   attributes. It is of type BOOL.
649  -h | --help      print help message. It is of type BOOL.
650  -f | --format    Output formats, supported formats such as table,
651                   csv, json, yaml. It is of type STRING.
652  -t | --no-title  whether to print title or not. It is of type BOOL.
653  -d | --debug     Enable debug output. It is of type BOOL.
654  -v | --version   print service version. It is of type BOOL.
655
656
657 Results::
658
659  service      Service name and is of type STRING.
660  description  Product description and is of type STRING.
661
662
663 Error::
664
665  On error, it prints <STATUS CODE>::<ERROR CODE>::<ERROR MESSAGE>
666