Bug 1465723 - hammer capsule content lists incorrect available life-cycle environments
hammer capsule content lists incorrect available life-cycle environments
Status: NEW
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer - Content (Show other bugs)
6.2.9
x86_64 Linux
medium Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-27 22:50 EDT by Amit Kumar Das
Modified: 2017-09-22 11:56 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Amit Kumar Das 2017-06-27 22:50:03 EDT
Description of problem:

I can reproduce and see that hammer is not working per defined descriptions.

# hammer capsule content --help
available-lifecycle-environments List the lifecycle environments not attached to the capsule
lifecycle-environments           List the lifecycle environments attached to the capsule


# hammer capsule content --help
lifecycle-environments       List the lifecycle environments attached to the capsule
available-lifecycle-environments   List the lifecycle environments not attached to the capsule

Version-Release number of selected component (if applicable):
Satellite 6.2.10

How reproducible:
Login to satellite server and execute hammer cli.

# hammer capsule content lifecycle-environments --id 2  
---|---------|-------------
ID | NAME    | ORGANIZATION
---|---------|-------------
1  | Library | GSS         
---|---------|-------------

# hammer capsule content available-lifecycle-environments --id 2  
---|---------|-------------
ID | NAME    | ORGANIZATION
---|---------|-------------
1  | Library | GSS            <--Attached Library to capsule shouldn't list here 
3  | prod    | GSS         
2  | dev     | GSS         

# hammer capsule content add-lifecycle-environment --id 2 --environment-id 3
Lifecycle environment successfully added to the capsule

# hammer capsule content lifecycle-environments --id 2
---|---------|-------------
ID | NAME    | ORGANIZATION
---|---------|-------------
3  | prod    | GSS         
1  | Library | GSS         
---|---------|-------------

# hammer capsule content available-lifecycle-environments --id 2 
---|---------|-------------
ID | NAME    | ORGANIZATION
---|---------|-------------
1  | Library | GSS                                                
3  | prod    | GSS           <--Attached Lib/prod to capsule shouldn't list here   
2  | dev     | GSS         
---|---------|-------------


Expected results:
Once environment-id attached to capsule, it should not list in "available-lifecycle-environments"


Additional info:
# hammer capsule content --help
Usage:
    hammer capsule content [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    subcommand
 [ARG] ...                     subcommand arguments

Subcommands:
 add-lifecycle-environment        Add lifecycle environments to the capsule
 available-lifecycle-environments List the lifecycle environments not attached to the capsule
 cancel-synchronization           Cancel running capsule synchronization.
 info                             Get current capsule synchronization status
 lifecycle-environments           List the lifecycle environments attached to the capsule
 remove-lifecycle-environment     Remove lifecycle environments from the capsule
 synchronization-status           Get current capsule synchronization status
 synchronize                      Synchronize the content to the capsule
Comment 1 Amit Kumar Das 2017-07-04 00:35:35 EDT
Hi,
Is it possible to get any patch or temporary fix for this issue. Customer needs this asap since they have large number of lifecycle environments(LC) ID's and capsules, and to find out all unattached LC envs for each capsule is a very tedious manual tasks. 
Thanks.

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