Move displayed checker title to be in variable
Title of check command displayed to user is now moved to be defined as atribute of UpgradeCommands class. This will allow to override this command for projects which inherits from this class. This will be usefull for Neutron to use same class in new sanity-check tool which will be implemented in same way as upgrade-check is done. Change-Id: I8218b21a219db3a3198750fd98033aff244b7002 Related-Bug: #1809878
This commit is contained in:
parent
226d9b14d3
commit
1829c08e5a
@ -75,6 +75,7 @@ class UpgradeCommands(object):
|
|||||||
done through the sqlalchemy query language directly like the database
|
done through the sqlalchemy query language directly like the database
|
||||||
schema migrations.
|
schema migrations.
|
||||||
"""
|
"""
|
||||||
|
display_title = _('Upgrade Check Results')
|
||||||
_upgrade_checks = ()
|
_upgrade_checks = ()
|
||||||
|
|
||||||
def _get_details(self, upgrade_check_result):
|
def _get_details(self, upgrade_check_result):
|
||||||
@ -120,8 +121,7 @@ class UpgradeCommands(object):
|
|||||||
# NOTE(bnemec): We use six.text_type on the translated string to
|
# NOTE(bnemec): We use six.text_type on the translated string to
|
||||||
# force immediate translation if lazy translation is in use.
|
# force immediate translation if lazy translation is in use.
|
||||||
# See lp1801761 for details.
|
# See lp1801761 for details.
|
||||||
t = prettytable.PrettyTable([six.text_type(_('Upgrade Check Results'))
|
t = prettytable.PrettyTable([six.text_type(self.display_title)],
|
||||||
],
|
|
||||||
hrules=prettytable.ALL)
|
hrules=prettytable.ALL)
|
||||||
t.align = 'l'
|
t.align = 'l'
|
||||||
for name, result in check_results:
|
for name, result in check_results:
|
||||||
|
Loading…
Reference in New Issue
Block a user