Switch to using pbr version for cli version string

This commit switches from using the hard coded version strings in the
cliff main app to using the version string generated pbr. This means
that the version returned from --version on the tempest cli will
actually reflect the version of the code you're using.

Change-Id: I74b2a2c4f1cf9b4a6639c35545b3256ea94cd961
This commit is contained in:
Matthew Treinish 2015-10-29 02:44:34 -04:00
parent c5bb7663b6
commit 0ef3a73f30
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
1 changed files with 2 additions and 3 deletions

View File

@ -16,8 +16,7 @@ import sys
from cliff import app
from cliff import commandmanager
TEMPEST_CLI_VERSION = '0.1'
from pbr import version
class Main(app.App):
@ -27,7 +26,7 @@ class Main(app.App):
def __init__(self):
super(Main, self).__init__(
description='Tempest cli application',
version=TEMPEST_CLI_VERSION,
version=version.VersionInfo('tempest').version_string(),
command_manager=commandmanager.CommandManager('tempest.cm'),
)