hichtakk/nsxctl

Unify output formats

mu853 opened this issue · 1 comments

mu853 commented

Change default output format to table format for easier overview and make output in json optional

ex)

$ nsxctl show transport-node
ID NAME IP TYPE
cf894736-bb36-4568-a6a6-ffec3eaf4ee1 edge-01 192.168.1.110 EdgeNode
0d11002c-74b9-4468-8971-4dd04e8ab74b edge-02 192.168.1.111 EdgeNode
740d7a71-f453-454c-a87a-cd1b1efabec9 new-edge 192.168.1.112 EdgeNode

$ nsxctl show transport-node -o json
{
"_create_time": 1657455913008,
"_create_user": "admin",
"_last_modified_time": 1657456138719,
"_last_modified_user": "nsx_policy",
"_protection": "NOT_PROTECTED",
"_revision": 1,
"_system_owned": false,
"display_name": "edge-01",
"host_switch_spec": {
"host_switches": [
{
"cpu_config": [],
"host_switch_id": "08a761b2-1cb1-4b5b-b039-9efa7e268f1d",
"host_switch_mode": "STANDARD",
:

Support various output style on future version v0.x.0.