From 98d9c4d70bd9e48713634a9bd8dabddbdc91a0da Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 25 Sep 2018 01:32:03 -0400 Subject: [PATCH] Revert "Remove gratuitous long_output" This reverts commit 97cd90ce8899ccac8350157afa4fcf0c0f0b3610. --- cli-client/pvc.py | 8 ++++++-- client-common/client_lib/network.py | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cli-client/pvc.py b/cli-client/pvc.py index fff3f26f..5789e5d6 100755 --- a/cli-client/pvc.py +++ b/cli-client/pvc.py @@ -672,14 +672,18 @@ def net_remove(net): @click.argument( 'vni' ) -def net_info(vni): +@click.option( + '-l', '--long', 'long_output', is_flag=True, default=False, + help='Display more detailed information.' +) +def net_info(vni, long_output): """ Show information about virtual network VNI. """ # Open a Zookeeper connection zk_conn = pvc_common.startZKConnection(zk_host) - retcode, retmsg = pvc_network.get_info(zk_conn, vni) + retcode, retmsg = pvc_network.get_info(zk_conn, vni, long_output) cleanup(retcode, retmsg, zk_conn) ############################################################################### diff --git a/client-common/client_lib/network.py b/client-common/client_lib/network.py index 29270cbf..e632fb3f 100644 --- a/client-common/client_lib/network.py +++ b/client-common/client_lib/network.py @@ -201,13 +201,13 @@ def remove_network(zk_conn, network): return True, 'Network "{}" removed successfully!'.format(description) -def get_info(zk_conn, network): +def get_info(zk_conn, network, long_output): # Validate and obtain alternate passed value net_vni = getNetworkVNI(zk_conn, network) if net_vni == None: return False, 'ERROR: Could not find network "{}" in the cluster!'.format(network) - information = getNetworkInformation(zk_conn, net_vni) + information = getNetworkInformation(zk_conn, net_vni, long_output) click.echo(information) click.echo('')