Project

General

Profile

Feature #17154

[RFE] hammer should allow to set download policy when enabling a repository

Added by Daniel Moessner almost 3 years ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from : https://bugzilla.redhat.com/show_bug.cgi?id=1390519

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): latest available version

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 \
> 
> 

History

#1 Updated by Brad Buckingham almost 3 years ago

  • Project changed from Foreman Remote Execution to Katello
  • Category changed from CLI to Repositories

#2 Updated by Eric Helms almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 114

Also available in: Atom PDF