From c94275062d1faf60c9b6ac360506bbd1a715c0ab Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Mon, 2 Dec 2019 13:57:02 +0000 Subject: [PATCH] osm version: added client version Change-Id: I698b75d3b7771c5409a741008eeb21468bf4eeff Signed-off-by: garciadeblas --- osmclient/scripts/osm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index 7178d26..2aa16c6 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -28,6 +28,7 @@ import time import pycurl import os import textwrap +import pkg_resources def wrap_text(text, width): @@ -3023,7 +3024,8 @@ def ns_metric_export(ctx, ns, vnf, vdu, metric, interval): def get_version(ctx): try: check_client_version(ctx.obj, "version") - print (ctx.obj.get_version()) + print ("Server version: {}".format(ctx.obj.get_version())) + print ("Client version: {}".format(pkg_resources.get_distribution("osmclient").version)) except ClientException as e: print(str(e)) exit(1) -- 2.25.1