Bug 1263997

Summary: [RFE] foreman-rake export_tasks shall support exporting a single task
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: Tasks PluginAssignee: Ivan Necas <inecas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.2CC: bbuckingham, xdmoon
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-05 15:21:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 260381, 1122832    

Description Peter Vreman 2015-09-17 09:38:50 UTC
Description of problem:
Currently foreman-rake export_tasks supports only ALL tasks or all non-successful tasks.
This can be very slow when many tasks are in the system. It also means that mean non-relevant (and disattracting) tasks are included for Bug reporting.

Please add a possibility to filter on a list of specified tasks:

foreman-rake export_tasks tasks=8533bdf0-51be-4d7b-a2bb-c9eec7066a44,e335026f-2f00-4045-9971-e63cd0320f51


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Export a single task
2.
3.

Actual results:
All tasks are exports, you need to look in the final .tar.gz to strip out unneeded information

Expected results:
.tar.gz contains only the data of the selected tasks


Additional info:

Comment 1 Ivan Necas 2017-04-05 15:21:08 UTC
This is possible in 6.2.x releases, using TASK_SEARCH field, example:

  foreman-rake foreman_tasks:export_tasks TASK_SEARCH='id = 667250a0-6d98-4fb4-800b-4a2c97da79de'

See foreman-rake -D foreman_tasks:export_tasks for more details