Refactor policy synchronizer

This commit adds the following

1. Move policy and rule synchronizer to new class from policy engine
2. support sync of single datasource policy
3. Expose synchronizer endpoints via PE to listen to broadcast requests for
   synchronization
4. update the functions to synchronize one policy instead looping through
   all policies everytime.

Partially-Implements blueprint refactor-synchronizer
Change-Id: I0fc4822daf6c49e6885471530a072caa03ce492b
This commit is contained in:
Anusha Ramineni 2016-11-21 08:56:28 +05:30
parent 99d2a259b2
commit 0bded420c5
1 changed files with 4 additions and 4 deletions

View File

@ -246,13 +246,13 @@ class TestHA(manager_congress.ScenarioPolicyBase):
if not test.call_until_true(
func=lambda: self._check_resource_exists(
self.client, 'datasource'),
duration=60, sleep_for=1):
duration=90, sleep_for=1):
raise exceptions.TimeoutException(
"primary doesn't have fake dataservice, data sync failed")
if not test.call_until_true(
func=lambda: self._check_resource_exists(
self.client, 'policy'),
duration=60, sleep_for=1):
duration=90, sleep_for=1):
raise exceptions.TimeoutException(
"primary doesn't have fake policy, policy sync failed")
@ -280,13 +280,13 @@ class TestHA(manager_congress.ScenarioPolicyBase):
if not test.call_until_true(
func=lambda: self._check_resource_missing(
self.client, 'datasource'),
duration=60, sleep_for=1):
duration=90, sleep_for=1):
raise exceptions.TimeoutException(
"primary still has fake dataservice, sync failed")
if not test.call_until_true(
func=lambda: self._check_resource_missing(
self.client, 'policy'),
duration=60, sleep_for=1):
duration=90, sleep_for=1):
raise exceptions.TimeoutException(
"primary still fake policy, policy synchronizer failed")