Bug 1390519

Summary: [RFE] hammer should allow to set download policy when enabling a repo
Product: Red Hat Satellite Reporter: daniel <dmoessne>
Component: RepositoriesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.3CC: bbuckingham, dhlavacd, inecas, jcallaha, razvan.vilt, tstrachota
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 19:14:41 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:

Description daniel 2016-11-01 09:55:46 UTC
Description of problem:
Independent from the default download policy (hammer settings set --name default_download_policy --value <policy>) the download policy can be set on a repository level by running:

~~~
hammer repository update \
 --organization Red Hat \
 --product 'Red Hat Enterprise Linux Server' \
 --name 'Red Hat Satellite Tools 6.2 for RHEL 6 Server RPMs x86_64' \
 --download-policy on_demand
~~~

But it cannot be run when enabling a repository:
~~~
# hammer repository-set enable \
  --product 'Red Hat Satellite Capsule' \
  --basearch='x86_64' \
  --name 'Red Hat Satellite Capsule 6.2 (for RHEL 6 Server) (RPMs)' \
  --download-policy background \
Could not enable repository:
  Error: Unrecognised option '--download-policy'
  
  See: 'hammer repository-set enable --help'
~~~

Having a look at `hammer repository-set enable --help` shows that download policy cannot be set during enabling the repository which is annoying as one has to run commands twice just because of this option.
Therefore it should be possible to set default download policy during enabling repos

Version-Release number of selected component (if applicable): Satellite 6.2.3 (latest available update)


How reproducible:
- Try to set download policy when enabling repository 


Steps to Reproduce:
1.
~~~
# hammer repository-set enable \
  --product 'Red Hat Satellite Capsule' \
  --basearch='x86_64' \
  --name 'Red Hat Satellite Capsule 6.2 (for RHEL 6 Server) (RPMs)' \
  --download-policy background \
Could not enable repository:
  Error: Unrecognised option '--download-policy'
  
  See: 'hammer repository-set enable --help'
~~~


Actual results:
It is not possible to set download policy during enablement of repos


Expected results:
allow to set download policy during enablement of repo, like:
~~~
# hammer repository-set enable \
  --product 'Red Hat Satellite Capsule' \
  --basearch='x86_64' \
  --name 'Red Hat Satellite Capsule 6.2 (for RHEL 6 Server) (RPMs)' \
  --download-policy background \
~~~


Additional info:

Comment 1 daniel 2016-11-01 10:07:02 UTC
created http://projects.theforeman.org/issues/17154

Comment 3 Bryan Kearney 2016-11-01 12:05:29 UTC
Upstream bug component is Remote Execution

Comment 4 Bryan Kearney 2018-09-04 19:01:58 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.

Comment 5 Bryan Kearney 2018-09-04 19:14:41 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.