osm version: added client version 87/8287/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 2 Dec 2019 13:57:02 +0000 (13:57 +0000)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 2 Dec 2019 13:58:46 +0000 (13:58 +0000)
Change-Id: I698b75d3b7771c5409a741008eeb21468bf4eeff
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osmclient/scripts/osm.py

index 7178d26..2aa16c6 100755 (executable)
@@ -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)