Bug 1882469 - hammer content-view remove -h doesn't contain option --lifecycle-environments [NEEDINFO]
Summary: hammer content-view remove -h doesn't contain option --lifecycle-environments
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-24 16:14 UTC by tstrych
Modified: 2021-04-29 07:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
ofedoren: needinfo? (chrobert)


Attachments (Terms of Use)

Description tstrych 2020-09-24 16:14:38 UTC
Description of problem:
SSIA


Version-Release number of selected component (if applicable):
6.8 snap 15

How reproducible:
Always

Steps to Reproduce:
1. hammer content-view remove -h

Actual results:


Expected results:


Additional info:

# hammer content-view remove -h | grep lifecycle-environment

 --environment-ids ENVIRONMENT_IDS                     (--environment-ids is deprecated: Use --lifecycle-environment-ids instead)
 --environments ENVIRONMENT_NAMES                      (--environments is deprecated: Use --lifecycle-environments instead)
 --lifecycle-environment-ids LIFECYCLE_ENVIRONMENT_IDS Environment ids to remove

`--lifecycle-environments` is mentioned but it's written as possible option

Comment 1 Oleh Fedorenko 2021-04-20 14:53:13 UTC
Hello,

could you please elaborate what the expected outcomes are?

As I can see, API docs mention that for PUT /katello/api/content_views/:id/remove environment params are optional, so they are in hammer.

Comment 2 tstrych 2021-04-21 12:51:41 UTC
Firstly, sorry, now when I read this I did not understand from this BZ what do I want from you. So I will explain it here once more, hopefully better.

hammer content-view remove -h
>> displays:


<omitted>
 --environment-ids ENVIRONMENT_IDS                     (--environment-ids is deprecated: Use --lifecycle-environment-ids instead)
                                                       Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                       JSON is acceptable and preferred way for complex parameters
 --environments ENVIRONMENT_NAMES                      (--environments is deprecated: Use --lifecycle-environments instead)
                                                       Comma separated list of values. Values containing comma should be quoted or escaped with backslash.

<omitted>
 --key-environment-id KEY_ENVIRONMENT_ID               Environment to reassign orphaned activation keys to
 --lifecycle-environment-ids LIFECYCLE_ENVIRONMENT_IDS Environment ids to remove
                                                       Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                       JSON is acceptable and preferred way for complex parameters
 --name NAME                                           Content view name to search by
<omitted>

As you can see there is a mention of --lifecycle-environment-ids and --lifecycle-environments
But --lifecycle-environment-ids is mentioned and  --lifecycle-environments is not.

Expected result. 
--lifecycle-environments should me mentioned between the options

Comment 3 tstrych 2021-04-21 17:21:49 UTC
As you can see there is a mention of --lifecycle-environment-ids and --lifecycle-environments in description of --environments-ids and --environments.
But option --lifecycle-environment-ids is mentioned and  --lifecycle-environments is not.

Comment 4 Oleh Fedorenko 2021-04-21 20:09:08 UTC
Thanks for the better explanation! Now I see the problem.

This was already fixed in upstream, see
https://github.com/Katello/katello/pull/9122
https://github.com/Katello/hammer-cli-katello/pull/778

Unfortunatelly, I'm not sure if we can backport this. Although, I'd rather ask Katello guys, maybe it's not so difficult. What do you think, Chris?


Note You need to log in before you can comment on or make changes to this bug.