Bug 1539042

Summary: API results for GET job_templates do not include 'updated_at' value
Product: Red Hat Satellite Reporter: Anand Agrawal <aagrawal>
Component: Remote ExecutionAssignee: Amit Karsale <akarsale>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.13CC: akarsale, aruzicka, bkearney, inecas, mhulan, tstrachota, vanhoof
Target Milestone: 6.4.0Keywords: EasyFix, Triaged, VerifiedUpstream
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:08:09 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: 1546813    

Description Anand Agrawal 2018-01-26 13:29:56 UTC
Description of problem:

The API call to list provisioning_templates and partition tables returns a list of templates and includes the time-stamp that the template was last updated.

The same call for job_templates does not contain that information.  

API results should be consistent.

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

6.2.13

How reproducible:

Always

Steps to Reproduce:
1. curl -X GET -s -u admin:changeme -k https://satellite.example.com/api/v2/job_templates  // Does not include updated_at timestamp
2.curl -X GET -s -u admin:changeme -k https://satellite.example.com/api/v2/provisioning_templates  // Includes updated_at timestamp

Actual results:
API results are not consistent. No updated_at field present

Expected results:
API Should be consistent, hence created_at, updated_at needs to be added

Additional info:

Add these attributes (created_at, updated_at) to the file views/api/v2/job_templates/base.json.rabl in foreman_remote_execution github repository

Comment 2 Amit Karsale 2018-01-30 08:03:54 UTC
created and posted upstream issue : http://projects.theforeman.org/issues/22450

Comment 6 Peter Ondrejka 2018-03-21 11:37:20 UTC
checked in upstream
foreman-1.18.0-0.develop.201803201943git1dcfbeb.el7.noarch
tfm-rubygem-foreman_remote_execution-1.4.5-1.fm1_18.el7.noarch

using:

curl -X GET -s -u admin:changeme -k https://<hostname>/api/v2/job_templates | grep updated_at
curl -X GET -s -u admin:changeme -k https://<hostname>/api/v2/job_templates | grep created_at

Comment 7 Peter Ondrejka 2018-05-31 09:43:23 UTC
Verified on Sat 6.4 snap 5

Comment 8 Bryan Kearney 2018-10-16 19:08:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927