Bug 1179356

Summary: [RFE] hammer sync-plan-create and repository-set should use labels
Product: Red Hat Satellite Reporter: Chris Roberts <chrobert>
Component: Content ManagementAssignee: David Davis <daviddavis>
Status: CLOSED NEXTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0.6CC: bbuckingham, bkearney, daviddavis, jindrich.novy, rjerrido, xdmoon
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
URL: http://projects.theforeman.org/issues/10181
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-11 18:42:13 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:

Description Chris Roberts 2015-01-06 15:18:05 UTC
I'm creating sync plans and repositories assignments among other things automatically via hammer tool.

e.g.:

$ hammer sync-plan create --interval=daily --name='Daily sync' --organization=$ORG

When I want to assign the sync plan to a product I need to list all sync plans, get an id and then assign the sync plan to product via the id because referencing of sync plan by name fails:

$ hammer product set-sync-plan --sync-plan='Daily sync' --organization=$ORG --name='Red Hat Enterprise Linux Server'
Could not assign synchronization plan.:
  Error: option '--sync_plan_id' is required

The solution is to add --label option that will assign a tag to a sync plan or repository so that there is no ambiguity in sync plan/repo specification.

Needing to manually parse IDs is just a design flaw as there is no reason to even have --sync-plan, etc. options when they are ambiguous.

Comment 2 RHEL Program Management 2015-01-06 15:24:42 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Bryan Kearney 2015-04-17 18:19:22 UTC
Created redmine issue http://projects.theforeman.org/issues/10181 from this bug

Comment 6 Bryan Kearney 2016-08-10 16:05:36 UTC
Upstream bug component is Content Management

Comment 7 Bryan Kearney 2016-08-10 19:05:32 UTC
Upstream bug component is Hammer - Content

Comment 8 Bryan Kearney 2016-08-10 20:06:29 UTC
Upstream bug component is Content Management

Comment 9 Bryan Kearney 2016-08-10 22:06:17 UTC
Upstream bug component is Hammer - Content

Comment 10 Jitendra Yejare 2017-07-12 09:37:40 UTC
Upstream bug component is Content Management