baseproxy: stop requiring CONF.verbose
Option "verbose" from group "DEFAULT" was deprecated for removal during Mitaka, and has been removing during Newton. It has been dropped by oslo.config and nova-novncproxy now fails to start: NoSuchOptError: no such option in group DEFAULT: verbose This patch aims to stop requiring CONF.verbose that does not exist anymore. Change-Id: I9533666db73390f28656ffcb1e84fadd51321e91 Closes-Bug: #1582103
This commit is contained in:
parent
9a05d38f48
commit
77f995811f
@ -56,13 +56,12 @@ def proxy(host, port):
|
|||||||
listen_host=host,
|
listen_host=host,
|
||||||
listen_port=port,
|
listen_port=port,
|
||||||
source_is_ipv6=CONF.source_is_ipv6,
|
source_is_ipv6=CONF.source_is_ipv6,
|
||||||
verbose=CONF.verbose,
|
|
||||||
cert=CONF.cert,
|
cert=CONF.cert,
|
||||||
key=CONF.key,
|
key=CONF.key,
|
||||||
ssl_only=CONF.ssl_only,
|
ssl_only=CONF.ssl_only,
|
||||||
daemon=CONF.daemon,
|
daemon=CONF.daemon,
|
||||||
record=CONF.record,
|
record=CONF.record,
|
||||||
traffic=CONF.verbose and not CONF.daemon,
|
traffic=not CONF.daemon,
|
||||||
web=CONF.web,
|
web=CONF.web,
|
||||||
file_only=True,
|
file_only=True,
|
||||||
RequestHandlerClass=websocketproxy.NovaProxyRequestHandler
|
RequestHandlerClass=websocketproxy.NovaProxyRequestHandler
|
||||||
|
@ -52,16 +52,13 @@ class BaseProxyTestCase(test.NoDBTestCase):
|
|||||||
@mock.patch('nova.console.websocketproxy.NovaWebSocketProxy.start_server')
|
@mock.patch('nova.console.websocketproxy.NovaWebSocketProxy.start_server')
|
||||||
def test_proxy(self, mock_start, mock_init, mock_gmr, mock_log,
|
def test_proxy(self, mock_start, mock_init, mock_gmr, mock_log,
|
||||||
mock_exists):
|
mock_exists):
|
||||||
# Force verbose=False so something else testing nova.cmd.baseproxy
|
|
||||||
# doesn't impact the call to mocked NovaWebSocketProxy.__init__.
|
|
||||||
self.flags(verbose=False)
|
|
||||||
baseproxy.proxy('0.0.0.0', '6080')
|
baseproxy.proxy('0.0.0.0', '6080')
|
||||||
mock_log.assert_called_once_with(baseproxy.CONF, 'nova')
|
mock_log.assert_called_once_with(baseproxy.CONF, 'nova')
|
||||||
mock_gmr.mock_assert_called_once_with(version)
|
mock_gmr.mock_assert_called_once_with(version)
|
||||||
mock_init.assert_called_once_with(
|
mock_init.assert_called_once_with(
|
||||||
listen_host='0.0.0.0', listen_port='6080', source_is_ipv6=False,
|
listen_host='0.0.0.0', listen_port='6080', source_is_ipv6=False,
|
||||||
verbose=False, cert='self.pem', key=None, ssl_only=False,
|
cert='self.pem', key=None, ssl_only=False,
|
||||||
daemon=False, record=None, traffic=False,
|
daemon=False, record=None, traffic=True,
|
||||||
web='/usr/share/spice-html5', file_only=True,
|
web='/usr/share/spice-html5', file_only=True,
|
||||||
RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
|
RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
|
||||||
mock_start.assert_called_once_with()
|
mock_start.assert_called_once_with()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user