Bug 1470777 - content-view-filter update --help appears to list an argument for a nonexistent attribute
content-view-filter update --help appears to list an argument for a nonexiste...
Status: NEW
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Views (Show other bugs)
6.2.10
x86_64 Linux
low Severity low (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-13 12:00 EDT by Rick Dixon
Modified: 2018-07-09 01:21 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rick Dixon 2017-07-13 12:00:12 EDT
Description of problem:

When I look at the help for this command:

	hammer> content-view filter rule update --help
	Usage:
		 content-view filter rule update [OPTIONS]

	Options:
	 --content-view CONTENT_VIEW_NAME                Content view name to search by
	 --content-view-filter CONTENT_VIEW_FILTER_NAME  Name to search by
	 --content-view-filter-id CONTENT_VIEW_FILTER_ID filter identifier
	 --content-view-id CONTENT_VIEW_ID               content view numeric identifier
	 --end-date END_DATE                             erratum: end date (YYYY-MM-DD)
	 --errata-id ERRATA_ID                           erratum: id
	 --id ID                                         rule identifier
	 --max-version MAX_VERSION                       package: maximum version
	 --min-version MIN_VERSION                       package: minimum version
	 --name NAME                                     Name to search by
	 --new-name NEW_NAME                             package or package group: name
	 --organization ORGANIZATION_NAME                Organization name to search by
	 --organization-id ORGANIZATION_ID               organization ID
	 --organization-label ORGANIZATION_LABEL         Organization label to search by
	 --start-date START_DATE                         erratum: start date (YYYY-MM-DD)
	 --types TYPES                                   erratum: types (enhancement, bugfix, security)
													 Comma separated list of values.
	 --version VERSION                               package: version
	 -h, --help                                      print help



It appears that I should be able to specify a content-view filter rule NAME.

There appear to be two issues with this:

  1) There is no NAME attribute for listed rules:

	hammer> content-view filter rule list --organization 'Default Organization' --content-view 'RHEL 7' --content-view-filter 'Errata through June 1 2017'
	--------|-----------|------|---------|-----------------|-----------------|-----------|------------|---------
	RULE ID | FILTER ID | NAME | VERSION | MINIMUM VERSION | MAXIMUM VERSION | ERRATA ID | START DATE | END DATE
	--------|-----------|------|---------|-----------------|-----------------|-----------|------------|---------
	4240    | 18        |      |         |                 |                 |           | 2017-06-30 |         
	--------|-----------|------|---------|-----------------|-----------------|-----------|------------|---------

  2) Even if I try to pass a string to search for, the attribute is unknown:

hammer> content-view filter rule update --organization 'Default Organization' --content-view 'RHEL 7' --content-view-filter 'Errata through June 1 2017' --name 'halp'
Could not update the filter rule:
  unknown attribute: name


Based on this, it appears that filter rules can *only* be updated by --id (which is the RULE ID). 

Can we either alter the --help file to remove the --name entry, or are there plans to include a NAME with filter rules at a later point?
Comment 1 Rick Dixon 2017-07-14 09:03:57 EDT
Clarification of specific ask:

   # content-view filter rule update --help

This states that we can use the --name attribute to update the filter rule.

Looking at the rule, the NAME field contains no value.

Hammer does not even appear to recognize name as an attribute.

The desired behavior: rules should inherit their name value from the content-view filter name, thereby allowing --name to work identically for both 'content-view filter list' and 'content-view filter update'.

Note You need to log in before you can comment on or make changes to this bug.