Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.15.z] add hypervisor host and guest subscription status and mapping check mapping #15206

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions tests/foreman/virtwho/ui/test_esx_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TestVirtwhoConfigforEsx:
@pytest.mark.upgrade
@pytest.mark.parametrize('deploy_type_ui', ['id', 'script'], indirect=True)
def test_positive_deploy_configure_by_id_script(
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui, default_location
):
"""Verify configure created and deployed with id.

Expand All @@ -50,12 +50,24 @@ def test_positive_deploy_configure_by_id_script(
1. Config can be created and deployed by command or script
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Virtual sku can be generated and attached
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted

:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
hypervisor_display_name = org_session.contenthost.search(hypervisor_name)[0]['Name']
hypervisorhost = org_session.contenthost.read_legacy_ui(hypervisor_display_name)
assert hypervisorhost['details']['subscription_status'] == 'Simple Content Access'
assert hypervisorhost['details']['virtual_guest'] == '1 Content Host'
# Check virtual guest subscription status and hypervisor host and virtual guest mapping in Legacy UI
virtualguest = org_session.contenthost.read_legacy_ui(guest_name)
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

@pytest.mark.tier2
def test_positive_debug_option(
Expand Down
16 changes: 14 additions & 2 deletions tests/foreman/virtwho/ui/test_hyperv_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestVirtwhoConfigforHyperv:
@pytest.mark.tier2
@pytest.mark.parametrize('deploy_type_ui', ['id', 'script'], indirect=True)
def test_positive_deploy_configure_by_id_script(
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui, default_location
):
"""Verify configure created and deployed with id.

Expand All @@ -35,12 +35,24 @@ def test_positive_deploy_configure_by_id_script(
1. Config can be created and deployed by command or script
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Virtual sku can be generated and attached
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted

:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
hypervisor_display_name = org_session.contenthost.search(hypervisor_name)[0]['Name']
hypervisorhost = org_session.contenthost.read_legacy_ui(hypervisor_display_name)
assert hypervisorhost['details']['subscription_status'] == 'Simple Content Access'
assert hypervisorhost['details']['virtual_guest'] == '1 Content Host'
# Check virtual guest subscription status and hypervisor host and virtual guest mapping in Legacy UI
virtualguest = org_session.contenthost.read_legacy_ui(guest_name)
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

@pytest.mark.tier2
def test_positive_hypervisor_id_option(
Expand Down
16 changes: 14 additions & 2 deletions tests/foreman/virtwho/ui/test_kubevirt_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestVirtwhoConfigforKubevirt:
@pytest.mark.tier2
@pytest.mark.parametrize('deploy_type_ui', ['id', 'script'], indirect=True)
def test_positive_deploy_configure_by_id_script(
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui, default_location
):
"""Verify configure created and deployed with id.

Expand All @@ -35,12 +35,24 @@ def test_positive_deploy_configure_by_id_script(
1. Config can be created and deployed by command or script
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Virtual sku can be generated and attached
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted

:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
hypervisor_display_name = org_session.contenthost.search(hypervisor_name)[0]['Name']
hypervisorhost = org_session.contenthost.read_legacy_ui(hypervisor_display_name)
assert hypervisorhost['details']['subscription_status'] == 'Simple Content Access'
assert hypervisorhost['details']['virtual_guest'] == '1 Content Host'
# Check virtual guest subscription status and hypervisor host and virtual guest mapping in Legacy UI
virtualguest = org_session.contenthost.read_legacy_ui(guest_name)
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

@pytest.mark.tier2
def test_positive_hypervisor_id_option(
Expand Down
16 changes: 14 additions & 2 deletions tests/foreman/virtwho/ui/test_libvirt_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestVirtwhoConfigforLibvirt:
@pytest.mark.tier2
@pytest.mark.parametrize('deploy_type_ui', ['id', 'script'], indirect=True)
def test_positive_deploy_configure_by_id_script(
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui, default_location
):
"""Verify configure created and deployed with id.

Expand All @@ -35,12 +35,24 @@ def test_positive_deploy_configure_by_id_script(
1. Config can be created and deployed by command or script
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Virtual sku can be generated and attached
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted

:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
hypervisor_display_name = org_session.contenthost.search(hypervisor_name)[0]['Name']
hypervisorhost = org_session.contenthost.read_legacy_ui(hypervisor_display_name)
assert hypervisorhost['details']['subscription_status'] == 'Simple Content Access'
assert hypervisorhost['details']['virtual_guest'] == '1 Content Host'
# Check virtual guest subscription status and hypervisor host and virtual guest mapping in Legacy UI
virtualguest = org_session.contenthost.read_legacy_ui(guest_name)
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

@pytest.mark.tier2
def test_positive_hypervisor_id_option(
Expand Down
17 changes: 15 additions & 2 deletions tests/foreman/virtwho/ui/test_nutanix_sca.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TestVirtwhoConfigforNutanix:
@pytest.mark.tier2
@pytest.mark.parametrize('deploy_type_ui', ['id', 'script'], indirect=True)
def test_positive_deploy_configure_by_id_script(
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui
self, module_sca_manifest_org, org_session, form_data_ui, deploy_type_ui, default_location
):
"""Verify configure created and deployed with id.

Expand All @@ -39,11 +39,24 @@ def test_positive_deploy_configure_by_id_script(
1. Config can be created and deployed by command or script
2. No error msg in /var/log/rhsm/rhsm.log
3. Report is sent to satellite
4. Config can be deleted
4. Subscription Status set to 'Simple Content Access', and generate mapping in Legacy UI
5. Config can be deleted

:CaseImportance: High
"""
hypervisor_name, guest_name = deploy_type_ui
# Check virt-wh oconfig status
assert org_session.virtwho_configure.search(form_data_ui['name'])[0]['Status'] == 'ok'
# Check Hypervisor host subscription status and hypervisor host and virtual guest mapping in Legacy UI
org_session.location.select(default_location.name)
hypervisor_display_name = org_session.contenthost.search(hypervisor_name)[0]['Name']
hypervisorhost = org_session.contenthost.read_legacy_ui(hypervisor_display_name)
assert hypervisorhost['details']['subscription_status'] == 'Simple Content Access'
assert hypervisorhost['details']['virtual_guest'] == '1 Content Host'
# Check virtual guest subscription status and hypervisor host and virtual guest mapping in Legacy UI
virtualguest = org_session.contenthost.read_legacy_ui(guest_name)
assert virtualguest['details']['subscription_status'] == 'Simple Content Access'
assert virtualguest['details']['virtual_host'] == hypervisor_display_name

@pytest.mark.tier2
def test_positive_hypervisor_id_option(
Expand Down
Loading