From f0af04106efa2bfc4e22a1bef9c9664712ddb710 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 (cherry picked from commit c8bdff1533e54787d9a3dd98fe57a1e2e0d82e73) --- 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 2ab629797e4..459d8ba4eb1 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 69f0b4a19f2..76073b1c234 100644 --- a/neutron/tests/unit/bigswitch/test_servermanager.py +++ b/neutron/tests/unit/bigswitch/test_servermanager.py @@ -73,6 +73,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_file_put_contents(self): pl = NeutronManager.get_plugin()