Change-Id: Ic01afc3dec3475dd390f0e6a464bd08d6d596faf
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
# Other operations
####################
+@cli.command(name='version')
+@click.pass_context
+def get_version(ctx):
+ try:
+ check_client_version(ctx.obj, "version")
+ print (ctx.obj.get_version())
+ except ClientException as e:
+ print(str(e))
+ exit(1)
+
@cli.command(name='upload-package', short_help='uploads a VNF package or NS package')
@click.argument('filename')
@click.pass_context
http_header = ['{}: {}'.format(key, val)
for (key, val) in list(self._headers.items())]
self._http_client.set_http_header(http_header)
+
+ def get_version(self):
+ resp = self._http_client.get_cmd(endpoint="/version")
+ return "{} {}".format(resp.get("version"), resp.get("date"))
+