Fix the setup of daemon config

Change-Id: I02d4a3da63d2438067cf64c15432d66b539c30bc
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2012-06-06 23:07:54 +10:00
parent a724259609
commit 7e02a65f79
4 changed files with 9 additions and 26 deletions

View File

@ -44,7 +44,7 @@ LOG = logging.getLogger('heat.api')
if __name__ == '__main__':
try:
conf = config.HeatConfigOpts()
conf()
conf(project='heat', prog='heat-api')
config.FLAGS = conf
rpc.configure(conf)
config.setup_logging(conf)

View File

@ -50,7 +50,7 @@ if __name__ == '__main__':
default_manager = 'heat.engine.manager.EngineManager'
conf = config.HeatEngineConfigOpts()
conf()
conf(project='heat', prog='heat-engine')
config.FLAGS = conf
config.setup_logging(conf)

View File

@ -59,7 +59,7 @@ def send_address_to_engine(host, port):
if __name__ == '__main__':
try:
conf = config.HeatMetadataConfigOpts()
conf()
conf(project='heat', prog='heat-metadata')
config.FLAGS = conf
rpc.configure(conf)
config.setup_logging(conf)

View File

@ -136,14 +136,8 @@ rpc_opts = [
class HeatConfigOpts(cfg.CommonConfigOpts):
def __init__(self, default_config_files=None, **kwargs):
config_files = cfg.find_config_files(project='heat',
prog='heat-api')
super(HeatConfigOpts, self).__init__(
project='heat',
version='%%prog %s' % version.version_string(),
default_config_files=default_config_files,
**kwargs)
def __init__(self):
super(HeatConfigOpts, self).__init__()
opts = [cfg.IntOpt('bind_port', default=8000),
cfg.StrOpt('bind_host', default='127.0.0.1')]
opts.extend(rpc_opts)
@ -151,14 +145,8 @@ class HeatConfigOpts(cfg.CommonConfigOpts):
class HeatMetadataConfigOpts(cfg.CommonConfigOpts):
def __init__(self, default_config_files=None, **kwargs):
config_files = cfg.find_config_files(project='heat',
prog='heat-metadata')
super(HeatMetadataConfigOpts, self).__init__(
project='heat',
version='%%prog %s' % version.version_string(),
default_config_files=default_config_files,
**kwargs)
def __init__(self):
super(HeatMetadataConfigOpts, self).__init__()
opts = [cfg.IntOpt('bind_port', default=8000),
cfg.StrOpt('bind_host', default='127.0.0.1')]
opts.extend(rpc_opts)
@ -224,13 +212,8 @@ class HeatEngineConfigOpts(cfg.CommonConfigOpts):
help='Driver to use for controlling instances'),
]
def __init__(self, default_config_files=None, **kwargs):
super(HeatEngineConfigOpts, self).__init__(
project='heat',
version='%%prog %s' % version.version_string(),
**kwargs)
config_files = cfg.find_config_files(project='heat',
prog='heat-engine')
def __init__(self):
super(HeatEngineConfigOpts, self).__init__()
self.register_cli_opts(self.engine_opts)
self.register_cli_opts(self.db_opts)
self.register_cli_opts(self.service_opts)