Skip to content

Commit

Permalink
Fix #79 Tasks not caught by cv_task from cv_device (#80)
Browse files Browse the repository at this point in the history
Change cv_device to use real JSON fields and make it compatible with
cv_task module
  • Loading branch information
titom73 authored Nov 20, 2019
1 parent 300cb80 commit e831cba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ansible_collections/arista/cvp/plugins/modules/cv_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,10 @@ def device_action(module):
sleep(10)
# Build required data for tasks in CVP - work order Id, current task status, name
# description
tasksField = {'name': 'name', 'workOrderId': 'taskNo', 'workOrderState': 'status',
'currentTaskName': 'currentAction', 'description': 'description',
'workOrderUserDefinedStatus': 'displayedStutus', 'note': 'note',
'taskStatus': 'actionStatus'}
tasksField = {'workOrderId': 'workOrderId', 'workOrderState': 'workOrderState',
'currentTaskName': 'currentTaskName', 'description': 'description',
'workOrderUserDefinedStatus': 'workOrderUserDefinedStatus', 'note': 'note',
'taskStatus': 'taskStatus', 'workOrderDetails': 'workOrderDetails'}
tasks = module.client.api.get_tasks_by_status('Pending')
# if tasks IDs were created for device actions then return only those.
createdTasks = []
Expand Down

0 comments on commit e831cba

Please sign in to comment.