libosmocore/tests/vty
Vadim Yanitskiy 72b90883f9 vty: introduce the expert mode and a command to enable it
Some VTY commands are intentionally hidden, e.g. because they might
by relatively dangerous if used in production operation.  We equip
such commands with a special attribute - CMD_ATTR_HIDDEN.

The problem is that neiter they appear in the XML VTY reference,
nor in the online VTY help, so it's a bit tricky to invoke them.
This change introduces so-called 'expert' mode, in which hidden
(but not deprecated) commands are getting visible.

In the (telnet) VTY session, this mode can be activated by passing
an additional argument to well-known 'enable' command:

  OsmoApp> enable ?
    [expert-mode]  Enable the expert mode (show hidden commands)
  OsmoApp> enable expert-mode
  OsmoApp#

so then hidden commands will appear together with all the other
commands.  They will be marked with a special '^' flag:

  OsmoApp# list with-flags
    ^ ...  foo-hidden [expert-mode]
    . ...  foo-regular-one
    ! ...  foo-immediate
    ^ u..  app-hidden-unbelievable

For the XML reference generation, additional API needs to be
introduced.  This will be implemented in subsequent patches.

Change-Id: Ie69c2a19b22fb31d7bd7f6412f0aeac86ea5048f
Related: SYS#4910
2020-10-21 06:27:48 +07:00
..
fail_cmd_ret_warning.cfg vty: Return error if cmd returns CMD_WARNING while reading cfg file 2019-10-28 19:15:29 +00:00
fail_not_de-indented.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
fail_tabs_and_spaces.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
fail_too_much_indent.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_deprecated_logging.cfg logging/vty: fix: actually ignore deprecated logging commands 2019-11-21 10:48:02 +07:00
ok_empty_parent.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_ignore_blank.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_ignore_comment.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_indented_root.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_more_spaces.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_tabs.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_tabs_and_spaces.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
vty_test.c vty/command: restrict the use of '.', '!', and '@' as flags 2020-10-07 14:17:02 +07:00
vty_test.err vty/command: restrict the use of '.', '!', and '@' as flags 2020-10-07 14:17:02 +07:00
vty_test.ok vty: Don't match negative values on purely positive ranges 2020-07-30 21:02:03 +00:00
vty_transcript_test.c vty: introduce the expert mode and a command to enable it 2020-10-21 06:27:48 +07:00
vty_transcript_test.vty vty: introduce the expert mode and a command to enable it 2020-10-21 06:27:48 +07:00