From cc95fcc5d8f2a4a69159faac052d53fb6bd7a8a1 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam Date: Tue, 24 Mar 2015 12:35:17 +0530 Subject: [PATCH] Adds version reporting for heat commands Adds --version option for following commands heat-api-cfn heat-api-cloudwatch heat-keystone-setup-domain Change-Id: I84bdf16fd053b5eccacd99bf26ecd9eb34e57ef8 Closes-bug: #1435406 --- bin/heat-api-cfn | 5 ++++- bin/heat-api-cloudwatch | 5 ++++- bin/heat-keystone-setup-domain | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bin/heat-api-cfn b/bin/heat-api-cfn index 99be1b1621..61ced698d8 100755 --- a/bin/heat-api-cfn +++ b/bin/heat-api-cfn @@ -43,6 +43,7 @@ from heat.common import messaging from heat.common import profiler from heat.common import wsgi from heat.openstack.common import systemd +from heat import version i18n.enable_lazy() @@ -51,7 +52,9 @@ LOG = logging.getLogger('heat.api.cfn') if __name__ == '__main__': try: logging.register_options(cfg.CONF) - cfg.CONF(project='heat', prog='heat-api-cfn') + cfg.CONF(project='heat', + prog='heat-api-cfn', + version=version.version_info.version_string()) logging.setup(cfg.CONF, 'heat-api-cfn') logging.set_defaults() messaging.setup() diff --git a/bin/heat-api-cloudwatch b/bin/heat-api-cloudwatch index 98040319dc..ebeed74f31 100755 --- a/bin/heat-api-cloudwatch +++ b/bin/heat-api-cloudwatch @@ -43,6 +43,7 @@ from heat.common import messaging from heat.common import profiler from heat.common import wsgi from heat.openstack.common import systemd +from heat import version i18n.enable_lazy() @@ -51,7 +52,9 @@ LOG = logging.getLogger('heat.api.cloudwatch') if __name__ == '__main__': try: logging.register_options(cfg.CONF) - cfg.CONF(project='heat', prog='heat-api-cloudwatch') + cfg.CONF(project='heat', + prog='heat-api-cloudwatch', + version=version.version_info.version_string()) logging.setup(cfg.CONF, 'heat-api-cloudwatch') logging.set_defaults() messaging.setup() diff --git a/bin/heat-keystone-setup-domain b/bin/heat-keystone-setup-domain index 2621372cda..3458675ef9 100755 --- a/bin/heat-keystone-setup-domain +++ b/bin/heat-keystone-setup-domain @@ -20,6 +20,8 @@ import keystoneclient.exceptions as kc_exception from keystoneclient.v3 import client from oslo_config import cfg +from heat import version + logger = logging.getLogger(__name__) DEBUG = False @@ -53,7 +55,10 @@ opts = [ ] cfg.CONF.register_cli_opts(opts) -cfg.CONF(sys.argv[1:], project='heat', prog='heat-keystone-setup-domain') +cfg.CONF(sys.argv[1:], + project='heat', + prog='heat-keystone-setup-domain', + version=version.version_info.version_string()) HEAT_DOMAIN_NAME = os.environ.get( 'HEAT_DOMAIN', cfg.CONF.stack_user_domain_name)