Bug 2228784

Summary: [RFE] Generating curl command for registering hosts to Capsule should not allow to select the Activation Key/Lifecycle Env if the same lifecycle env is not added to Capsule.
Product: Red Hat Satellite Reporter: Jayant Bhatia <jbhatia>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.14.0CC: lstejska, nalfassi, rlavi
Target Milestone: UnspecifiedKeywords: FutureFeature, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

Description Jayant Bhatia 2023-08-03 09:07:12 UTC
Description of problem:

Generating curl command for registering client host to Capsule using Global Registration Template method, should not allow to select the Activation Key if the Lifecycle Environment associated with Activation Key is not added to Capsule. 


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


How reproducible: Always


Steps to Reproduce:

1. Deploy a Satellite 6.14 server (say 'satellite.example.com') and a Capsule-6.14 server (say 'capsule.example.com). Then synchronize any repositories (For example: 'Red Hat Satellite Client 6 for RHEL 8 x86_64 RPMs', 'Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs' and 'Red Hat Satellite Client 6 for RHEL 7 Server RPMs x86_64').

2. Create a new lifecycle environment (say 'prod'). Also create a new content view (say 'cv_1'). Add any repository (say 'Red Hat Satellite Client 6 for RHEL 8 x86_64 RPMs') to 'cv_1'. Publish a new version of 'cv_1' and promote the newly published version to 'prod' lifecycle environment.

3. Navigate to Satellite WebUI -> Infrastructure -> Capsule -> Capsule_Name -> Content -> Edit and add 'prod' lifecycle environment to Capsule server. Note here that only 'prod' lifecycle environment is added to Capsule and 'Library' lifecycle environment is not added to Capsule.

4. Create a Activation Key (say 'AK_1') and associate 'Library' lifecycle environment and 'Default Organization View' content view to the 'AK_1'. 

5. Navigate to Satellite WebUI -> Hosts -> Register Host. Select Capsule as 'capsule.example.com'). Set 'AK_1' as 'Activation Keys'. Go to 'Advanced' tab and select Lifecycle Environment as 'Library'.


Actual results: The Library lifecycle environment is not added to Capsule. Still after selecting Capsule, the value for Activation Key can be set as 'AK_1' with which Library lifecycle environment is associated. Also lifecycle environment can be selected as 'Library'.


Expected results: The page should not allow to set 'Activation_Key' as 'AK_1' and 'Lifecycle environment' as 'Library'. Because only prod lifecycle environment is added to Capsule and 'Library' lifecycle environment is not added to Capsule.