pybind/mgr/dashboard/module.py: allow custom server addr, port

Signed-off-by: Dan Mick <dan.mick@redhat.com>
This commit is contained in:
Dan Mick 2017-04-28 17:59:49 -07:00
parent f2d29d2cef
commit f69ce190c5

View File

@ -663,8 +663,12 @@ class Module(MgrModule):
return dict(result)
server_addr = self.get_config('server_addr') or '127.0.0.1'
server_port = self.get_config('server_port') or '7000'
log.info("server_addr: %s server_port: %s" % (server_addr, server_port))
cherrypy.config.update({
'server.socket_port': 7000,
'server.socket_host': server_addr,
'server.socket_port': int(server_port),
'engine.autoreload.on': False
})