Bug #18829

Hammer csv content-view-filters fails to export a date-based Erratum filter

Added by Thomas McKay 9 months ago. Updated 8 months ago.

Status:Duplicate
Priority:Normal
Assigned To:Thomas McKay
Category:content-view-filters
Target version:Katello - Team Tom - iteration 11
Difficulty: Pull request:
Bugzilla link:1428376
Story points-
Velocity based estimate-

Description

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

Description of problem:

Hammer csv content-view-filters cannot properly handle CV Filters that use date-based Erratum. The export has the following output :

Name,Content View,Organization,Type,Description,Repositories,Rules
Errata until 2017-01-01,CV_RHEL72,MyOrg,Include unknown,,"","start = 2000-12-31,end = 2016-12-31,""types = security,enhancement,bugfix"""

The "Include unknown" field is wrong, and makes the import process fail:

Error: 500 Internal Server Error
Errata until 2017-01-01,CV_RHEL72,MyOrg,Include unknown,,"","start = 2000-12-31,end = 2016-12-31,""types = security,enhancement,bugfix"""

Excerpt from foreman/production.log :

2017-03-02 06:19:45 [app] [I] Started POST "/katello/api/content_views/9/filters" for 192.168.124.31 at 2017-03-02 06:19:45 -0500
2017-03-02 06:19:45 [app] [I] Processing by Katello::Api::V2::ContentViewFiltersController#create as JSON
2017-03-02 06:19:45 [app] [I] Parameters: {"name"=>"Errata until 2017-01-01", "description"=>nil, "type"=>"unknown", "inclusion"=>true, "repository_ids"=>nil, "api_version
"=>"v2", "content_view_id"=>"9", "content_view_filter"=>{"name"=>"Errata until 2017-01-01", "type"=>"unknown", "inclusion"=>true, "description"=>nil, "repository_ids"=>nil}}
2017-03-02 06:19:45 [app] [I] Authorized user admin(Admin User)
2017-03-02 06:19:45 [app] [E] RuntimeError: Invalid content type 'unknown' provided. Content types can be one of rpm, package_group, erratum

Version-Release number of selected component (if applicable):

Satellite 6.2.7
tfm-rubygem-hammer_cli-0.5.1.12-1.el7sat.noarch
tfm-rubygem-hammer_cli_csv-2.2.1.1-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Generate a new CV Filter with the following options :
- Content type: by date and type
- Inclusion type: Include
- Errata type: security, enhancement, bugfix
- Date type: "Updated on"
- Start date: <blank>
- End date: eg: 2017-01-01
2. hammer csv content-view-filters --export
3. Try to import the filter in another organization.


Related issues

Duplicated by Hammer CLI CSV - Bug #18344: Exporting composite content views results in an errant 1 ... Closed 02/01/2017

History

#1 Updated by Thomas McKay 9 months ago

  • Project changed from Katello to Hammer CLI CSV
  • Subject changed from Hammer csv content-view-filters fails to export a date-based Erratum filter to Hammer csv content-view-filters fails to export a date-based Erratum filter
  • Category changed from Hammer to content-view-filters
  • Target version set to Team Tom - iteration 11

#2 Updated by Thomas McKay 8 months ago

  • Duplicated by Bug #18344: Exporting composite content views results in an errant 1 in the file added

#3 Updated by Thomas McKay 8 months ago

  • Status changed from New to Duplicate

#4 Updated by Fran Garcia 8 months ago

Hi Tom,

Quick one, this is not a duplicate of #18344 . This bug's about the content-view-filters, while the mentioned issue is about content-views . Could you please re-tag this one as 'Open'?

thanks!

Fran

Also available in: Atom PDF