Project

General

Profile

Actions

Bug #24023

closed

hammer content-view create --repositories doesn't work with --name

Added by Christine Fouant over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:
whenever i try to create a content view with repositories attached to it (in a single command), it fails:

  1. hammer -u admin -p changeme --output=csv content-view create --product="qZUFXCqgiIwMirUQuLZH" --organization-id="134" --repositories="HLWrPBJDOVDVyal" --name="foo"
    Could not create the content view:
    Error: one of repositories not found.

the issues seems to be with using --repositories together with --name option.
While --name parameter is required (content view name), when --repositories is used, hammer uses the value of --name while querying for the repositories, which obviously yields 0 results:

  1. hammer -d -u admin -p changeme --output=csv content-view create --product="qZUFXCqgiIwMirUQuLZH" --organization-id="134" --repositories="HLWrPBJDOVDVyal" --name="foo"
    ...
    ...
    [ INFO 2018-06-05T05:06:53 API] GET /katello/api/products/889/repositories
    [DEBUG 2018-06-05T05:06:53 API] Params: {
    "name" => "foo",
    "names" => [
    [0] "HLWrPBJDOVDVyal"
    ]
    }
    [DEBUG 2018-06-05T05:06:53 API] Headers: {
    :params => {
    "name" => "foo",
    "names" => [
    [0] "HLWrPBJDOVDVyal"
    ]
    }
    }

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

How reproducible:
always

Steps to Reproduce:
1. # hammer -d -u admin -p changeme --output=csv content-view create --product="qZUFXCqgiIwMirUQuLZH" --organization-id="134" --repositories="HLWrPBJDOVDVyal" --name="foo"

Actual results:
unable to locate the repositories as hammer puts the content-view name into the search query.

this is a regression from 6.3

Actions #1

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/564 added
Actions #2

Updated by Christine Fouant over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by Andrew Kofink over 6 years ago

  • Translation missing: en.field_release set to 338
Actions

Also available in: Atom PDF