Project

General

Profile

Actions

Bug #18829

closed

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

Added by Thomas McKay about 7 years ago. Updated almost 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
Category:
content-view-filters
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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 1 (0 open1 closed)

Has duplicate Hammer CLI CSV - Bug #18344: Exporting composite content views results in an errant 1 in the fileClosedThomas McKay02/01/2017Actions
Actions #1

Updated by Thomas McKay about 7 years 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 166
Actions #2

Updated by Thomas McKay about 7 years ago

  • Has duplicate Bug #18344: Exporting composite content views results in an errant 1 in the file added
Actions #3

Updated by Thomas McKay about 7 years ago

  • Status changed from New to Duplicate
Actions #4

Updated by Fran Garcia about 7 years 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

Actions

Also available in: Atom PDF