Merge "baseproxy: stop requiring CONF.verbose"

This commit is contained in:
Jenkins 2016-05-18 15:02:00 +00:00 committed by Gerrit Code Review
commit a2efd3c49b
2 changed files with 3 additions and 7 deletions

View File

@ -56,13 +56,12 @@ def proxy(host, port):
listen_host=host,
listen_port=port,
source_is_ipv6=CONF.source_is_ipv6,
verbose=CONF.verbose,
cert=CONF.cert,
key=CONF.key,
ssl_only=CONF.ssl_only,
daemon=CONF.daemon,
record=CONF.record,
traffic=CONF.verbose and not CONF.daemon,
traffic=not CONF.daemon,
web=CONF.web,
file_only=True,
RequestHandlerClass=websocketproxy.NovaProxyRequestHandler

View File

@ -52,16 +52,13 @@ class BaseProxyTestCase(test.NoDBTestCase):
@mock.patch('nova.console.websocketproxy.NovaWebSocketProxy.start_server')
def test_proxy(self, mock_start, mock_init, mock_gmr, mock_log,
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')
mock_log.assert_called_once_with(baseproxy.CONF, 'nova')
mock_gmr.mock_assert_called_once_with(version)
mock_init.assert_called_once_with(
listen_host='0.0.0.0', listen_port='6080', source_is_ipv6=False,
verbose=False, cert='self.pem', key=None, ssl_only=False,
daemon=False, record=None, traffic=False,
cert='self.pem', key=None, ssl_only=False,
daemon=False, record=None, traffic=True,
web='/usr/share/spice-html5', file_only=True,
RequestHandlerClass=websocketproxy.NovaProxyRequestHandler)
mock_start.assert_called_once_with()