Merge "BSN: Set hash header to empty instead of False"
This commit is contained in:
commit
b4fa606016
@ -131,7 +131,7 @@ class ServerProxy(object):
|
|||||||
headers['NeutronProxy-Agent'] = self.name
|
headers['NeutronProxy-Agent'] = self.name
|
||||||
headers['Instance-ID'] = self.neutron_id
|
headers['Instance-ID'] = self.neutron_id
|
||||||
headers['Orchestration-Service-ID'] = ORCHESTRATION_SERVICE_ID
|
headers['Orchestration-Service-ID'] = ORCHESTRATION_SERVICE_ID
|
||||||
headers[HASH_MATCH_HEADER] = self.mypool.consistency_hash
|
headers[HASH_MATCH_HEADER] = self.mypool.consistency_hash or ''
|
||||||
if 'keep-alive' in self.capabilities:
|
if 'keep-alive' in self.capabilities:
|
||||||
headers['Connection'] = 'keep-alive'
|
headers['Connection'] = 'keep-alive'
|
||||||
else:
|
else:
|
||||||
|
@ -102,8 +102,8 @@ class ServerManagerTests(test_rp.BigSwitchProxyPluginV2TestCase):
|
|||||||
with self.network():
|
with self.network():
|
||||||
callheaders = rv.request.mock_calls[0][1][3]
|
callheaders = rv.request.mock_calls[0][1][3]
|
||||||
self.assertIn('X-BSN-BVS-HASH-MATCH', callheaders)
|
self.assertIn('X-BSN-BVS-HASH-MATCH', callheaders)
|
||||||
# first call will be False to indicate no previous state hash
|
# first call will be empty to indicate no previous state hash
|
||||||
self.assertEqual(callheaders['X-BSN-BVS-HASH-MATCH'], False)
|
self.assertEqual(callheaders['X-BSN-BVS-HASH-MATCH'], '')
|
||||||
# change the header that will be received on delete call
|
# change the header that will be received on delete call
|
||||||
rv.getresponse.return_value.getheader.return_value = 'HASH2'
|
rv.getresponse.return_value.getheader.return_value = 'HASH2'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user