From c8bdff1533e54787d9a3dd98fe57a1e2e0d82e73 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Fri, 6 Jun 2014 11:25:55 -0700 Subject: [PATCH] Big Switch: Call correct method in watchdog Updates the consistency watchdog fuction to call the correct rest method. Closes-Bug: #1328321 Change-Id: I86ce0af36f6764a3f1e789602cef52758caedc8b --- neutron/plugins/bigswitch/servermanager.py | 4 ++-- neutron/tests/unit/bigswitch/test_servermanager.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/neutron/plugins/bigswitch/servermanager.py b/neutron/plugins/bigswitch/servermanager.py index 74f18de3d..42d89222f 100644 --- a/neutron/plugins/bigswitch/servermanager.py +++ b/neutron/plugins/bigswitch/servermanager.py @@ -554,9 +554,9 @@ class ServerPool(object): # If consistency is supported, all we have to do is make any # rest call and the consistency header will be added. If it # doesn't match, the backend will return a synchronization error - # that will be handled by the rest_call. + # that will be handled by the rest_action. eventlet.sleep(polling_interval) - self.rest_call('GET', HEALTH_PATH) + self.rest_action('GET', HEALTH_PATH) class HTTPSConnectionWithValidation(httplib.HTTPSConnection): diff --git a/neutron/tests/unit/bigswitch/test_servermanager.py b/neutron/tests/unit/bigswitch/test_servermanager.py index dc64cb5dc..6c7640fba 100644 --- a/neutron/tests/unit/bigswitch/test_servermanager.py +++ b/neutron/tests/unit/bigswitch/test_servermanager.py @@ -93,6 +93,7 @@ class ServerManagerTests(test_rp.BigSwitchProxyPluginV2TestCase): pl.servers.capabilities = ['consistency'] self.assertRaises(servermanager.RemoteRestError, pl.servers._consistency_watchdog) + rmock.assert_called_with('GET', '/health', '', {}, [], False) def test_consistency_hash_header(self): # mock HTTP class instead of rest_call so we can see headers -- 2.45.2