Teach heat-api about the bind_host
Change-Id: Ica32693373a87f01c41755a2b041c187bddd034d Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
bece6593f0
commit
93ea554c0e
|
@ -51,8 +51,9 @@ if __name__ == '__main__':
|
|||
|
||||
app = config.load_paste_app(conf)
|
||||
|
||||
port = config.DEFAULT_PORT
|
||||
LOG.info(('Starting Heat API on port %s') % port)
|
||||
httpserver.serve(app, port=port)
|
||||
port = conf.bind_port
|
||||
host = conf.bind_host
|
||||
LOG.info(('Starting Heat API on %s:%s') % (host, port))
|
||||
httpserver.serve(app, host=host, port=port)
|
||||
except RuntimeError, e:
|
||||
sys.exit("ERROR: %s" % e)
|
||||
|
|
|
@ -137,12 +137,17 @@ 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)
|
||||
self.register_cli_opts(rpc_opts)
|
||||
opts = [cfg.IntOpt('bind_port', default=8000),
|
||||
cfg.StrOpt('bind_host', default='127.0.0.1')]
|
||||
opts.extend(rpc_opts)
|
||||
self.register_cli_opts(opts)
|
||||
|
||||
|
||||
class HeatMetadataConfigOpts(cfg.CommonConfigOpts):
|
||||
|
|
Loading…
Reference in New Issue