From: garciadeblas Date: Mon, 2 Dec 2019 13:57:02 +0000 (+0000) Subject: osm version: added client version X-Git-Tag: v7.0.0rc1~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=c94275062d1faf60c9b6ac360506bbd1a715c0ab;p=osm%2Fosmclient.git osm version: added client version Change-Id: I698b75d3b7771c5409a741008eeb21468bf4eeff Signed-off-by: garciadeblas --- 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)