Problem: Running: hammer content-view filter rule create --content-view-id ${CVID}
–content-view-filter-id ${CVFID} --end-date “2020-09-30” --types enhancement,bugfix,security
I get back:
Could not create filter rule:
unknown attribute 'end_date" for Katello::ContentViewPackageFilterRule
Expected outcome: The filter rule gets created.
Foreman and Proxy versions: foreman 2.1.4-1, katello 3.16.2-1
Foreman and Proxy plugin versions:
Distribution and version: CentOS 7.9
Other relevant data: I successfully ran:
IDs=$(hammer repository list --product el7_repos | grep -E ‘base_x86_64|epel|extras|updates’ | awk ‘{ print $1 }’ | sort -n | tr ‘\n’ ', ')
hammer content-view create --name “el7_content_by_date” --description “Content view for CentOS 7 by date” --repository-ids ${IDs%?} --solve-dependencies true
CVID=$(hammer content-view list | grep el7_content_by_date | awk ‘{ print $1 }’)
hammer content-view filter create --content-view-id ${CVID} --description “Filter for OS packages without errata” --inclusion true --name “OS Filter without Errata” --original-packages true --repository-ids ${IDs%?} --type rpm
Never mind. I was using this at the wrong location.
1 Like
OK, forget the never mind.
I’m trying to create a content view for CentOS 7 rpms packages without errata to end at the date just after 7.9 was released. I created the content view:
IDs=$(hammer repository list --product el7_repos | grep -E ‘base_x86_64|epel|extras|updates’ | awk ‘{ print $1 }’ | sort -n | tr ‘\n’ ', ')
hammer content-view create --name “el7_content_by_date” --description “Content view for CentOS 7 by date” --repository-ids ${IDs%?} --solve-dependencies true
CVID=$(hammer content-view list | grep el7_content_by_date | awk ‘{ print $1 }’)
hammer content-view filter create --content-view-id ${CVID} --description “Filter for OS packages without errata” --inclusion true --name “OS Filter without Errata” --original-packages true --repository-ids ${IDs%?} --type rpm
Now, I am trying to create the rule with the end date:
hammer content-view filter rule create --content-view-id ${CVID} --content-view-filter-id ${CVFID} --end-date 2020-09-30
and I get back:
Could not create the filter rule:
unknown attribute ‘end_date’ for Katello::ContentViewPackageFilterRule
What am I doing wrong?
I think the end_date
parameter can only be used for errata filters (--type erratum
), but the filter you created was an rpm
filter.
Thanks! I eventually came to the same conclusion.