Big Switch: Call correct method in watchdog

Updates the consistency watchdog fuction to call
the correct rest method.

Closes-Bug: #1328321
Change-Id: I86ce0af36f6764a3f1e789602cef52758caedc8b
This commit is contained in:
Kevin Benton 2014-06-06 11:25:55 -07:00
parent 145ea4ac1a
commit c8bdff1533
2 changed files with 3 additions and 2 deletions

View File

@ -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):

View File

@ -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