Bug 1740340

Summary: Automation Task scheduling via API needs to support date/time
Product: Red Hat CloudForms Management Engine Reporter: Brant Evans <brant.evans>
Component: APIAssignee: Gregg Tanzillo <gtanzill>
Status: POST --- QA Contact: Sudhir Mallamprabhakara <smallamp>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.11.0CC: mshriver
Target Milestone: GA   
Target Release: 5.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Brant Evans 2019-08-12 17:44:01 UTC
Description of problem:
Currently when scheduling an automation task via the APi the schedule_time is specified as a number of days in the future. Customers need to be able to specify and exact date and time for the automation task.

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

How reproducible:
Always

Steps to Reproduce:
1. Use the API to create an automation request with a parameter called schedule_time with a date/time combination.

POST /api/automation_requests
{
  "uri_parts" : {
    "namespace" : "System",
    "class"     : "Request",
    "instance"  : "InspectME",
    "message"   : "create"
  },
  "parameters" : {
    "var1" : "value 1",
    "var2" : "value 2",
    "minimum_memory" : 2048,
    "schedule_time": "2019-08-14 17:41:06 UTC"
  },
  "requester" : {
    "auto_approve" : true
  }
}


Actual results:
scheduling fails

Expected results:
Automation task is scheduled at the requested date and time.

Additional info:
The UI allows scheduling an automation task at a specified date and time. The API should allow for the same functionality.

See BZ 1486765 introduced the functionality of scheduling automation tasks via the API.

Comment 2 drew uhlmann 2019-09-23 14:51:33 UTC
https://github.com/ManageIQ/manageiq/pull/19138

Comment 4 drew uhlmann 2020-06-05 15:08:36 UTC
That is an excellent question. 

https://github.com/ManageIQ/manageiq/pull/19138 got mistakenly labeled as not getting backported, the label just got fixed so it should be soon.