Bug 2222938

Summary: [DDF] The hammer command is not correct.
Product: Red Hat Satellite Reporter: Direct Docs Feedback <ddf-bot>
Component: Content ViewsAssignee: Adam Lazik <alazik>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.12.0CC: alazik, ofedoren, sajha
Target Milestone: UnspecifiedKeywords: Documentation, 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: 2023-07-25 14:01:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Direct Docs Feedback 2023-07-14 14:23:51 UTC
The hammer command mentioned in the documentation is not correct.

Instead of "Content_View_Version_ID" it should be "Content_View_ID"
We use "Content_View_Version_ID" when we do not wish to enable "Always update to latest version" for Content View

Organisation option is missing because of which getting below error.

~~~
[root@rhsat612 ~]# hammer content-view component add \
--component-content-view-id XX \ 
--latest \ 
--composite-content-view "Example_Composite_Content_View" 
Could not add the component: 
Error: Missing options to search organization.
~~~

Below is the command should be used with and without "Always update to latest version" option for Content View.

Hammer command to add Content View in Composite Content View with "Always update to latest version" enabled.

~~~
# hammer content-view component add \
--component-content-view-id Content_View_ID \ 
--latest \ 
--composite-content-view "Example_Composite_Content_View" \ 
--organization "My_Organization"
~~~


Hammer command to add Content View in Composite Content View with "Always update to latest version" disabled.

~~~
# hammer content-view component add \
--component-content-view-id Content_View_ID \ 
--composite-content-view "Example_Composite_Content_View" \ 
--component-content-view-version-id Content_View_Version_ID \ 
--organization "My_Organization"
~~~

Comment 1 Marie Hornickova 2023-07-19 13:29:38 UTC
Hello,
Thank you very much for reporting this issue.
Updates about the progress on the fix will be shared here as well as the final link to fixed document.
Thank you!

Comment 2 Adam Lazik 2023-07-24 13:37:11 UTC
Hi!

Created PR to address the issue:
https://github.com/theforeman/foreman-documentation/pull/2305