]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix the setup of daemon config
authorAngus Salkeld <asalkeld@redhat.com>
Wed, 6 Jun 2012 13:07:54 +0000 (23:07 +1000)
committerAngus Salkeld <asalkeld@redhat.com>
Wed, 6 Jun 2012 13:07:54 +0000 (23:07 +1000)
Change-Id: I02d4a3da63d2438067cf64c15432d66b539c30bc
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
bin/heat-api
bin/heat-engine
bin/heat-metadata
heat/common/config.py

index 26f03b7d880445c3c5f7cee9e70df5dd2e86c0c5..4fb905d72c2d910f87c7dabdd2a0148a180c17a1 100755 (executable)
@@ -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)
index 4136f4d70b4b1d3954f0bfa5ca9cbf223f636501..dba0a6c1bdbd75b9edc8d761e6eb0c20d5636165 100755 (executable)
@@ -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)
index 8515a9603fe837c37818c1806afa8d5ed59770e1..1eb180de157b31fedba621a9239f652f7d673641 100755 (executable)
@@ -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)
index a2bc16d92f413d453136f5ef14ac7401e335a6cb..8d6849a6b58a6f5f4ff986d852467c72fd956145 100644 (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)