Fix the setup of daemon config
Change-Id: I02d4a3da63d2438067cf64c15432d66b539c30bc Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
a724259609
commit
7e02a65f79
@ -44,7 +44,7 @@ LOG = logging.getLogger('heat.api')
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
conf = config.HeatConfigOpts()
|
conf = config.HeatConfigOpts()
|
||||||
conf()
|
conf(project='heat', prog='heat-api')
|
||||||
config.FLAGS = conf
|
config.FLAGS = conf
|
||||||
rpc.configure(conf)
|
rpc.configure(conf)
|
||||||
config.setup_logging(conf)
|
config.setup_logging(conf)
|
||||||
|
@ -50,7 +50,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
default_manager = 'heat.engine.manager.EngineManager'
|
default_manager = 'heat.engine.manager.EngineManager'
|
||||||
conf = config.HeatEngineConfigOpts()
|
conf = config.HeatEngineConfigOpts()
|
||||||
conf()
|
conf(project='heat', prog='heat-engine')
|
||||||
config.FLAGS = conf
|
config.FLAGS = conf
|
||||||
|
|
||||||
config.setup_logging(conf)
|
config.setup_logging(conf)
|
||||||
|
@ -59,7 +59,7 @@ def send_address_to_engine(host, port):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
conf = config.HeatMetadataConfigOpts()
|
conf = config.HeatMetadataConfigOpts()
|
||||||
conf()
|
conf(project='heat', prog='heat-metadata')
|
||||||
config.FLAGS = conf
|
config.FLAGS = conf
|
||||||
rpc.configure(conf)
|
rpc.configure(conf)
|
||||||
config.setup_logging(conf)
|
config.setup_logging(conf)
|
||||||
|
@ -136,14 +136,8 @@ rpc_opts = [
|
|||||||
|
|
||||||
|
|
||||||
class HeatConfigOpts(cfg.CommonConfigOpts):
|
class HeatConfigOpts(cfg.CommonConfigOpts):
|
||||||
def __init__(self, default_config_files=None, **kwargs):
|
def __init__(self):
|
||||||
config_files = cfg.find_config_files(project='heat',
|
super(HeatConfigOpts, self).__init__()
|
||||||
prog='heat-api')
|
|
||||||
super(HeatConfigOpts, self).__init__(
|
|
||||||
project='heat',
|
|
||||||
version='%%prog %s' % version.version_string(),
|
|
||||||
default_config_files=default_config_files,
|
|
||||||
**kwargs)
|
|
||||||
opts = [cfg.IntOpt('bind_port', default=8000),
|
opts = [cfg.IntOpt('bind_port', default=8000),
|
||||||
cfg.StrOpt('bind_host', default='127.0.0.1')]
|
cfg.StrOpt('bind_host', default='127.0.0.1')]
|
||||||
opts.extend(rpc_opts)
|
opts.extend(rpc_opts)
|
||||||
@ -151,14 +145,8 @@ class HeatConfigOpts(cfg.CommonConfigOpts):
|
|||||||
|
|
||||||
|
|
||||||
class HeatMetadataConfigOpts(cfg.CommonConfigOpts):
|
class HeatMetadataConfigOpts(cfg.CommonConfigOpts):
|
||||||
def __init__(self, default_config_files=None, **kwargs):
|
def __init__(self):
|
||||||
config_files = cfg.find_config_files(project='heat',
|
super(HeatMetadataConfigOpts, self).__init__()
|
||||||
prog='heat-metadata')
|
|
||||||
super(HeatMetadataConfigOpts, self).__init__(
|
|
||||||
project='heat',
|
|
||||||
version='%%prog %s' % version.version_string(),
|
|
||||||
default_config_files=default_config_files,
|
|
||||||
**kwargs)
|
|
||||||
opts = [cfg.IntOpt('bind_port', default=8000),
|
opts = [cfg.IntOpt('bind_port', default=8000),
|
||||||
cfg.StrOpt('bind_host', default='127.0.0.1')]
|
cfg.StrOpt('bind_host', default='127.0.0.1')]
|
||||||
opts.extend(rpc_opts)
|
opts.extend(rpc_opts)
|
||||||
@ -224,13 +212,8 @@ class HeatEngineConfigOpts(cfg.CommonConfigOpts):
|
|||||||
help='Driver to use for controlling instances'),
|
help='Driver to use for controlling instances'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, default_config_files=None, **kwargs):
|
def __init__(self):
|
||||||
super(HeatEngineConfigOpts, self).__init__(
|
super(HeatEngineConfigOpts, self).__init__()
|
||||||
project='heat',
|
|
||||||
version='%%prog %s' % version.version_string(),
|
|
||||||
**kwargs)
|
|
||||||
config_files = cfg.find_config_files(project='heat',
|
|
||||||
prog='heat-engine')
|
|
||||||
self.register_cli_opts(self.engine_opts)
|
self.register_cli_opts(self.engine_opts)
|
||||||
self.register_cli_opts(self.db_opts)
|
self.register_cli_opts(self.db_opts)
|
||||||
self.register_cli_opts(self.service_opts)
|
self.register_cli_opts(self.service_opts)
|
||||||
|
Loading…
Reference in New Issue
Block a user