Bug 1325952 - Metadata isn't imported when uploading a template for remote execution
Summary: Metadata isn't imported when uploading a template for remote execution
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: jcallaha
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-11 13:25 UTC by Stephen Benjamin
Modified: 2019-09-25 21:18 UTC (History)
4 users (show)

Fixed In Version: rubygem-foreman_remote_execution-0.3.0.5-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:29:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Incorrect file import (81.25 KB, image/png)
2016-05-23 13:52 UTC, jcallaha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 13922 0 None None None 2016-04-11 13:26:17 UTC

Description Stephen Benjamin 2016-04-11 13:25:41 UTC
Description of problem:
If you use the upload functionality for a template, only the template text is used.  We need a way for a user to export/import a template with all the metadata.


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

How reproducible:
Always

Steps to Reproduce:
1. Attempt to export or import a job template

Actual results:
Metadata not included

Expected results:
Metadata included (inputs, etc).


Additional info:

Comment 2 Bryan Kearney 2016-04-14 14:11:34 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/13922 has been closed
-------------
Anonymous
Applied in changeset commit:foreman_plugin|cfab668395d40b98eeb01c1b2d050031452f6bcc.

Comment 3 Maxim Burgerhout 2016-05-06 11:29:13 UTC
While this is great (not having to create input fields manually), this change does make adding this metadata mandatory. Is that intentional? 

Asking because a template I made earlier doesn't import anymore (ISE), unless I add some metadata.

Comment 4 Stephen Benjamin 2016-05-06 13:37:41 UTC
There was no import button before this change, if you have just the contents of a template like a script, use the upload button in the New template form.

Import exports a particular format, we can't import an entire template without metadata, like the name.

Comment 5 Stephen Benjamin 2016-05-06 13:54:39 UTC
It could be possible to make importing without metadata take you to a blank form, but that should be a separate BZ I think.

Comment 6 jcallaha 2016-05-23 13:50:27 UTC
Failed QA in Satellite 6.2 Beta Snap 12.

The template exported correctly. However, when attempting to create a new template from the exported template file, the form data was not correctly populated. The text of the template was populated with the contents of the file instead. See attached image.

Comment 7 jcallaha 2016-05-23 13:52:01 UTC
Created attachment 1160638 [details]
Incorrect file import

Comment 8 Stephen Benjamin 2016-05-23 13:54:25 UTC
How did you test this? Please use the actual button labeled *IMPORT* on the main job templates index page, or the hammer cli import command.

The browse button does not import the template, as discussed in comment #3 and #4.  It's a limitation of how we get the form from foreman currently.

Comment 9 jcallaha 2016-05-23 14:06:29 UTC
After following Stephen's guidance, the template upload worked correctly. 

Verified in Satellite 6.2 Beta Snap 12.

Comment 10 Bryan Kearney 2016-07-27 11:29:01 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/RHBA-2016:1501


Note You need to log in before you can comment on or make changes to this bug.