Refactor -o option to simplify code 85/13585/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 26 Jun 2023 15:41:46 +0000 (17:41 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 26 Jun 2023 21:54:29 +0000 (23:54 +0200)
commitcd7cd5eba8cfbb5f1941744ff90cf45e0ebcf422
tree26a014b0211041a5030136546fa66fcadd1572b6
parent0e2d832d6e4099b7d2f868f9ee5a782b5fca2a56
Refactor -o option to simplify code

The change includes the implementation of a click option in print_output
module, being used in ns-list, ns-show, vim-list, vim-show, vnf-list and
vnf-show commands.

It also includes a quick validation that the output format is one of the
allowed outputs. It also fixes jsonpath option so that the output is not
embedded in a [] list structure.

Change-Id: I8c33b5faf341c9a4cdd8d488671f2a81ab3b5a3a
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osmclient/cli_commands/ns.py
osmclient/cli_commands/vim.py
osmclient/cli_commands/vnf.py
osmclient/common/print_output.py
osmclient/scripts/osm.py