Hammer CLI CSV: Issueshttps://projects.theforeman.org/https://projects.theforeman.org/favicon.ico?16970236342017-06-05T11:30:06ZForeman
Redmine Bug #19927 (Closed): Hammer csv import package rules doesn't handle rules with the same namehttps://projects.theforeman.org/issues/199272017-06-05T11:30:06ZDavid Davisdaviddavis@redhat.com
<p>Steps to reproduce:</p>
<p>1. Create a content view with a package filter<br />2. Create two rules on this filter with the same name (e.g. exclude vim version > 3.0 and vim version = 3.0)<br />3. Export your filters<br />4. Remove the filters<br />5. Do an import</p>
<p>Expected results:</p>
<p>Your filter should have two rules (e.g. exclude vim version > 3.0 and vim version = 3.0)</p>
<p>Actual result:</p>
<p>Your filter only has one rule, the second one (e.g. vim version = 3.0).</p>
<p>The problem is that name isn’t unique across filter rules but hammer csv assumes it is:</p>
<p><a class="external" href="https://git.io/vHVBG">https://git.io/vHVBG</a><br /><a class="external" href="https://git.io/vHVBE">https://git.io/vHVBE</a></p> Bug #19915 (New): Support importing/exporting package group filtershttps://projects.theforeman.org/issues/199152017-06-04T15:59:02ZDavid Davisdaviddavis@redhat.com
<p>Support importing/exporting of package group filters. It looks like currently, we just export the name of the package group that the filter rule is acting on but this is insufficient since the name could exist in two different repositories. You'll note for example that you can see package group AND repo name when you go to create a package filter rule.</p>
<p>Also, we need to support importing of package filters. It looks like the code that exists is incomplete.</p> Bug #19724 (New): Support importing/exporting erratum filtershttps://projects.theforeman.org/issues/197242017-05-31T15:01:30ZDavid Davisdaviddavis@redhat.com
<p>Create an erratum filter and export it via csv. You'll get something like:</p>
<pre>
Name,Content View,Organization,Type,Description,Repositories,Rules
ERRATFILTER,Test,Default Organization,Exclude unknown,,"","start = 2012-01-01,end = 2013-01-01,""types = bugfix,enhancement,security"""
PKGFILTER,Test,Default Organization,Exclude Packages,,zoolander,test|=|3.0
</pre>
<p>Notice the type for my ERRATFILTER is unknown.</p>
<p>Relevant code: <a class="external" href="https://git.io/vHBhC">https://git.io/vHBhC</a></p> Bug #18829 (Duplicate): Hammer csv content-view-filters fails to export a date-based Erratum filterhttps://projects.theforeman.org/issues/188292017-03-07T15:52:43ZThomas McKaythomasmckay@redhat.com
<p>Cloned from <a class="external" href="https://bugzilla.redhat.com/show_bug.cgi?id=1428376">https://bugzilla.redhat.com/show_bug.cgi?id=1428376</a></p>
<p><strong>Description of problem:</strong></p>
<p>Hammer csv content-view-filters cannot properly handle CV Filters that use date-based Erratum. The export has the following output :</p>
<p>Name,Content View,Organization,Type,Description,Repositories,Rules<br />Errata until 2017-01-01,CV_RHEL72,MyOrg,Include unknown,,"","start = 2000-12-31,end = 2016-12-31,""types = security,enhancement,bugfix"""</p>
<p>The "Include unknown" field is wrong, and makes the import process fail:</p>
<p>Error: 500 Internal Server Error<br />Errata until 2017-01-01,CV_RHEL72,MyOrg,Include unknown,,"","start = 2000-12-31,end = 2016-12-31,""types = security,enhancement,bugfix"""</p>
<p>Excerpt from foreman/production.log :</p>
<p>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<br />2017-03-02 06:19:45 [app] [I] Processing by Katello::Api::V2::ContentViewFiltersController#create as JSON<br />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<br />"=>"v2", "content_view_id"=>"9", "content_view_filter"=>{"name"=>"Errata until 2017-01-01", "type"=>"unknown", "inclusion"=>true, "description"=>nil, "repository_ids"=>nil}}<br />2017-03-02 06:19:45 [app] [I] Authorized user admin(Admin User)<br />2017-03-02 06:19:45 [app] [E] RuntimeError: Invalid content type 'unknown' provided. Content types can be one of rpm, package_group, erratum</p>
<p><strong>Version-Release number of selected component (if applicable):</strong></p>
<p>Satellite 6.2.7<br />tfm-rubygem-hammer_cli-0.5.1.12-1.el7sat.noarch<br />tfm-rubygem-hammer_cli_csv-2.2.1.1-1.el7sat.noarch</p>
<p><strong>How reproducible:</strong><br />Always</p>
<p><strong>Steps to Reproduce:</strong><br />1. Generate a new CV Filter with the following options : <br /> - Content type: by date and type<br /> - Inclusion type: Include<br /> - Errata type: security, enhancement, bugfix<br /> - Date type: "Updated on" <br /> - Start date: <blank><br /> - End date: eg: 2017-01-01<br />2. hammer csv content-view-filters --export <br />3. Try to import the filter in another organization.</p> Bug #17725 (New): import/export docker content-view-filtershttps://projects.theforeman.org/issues/177252016-12-18T16:36:31ZThomas McKaythomasmckay@redhat.com
<p>Blocked by <a class="external" href="https://github.com/Katello/katello/pull/6441">https://github.com/Katello/katello/pull/6441</a></p>
<p>export/import docker filters</p>