Bug #24023
closedhammer content-view create --repositories doesn't work with --name
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:
- 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:
- 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
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
Updated by Christine Fouant over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-katello|1dc05861ed2121a5f02db6f70efdb367bf4cd61b.
Updated by Andrew Kofink over 6 years ago
- Translation missing: en.field_release set to 338