From 77f995811fcf32c7f017ac2cbb18e4344661dd70 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 16 May 2016 09:24:34 +0200 Subject: [PATCH] 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 --- nova/cmd/baseproxy.py | 3 +-- nova/tests/unit/cmd/test_baseproxy.py | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/nova/cmd/baseproxy.py b/nova/cmd/baseproxy.py index 499d8d878707..f7b30679025b 100644 --- a/nova/cmd/baseproxy.py +++ b/nova/cmd/baseproxy.py @@ -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 diff --git a/nova/tests/unit/cmd/test_baseproxy.py b/nova/tests/unit/cmd/test_baseproxy.py index 8c89f8257ec0..480a8fe6a8b8 100644 --- a/nova/tests/unit/cmd/test_baseproxy.py +++ b/nova/tests/unit/cmd/test_baseproxy.py @@ -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()