Bug 1380460

Summary: Katello API : POST /katello/api/v2/content_view_versions/:id/promote results in NoMethodError
Product: Red Hat Satellite Reporter: Swapnil Abnave <sabnave>
Component: API - ContentAssignee: Swapnil Abnave <sabnave>
Status: CLOSED ERRATA QA Contact: Brad Buckingham <bbuckingham>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: achadha, bbuckingham, bkearney, hmore, jcallaha, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
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-02-21 16:54:17 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:

Comment 2 Bryan Kearney 2016-09-29 18:18:53 UTC
Upstream bug component is API - Content

Comment 3 Bryan Kearney 2016-10-02 16:20:03 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16745 has been resolved.

Comment 5 Brad Buckingham 2017-08-02 17:37:02 UTC
Verified on Satellite 6.3 SNAP 9: satellite-6.3.0-16.0.beta.el7sat.noarch, tfm-rubygem-katello-3.4.2-1.el7sat.noarch

With the software above, verified that a content view version can be promoted via the API.  Below is the API as well as the dynflow task summary after the task's completion.

API:

$ curl -k -u admin:changeme -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"environment_id":3}' https://bkr-hv01-guest23.dsal.lab.eng.bos.redhat.com/katello/api/v2/content_view_versions/4/promote
  {"id":"ea2ab9d3-f99b-4600-8b86-20610ae31d1f","label":"Actions::Katello::ContentView::Promote","pending":true,"username":"admin","started_at":"2017-08-02 17:29:59 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"content_view":{"id":5,"name":"rhel7","label":"rhel7"},"organization":{"id":3,"name":"b-corp","label":"b-corp"},"environments":["dev"],"services_checked":["candlepin","candlepin_auth","pulp","pulp_auth"],"current_user_id":3},"output":{},"humanized":{"action":"Promote","input":[["content_view",{"text":"content view 'rhel7'","link":"#/content_views/5/versions"}],["organization",{"text":"organization 'b-corp'","link":"/organizations/3/edit"}]],"output":"","errors":[]},"cli_example":null}

Dynflow task summary:

Label: Actions::Katello::ContentView::Promote
Status: stopped
Result: success
Started at: 2017-08-02 17:29:59 UTC
Ended at: 2017-08-02 17:33:35 UTC

Comment 6 Satellite Program 2018-02-21 16:54:17 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:0336