Fix wrong usage of filters in periodic task

The filters in method 'sync_bay_status' in periodic.py should be a dict,
instead of a list.

Change-Id: Id12e8768abb17b70bbc92d951b0d95e765d94e38
Closes-Bug: #1487812
This commit is contained in:
mathspanda 2015-08-23 17:35:08 +08:00
parent f4c3f0540d
commit a1ffe63454
1 changed files with 4 additions and 3 deletions

View File

@ -53,9 +53,10 @@ class MagnumPeriodicTasks(periodic_task.PeriodicTasks):
try: try:
LOG.debug('Starting to sync up bay status') LOG.debug('Starting to sync up bay status')
osc = clients.OpenStackClients(ctx) osc = clients.OpenStackClients(ctx)
filters = [bay_status.CREATE_IN_PROGRESS, status = [bay_status.CREATE_IN_PROGRESS,
bay_status.UPDATE_IN_PROGRESS, bay_status.UPDATE_IN_PROGRESS,
bay_status.DELETE_IN_PROGRESS] bay_status.DELETE_IN_PROGRESS]
filters = {'status': status}
bays = objects.Bay.list_all(ctx, filters=filters) bays = objects.Bay.list_all(ctx, filters=filters)
if not bays: if not bays:
return return