Browse Source

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
changes/29/216029/1
mathspanda 7 years ago
parent
commit
a1ffe63454
  1. 7
      magnum/service/periodic.py

7
magnum/service/periodic.py

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

Loading…
Cancel
Save