Bug 803338

Summary: [RFE] Allow --product and/or --repo during filter creation
Product: Red Hat Satellite Reporter: Og Maciel <omaciel>
Component: HammerAssignee: Mike McCune <mmccune>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: bkearney, mmccune
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-08 18:43:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Og Maciel 2012-03-14 13:39:19 UTC
Description of problem:

Currently when one creates a filter with packages for an organization through the web ui, you have the option to select either a Product or one or more Repositories from that Product. i.e.

[ ] Product1: SystemEngine
[ ]  Repo1: Katello
[ ]  Repo2: Katello Agent
[ ]  Repo3: Tools

So you could add a package, *httpd*, to a new filter and associate that filter with Product1, all repositories of Product1, or one or more (total - 1) repositories.

The cli offers the following options:

[root@qetello02 ~]# katello filter create --help
Usage: katello [options]

Options:
  -h, --help            show this help message and exit
  -g                    grep friendly output
  -v                    verbose, more structured output
  -d DELIMITER          grep friendly output column delimiter
  --org=ORG             organization name (required)
  --name=NAME           filter name (required)
  --description=DESCRIPTION
                        description
  --packages=PACKAGES   comma-separated list of package names/nvres
[root@qetello02 ~]# katello filter add_package --help
Usage: katello [options]

Options:
  -h, --help            show this help message and exit
  -g                    grep friendly output
  -v                    verbose, more structured output
  -d DELIMITER          grep friendly output column delimiter
  --org=ORG             organization name (required)
  --name=NAME           filter name (required)
  --package=PACKAGE_ID  package id (required)
Version-Release number of selected component (if applicable):

The filter action would be the most intuitive entry point imho for anyone using the cli, but you'll notice that one cannot specify the Product to associate the filter to. That option is exposed in the *repo add_filter* action:

[root@qetello02 ~]# katello repo add_filter --help
Usage: katello [options]

Options:
  -h, --help         show this help message and exit
  -g                 grep friendly output
  -v                 verbose, more structured output
  -d DELIMITER       grep friendly output column delimiter
  --id=ID            repository id
  --name=NAME        repository name
  --org=ORG          organization name eg: foo.example.com
  --product=PRODUCT  product name eg: fedora-14
  --filter=FILTER    filter name (required)

It would be a nice feature to allow --product and/or --repo flags during a filter creation because it would be more intuitive to the user.

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Og Maciel 2012-03-14 13:43:00 UTC
Suggested workflow:

Associate filter with all repositories of given product:

* katello filter create --org Moscow --name "Filter httpd"  --packages httpd --org Moscow --product Product1

Associate filter with specific repository from product:

* katello filter create --org Moscow --name "Filter httpd"  --packages httpd --org Moscow --product Product1 --repo Repo1

Associate filter  with several repositories from product:

* katello filter create --org Moscow --name "Filter httpd"  --packages httpd --org Moscow --product Product1 --repo [Repo1, Repo3]

Comment 2 Bryan Kearney 2014-09-08 18:43:40 UTC
This bug is against he old CLI. I am closing this out. If you believe this was done in error, please feel free to re-open it.