]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Big Switch: Call correct method in watchdog
authorKevin Benton <blak111@gmail.com>
Fri, 6 Jun 2014 18:25:55 +0000 (11:25 -0700)
committerKevin Benton <blak111@gmail.com>
Sat, 7 Jun 2014 02:38:31 +0000 (19:38 -0700)
Updates the consistency watchdog fuction to call
the correct rest method.

Closes-Bug: #1328321
Change-Id: I86ce0af36f6764a3f1e789602cef52758caedc8b

neutron/plugins/bigswitch/servermanager.py
neutron/tests/unit/bigswitch/test_servermanager.py

index 74f18de3d2417dea080d843e57b6e986d52d35f8..42d89222f4dce9b76317fdea5ba3cd0b5b7062f6 100644 (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):
index dc64cb5dcce6f18f4871b9ac4af8c298fd3ed935..6c7640fbafacd1b26b9751c6ab73b7c456b08a52 100644 (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