Hammer CLI CSV: Issueshttps://projects.theforeman.org/https://projects.theforeman.org/favicon.ico?16970236342017-05-31T09:20:19ZForeman
Redmine Bug #19718 (Closed): content-views import fails when content view has not yet been publishedhttps://projects.theforeman.org/issues/197182017-05-31T09:20:19ZAndrew Kofinkakofink@redhat.com
<p>hammer_cli_csv-2.2.1.1</p>
<p>1. Create a content view (no repos necessary; do not publish)<br />2. Export content views (`hammer csv content-views --export --file /tmp/content_views.csv`)<br />3. Import the content views (`hammer csv content-views --file /tmp/content_views.csv)</p>
<p>Results:<br />NoMethodError (undefined method `each' for nil:NilClass):<br /> /home/vagrant/hammer-cli-csv/lib/hammer_cli_csv/content_views.rb:155:in `promote_content_view'</p> Bug #18864 (Closed): As a user, I want a way to clear existing subs during --itemized-subscriptio...https://projects.theforeman.org/issues/188642017-03-10T10:24:52ZThomas McKaythomasmckay@redhat.com
<p>Importing an itemized subscriptions only adds subs, there is no way to clear existing ones.</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 #18723 (Duplicate): Hammer csv content-views fails to export/import Composite Content Viewshttps://projects.theforeman.org/issues/187232017-02-28T09:20:36ZThomas McKaythomasmckay@redhat.com
<p>Cloned from <a class="external" href="https://bugzilla.redhat.com/show_bug.cgi?id=1427456">https://bugzilla.redhat.com/show_bug.cgi?id=1427456</a></p>
<p><strong>Description of problem:</strong></p>
<p>Hi,</p>
<p>I'm exporting/importing Composite content views from a Satellite system to a new Satellite system and the import process of composite content views generates a extraneous column:</p>
<p>$ cat content_views.csv<br />Name,Label,Organization,Composite,Repositories or Composites,Lifecycle Environments<br />...<br />WAF,1,WAF,MyOrg,Yes,"CV_RHEL72,CV_SECURITY,CV_BASE","Library,Production,QA"</p>
<p>The second column ("1") should not be there, as it shifts the columns and the import process fails with "WAF is not a valid organization".</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. hammer csv content-views > cv.csv<br />2. hammer csv content-views --continue-on-errors --file cv.csv</p> Bug #18616 (Closed): Unable to hammer csv import products : 422 Unprocessable Entityhttps://projects.theforeman.org/issues/186162017-02-21T14:04:22ZThomas McKaythomasmckay@redhat.com
<p>Cloned from <a class="external" href="https://bugzilla.redhat.com/show_bug.cgi?id=1425434">https://bugzilla.redhat.com/show_bug.cgi?id=1425434</a></p>
<p><strong>Description of problem:</strong></p>
<p>I'm trying to import the 'products' CSV generated in one Satellite instance in a new Satellite instance with the same Organization name, and get a "422 Unprocesable Entity" when restoring a product that uses Red Hat CDN repositories.</p>
<p>Digging a bit deeper, it seems that hammer csv is not able to cope with repositories that do not have tagged releasever information (eg: RHEL Extras, Satellite, Cloudforms, others).</p>
<p><strong>Version-Release number of selected component (if applicable):</strong></p>
<p>Satellite 627<br />tfm-rubygem-hammer_cli_csv-2.2.1.1-1.el7sat.noarch</p>
<p><strong>How reproducible:</strong></p>
<p>Have a CSV that refers to Products without a releasever field and try to import them:</p>
<p>#</p>
<ol>
<li>hammer csv products --no-sync < products.csv <br />Error: 422 Unprocessable Entity<br />Red Hat Satellite Capsule,Red_Hat_Satellite_Capsule,MyOrg,,Red Hat Satellite Capsule 6.2 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) (RPMs),,<a class="external" href="https://cdn.redhat.com/">https://cdn.redhat.com/</a><br />content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.2/os,No,No,No,immediate,,</li>
</ol>
<p>The following message can be found in /var/log/foreman/production.log :</p>
<p>2017-02-21 06:46:54 [app] [E] Katello::Errors::CdnSubstitutionError: ["releasever"] cannot be specified for Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) (RPMs) as that information is not substituable in /content/dist/rhel/server/7/7Server/$basearch/sat-capsule/6.2/os</p>
<ol>
<li>grep Satellite products.csv<br />Red Hat Satellite Capsule,Red_Hat_Satellite_Capsule,MyOrg,,Red Hat Satellite Capsule 6.2 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) (RPMs),,<a class="external" href="https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.2/os,No,No,No,immediate">https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.2/os,No,No,No,immediate</a>,,<br />Red Hat Satellite Capsule,Red_Hat_Satellite_Capsule,MyOrg,,Red Hat Satellite Capsule 6.1 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Capsule 6.1 (for RHEL 7 Server) (RPMs),,<a class="external" href="https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.1/os,No,No,No,immediate">https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-capsule/6.1/os,No,No,No,immediate</a>,,<br />Red Hat Satellite,Red_Hat_Satellite,MyOrg,,Red Hat Satellite 6.2 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite 6.2 (for RHEL 7 Server) (RPMs),,<a class="external" href="https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/satellite/6.2/os,No,No,No,immediate">https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/satellite/6.2/os,No,No,No,immediate</a>,,<br />Red Hat Satellite,Red_Hat_Satellite,MyOrg,,Red Hat Satellite 6.1 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite 6.1 (for RHEL 7 Server) (RPMs),,<a class="external" href="https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/satellite/6.1/os,No,No,No,immediate">https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/satellite/6.1/os,No,No,No,immediate</a>,,<br />Red Hat Enterprise Linux Server,Red_Hat_Enterprise_Linux_Server,MyOrg,,Red Hat Satellite Tools 6.2 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Tools 6.2 (for RHEL 7 Server) (RPMs),,<a class="external" href="https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6.2/os,No,No,No,immediate">https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6.2/os,No,No,No,immediate</a>,,<br />Red Hat Enterprise Linux Server,Red_Hat_Enterprise_Linux_Server,MyOrg,,Red Hat Satellite Tools 6.1 for RHEL 7 Server RPMs x86_64,Red Hat Yum,Red Hat Satellite Tools 6.1 (for RHEL 7 Server) (RPMs),,<a class="external" href="https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6.1/os,No,No,No,immediate">https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6.1/os,No,No,No,immediate</a>,,</li>
</ol> Bug #18384 (Closed): "namify" the Guest of Host columnhttps://projects.theforeman.org/issues/183842017-02-02T22:09:43ZThomas McKaythomasmckay@redhat.com
<p>When using the --prefix option, also namify the Guest of Host column</p>
<pre>
Name,Count,Organization,Environment,Content View,Host Collections,Virtual,Guest of Host,OS,Arch,Sockets,RAM,Cores,SLA,Products,Subscriptions
hypervisor-green,1,"Example Corporation",Library,Default Organization View,"hypervisors",No,,RHEL 7Server,x86_64,1,4 GB,1,,,""
green-guest-%d,1,"Example Corporation",Library,Default Organization View,,Yes,hypervisor-green,RHEL 7Server,x86_64,1,4GB,1,,"69|Red Hat Enterprise Linux Server",
</pre>
<p>With --prefix ABC, the green-guest hosts should have their hypervisors ABChypervisor-green</p> Bug #18325 (Duplicate): content-views export of composite includes the "count" columnhttps://projects.theforeman.org/issues/183252017-01-31T13:50:02ZThomas McKaythomasmckay@redhat.com
<p>Export should not include the count column. To reproduce, create a ccv and then --export</p> Bug #15916 (Closed): As a developer, I want VCR test infrastructure added.https://projects.theforeman.org/issues/159162016-07-29T15:36:45ZThomas McKaythomasmckay@redhat.com
<p>The rake tests should be runnable against either a live server or with saved VCR output. Add this to hammer-cli-csv.</p>