Make --version work properly
We have pbr and we have oslo.config. Tell them about eachother. Change-Id: I65d449b0ed961c824a3e7c1307aab63f73bc03ad
This commit is contained in:
parent
635955def4
commit
db896fdf3a
@ -28,6 +28,7 @@ from os_collect_config import common
|
||||
from os_collect_config import ec2
|
||||
from os_collect_config import exc
|
||||
from os_collect_config import heat_local
|
||||
from os_collect_config import version
|
||||
from oslo.config import cfg
|
||||
|
||||
DEFAULT_COLLECTORS = ['heat_local', 'ec2', 'cfn']
|
||||
@ -167,7 +168,8 @@ def getfilehash(files):
|
||||
def __main__(args=sys.argv, requests_impl_map=None):
|
||||
signal.signal(signal.SIGHUP, reexec_self)
|
||||
setup_conf()
|
||||
CONF(args=args[1:], prog="os-collect-config")
|
||||
CONF(args=args[1:], prog="os-collect-config",
|
||||
version=version.version_info.version_string())
|
||||
|
||||
# This resets the logging infrastructure which prevents capturing log
|
||||
# output in tests cleanly, so should only be called if there isn't already
|
||||
|
18
os_collect_config/version.py
Normal file
18
os_collect_config/version.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
import pbr.version
|
||||
|
||||
version_info = pbr.version.VersionInfo('os-collect-config')
|
Loading…
Reference in New Issue
Block a user