diff --git a/pytest_fixtures/component/rh_cloud.py b/pytest_fixtures/component/rh_cloud.py index 5085754452d..9116716d6ff 100644 --- a/pytest_fixtures/component/rh_cloud.py +++ b/pytest_fixtures/component/rh_cloud.py @@ -14,12 +14,10 @@ def rhcloud_manifest_org(module_target_sat, module_sca_manifest): @pytest.fixture(scope='module') def rhcloud_activation_key(module_target_sat, rhcloud_manifest_org): """A module-level fixture to create an Activation key in module_org""" - purpose_addons = "test-addon1, test-addon2" return module_target_sat.api.ActivationKey( content_view=rhcloud_manifest_org.default_content_view, organization=rhcloud_manifest_org, environment=module_target_sat.api.LifecycleEnvironment(id=rhcloud_manifest_org.library.id), - purpose_addons=[purpose_addons], service_level='Self-Support', purpose_usage='test-usage', purpose_role='test-role', diff --git a/tests/foreman/cli/test_activationkey.py b/tests/foreman/cli/test_activationkey.py index b6c7f984ddd..ee4d35853f6 100644 --- a/tests/foreman/cli/test_activationkey.py +++ b/tests/foreman/cli/test_activationkey.py @@ -1051,14 +1051,12 @@ def test_create_ak_with_syspurpose_set(module_sca_manifest_org, module_target_sa # Requires Cls org and manifest. Manifest is for self-support values. new_ak = module_target_sat.cli_factory.make_activation_key( { - 'purpose-addons': "test-addon1, test-addon2", 'purpose-role': "test-role", 'purpose-usage': "test-usage", 'service-level': "Self-Support", 'organization-id': module_sca_manifest_org.id, } ) - assert new_ak['system-purpose']['purpose-addons'] == "test-addon1, test-addon2" assert new_ak['system-purpose']['purpose-role'] == "test-role" assert new_ak['system-purpose']['purpose-usage'] == "test-usage" assert new_ak['system-purpose']['service-level'] == "Self-Support" @@ -1066,7 +1064,6 @@ def test_create_ak_with_syspurpose_set(module_sca_manifest_org, module_target_sa module_target_sat.cli.ActivationKey.update( { 'id': new_ak['id'], - 'purpose-addons': '', 'purpose-role': '', 'purpose-usage': '', 'service-level': '', @@ -1076,7 +1073,6 @@ def test_create_ak_with_syspurpose_set(module_sca_manifest_org, module_target_sa updated_ak = module_target_sat.cli.ActivationKey.info( {'id': new_ak['id'], 'organization-id': module_sca_manifest_org.id} ) - assert updated_ak['system-purpose']['purpose-addons'] == '' assert updated_ak['system-purpose']['purpose-role'] == '' assert updated_ak['system-purpose']['purpose-usage'] == '' @@ -1106,7 +1102,6 @@ def test_update_ak_with_syspurpose_values(module_sca_manifest_org, module_target org = module_sca_manifest_org new_ak = module_target_sat.cli_factory.make_activation_key({'organization-id': org.id}) # Assert system purpose values are null after creating the AK and adding the manifest. - assert new_ak['system-purpose']['purpose-addons'] == '' assert new_ak['system-purpose']['purpose-role'] == '' assert new_ak['system-purpose']['purpose-usage'] == '' @@ -1114,7 +1109,6 @@ def test_update_ak_with_syspurpose_values(module_sca_manifest_org, module_target module_target_sat.cli.ActivationKey.update( { 'id': new_ak['id'], - 'purpose-addons': "test-addon1, test-addon2", 'purpose-role': "test-role1", 'purpose-usage': "test-usage1", 'service-level': "Self-Support", @@ -1124,7 +1118,6 @@ def test_update_ak_with_syspurpose_values(module_sca_manifest_org, module_target updated_ak = module_target_sat.cli.ActivationKey.info( {'id': new_ak['id'], 'organization-id': org.id} ) - assert updated_ak['system-purpose']['purpose-addons'] == "test-addon1, test-addon2" assert updated_ak['system-purpose']['purpose-role'] == "test-role1" assert updated_ak['system-purpose']['purpose-usage'] == "test-usage1" assert updated_ak['system-purpose']['service-level'] == "Self-Support" @@ -1132,7 +1125,6 @@ def test_update_ak_with_syspurpose_values(module_sca_manifest_org, module_target module_target_sat.cli.ActivationKey.update( { 'id': new_ak['id'], - 'purpose-addons': "test-addon3, test-addon4", 'purpose-role': "test-role2", 'purpose-usage': "test-usage2", 'service-level': "Premium", @@ -1142,7 +1134,6 @@ def test_update_ak_with_syspurpose_values(module_sca_manifest_org, module_target updated_ak = module_target_sat.cli.ActivationKey.info( {'id': new_ak['id'], 'organization-id': org.id} ) - assert updated_ak['system-purpose']['purpose-addons'] == "test-addon3, test-addon4" assert updated_ak['system-purpose']['purpose-role'] == "test-role2" assert updated_ak['system-purpose']['purpose-usage'] == "test-usage2" assert updated_ak['system-purpose']['service-level'] == "Premium" diff --git a/tests/foreman/cli/test_host.py b/tests/foreman/cli/test_host.py index d659766f7f9..51833da3b22 100644 --- a/tests/foreman/cli/test_host.py +++ b/tests/foreman/cli/test_host.py @@ -1992,12 +1992,10 @@ def test_syspurpose_end_to_end( :parametrized: yes """ # Create an activation key with test values - purpose_addons = "test-addon1, test-addon2" activation_key = target_sat.api.ActivationKey( content_view=module_promoted_cv, environment=module_lce, organization=module_org, - purpose_addons=[purpose_addons], purpose_role="test-role", purpose_usage="test-usage", service_level="Self-Support", @@ -2009,14 +2007,12 @@ def test_syspurpose_end_to_end( rhel_contenthost.enable_repo(module_rhst_repo) host = target_sat.cli.Host.info({'name': rhel_contenthost.hostname}) # Assert system purpose values are set in the host as expected - assert host['subscription-information']['system-purpose']['purpose-addons'][0] == purpose_addons assert host['subscription-information']['system-purpose']['purpose-role'] == "test-role" assert host['subscription-information']['system-purpose']['purpose-usage'] == "test-usage" assert host['subscription-information']['system-purpose']['service-level'] == "Self-Support" # Change system purpose values in the host target_sat.cli.Host.update( { - 'purpose-addons': "test-addon3", 'purpose-role': "test-role2", 'purpose-usage': "test-usage2", 'service-level': "Self-Support2", @@ -2025,7 +2021,6 @@ def test_syspurpose_end_to_end( ) host = target_sat.cli.Host.info({'id': host['id']}) # Assert system purpose values have been updated in the host as expected - assert host['subscription-information']['system-purpose']['purpose-addons'][0] == "test-addon3" assert host['subscription-information']['system-purpose']['purpose-role'] == "test-role2" assert host['subscription-information']['system-purpose']['purpose-usage'] == "test-usage2" assert host['subscription-information']['system-purpose']['service-level'] == "Self-Support2" diff --git a/tests/foreman/data/hammer_commands.json b/tests/foreman/data/hammer_commands.json index 4f7651585b7..16149570123 100644 --- a/tests/foreman/data/hammer_commands.json +++ b/tests/foreman/data/hammer_commands.json @@ -520,12 +520,6 @@ "shortname": null, "value": null }, - { - "help": "Sets the system add-ons", - "name": "purpose-addons", - "shortname": null, - "value": "LIST" - }, { "help": "Sets the system purpose usage", "name": "purpose-role", @@ -752,7 +746,7 @@ "value": "BOOLEAN" }, { - "help": "Print help --------------------------------|-----|---------|----- | ALL | DEFAULT | THIN --------------------------------|-----|---------|----- | x | x | x | x | x | x | x | x | limit | x | x | attach | x | x | version | x | x | environment | x | x | view | x | x | hosts/id | x | x | hosts/name | x | x | collections/id | x | x | collections/name | x | x | overrides/content label | x | x | overrides/name | x | x | overrides/value | x | x | purpose/service level | x | x | purpose/purpose usage | x | x | purpose/purpose role | x | x | purpose/purpose addons | x | x | --------------------------------|-----|---------|----- you can find option types and the value an option can accept: One of true/false, yes/no, 1/0 Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format Possible values are described in the option's description Path to a file Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters Any combination of possible values described in the option's description Numeric value. Integer Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters Value described in the option's description. Mostly simple string", + "help": "Print help --------------------------------|-----|---------|----- | ALL | DEFAULT | THIN --------------------------------|-----|---------|----- | x | x | x | x | x | x | x | x | limit | x | x | attach | x | x | version | x | x | environment | x | x | view | x | x | hosts/id | x | x | hosts/name | x | x | collections/id | x | x | collections/name | x | x | overrides/content label | x | x | overrides/name | x | x | overrides/value | x | x | purpose/service level | x | x | purpose/purpose usage | x | x | purpose/purpose role | x | x | --------------------------------|-----|---------|----- you can find option types and the value an option can accept: One of true/false, yes/no, 1/0 Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format Possible values are described in the option's description Path to a file Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters Any combination of possible values described in the option's description Numeric value. Integer Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters Value described in the option's description. Mostly simple string", "name": "help", "shortname": "h", "value": null @@ -1321,12 +1315,6 @@ "shortname": null, "value": null }, - { - "help": "Sets the system add-ons", - "name": "purpose-addons", - "shortname": null, - "value": "LIST" - }, { "help": "Sets the system purpose usage", "name": "purpose-role", @@ -21592,12 +21580,6 @@ "shortname": null, "value": "NUMBER" }, - { - "help": "Sets the system add-ons", - "name": "purpose-addons", - "shortname": null, - "value": "LIST" - }, { "help": "Sets the system purpose usage", "name": "purpose-role", @@ -22364,7 +22346,7 @@ "value": "BOOLEAN" }, { - "help": "Print help -------------------------------------------------------------------------|-----|---------|----- | ALL | DEFAULT | THIN -------------------------------------------------------------------------|-----|---------|----- | x | x | x | x | x | | x | x | x | x | x | | x | x | group | x | x | resource | x | x | profile | x | x | name | x | x | | x | x | | x | x | at | x | x | report | x | x | (seconds) | x | x | Status/global status | x | x | Status/build status | x | x | Network/ipv4 address | x | x | Network/ipv6 address | x | x | Network/mac | x | x | Network/subnet ipv4 | x | x | Network/subnet ipv6 | x | x | Network/domain | x | x | Network/service provider/sp name | x | x | Network/service provider/sp ip | x | x | Network/service provider/sp mac | x | x | Network/service provider/sp subnet | x | x | interfaces/id | x | x | interfaces/identifier | x | x | interfaces/type | x | x | interfaces/mac address | x | x | interfaces/ipv4 address | x | x | interfaces/ipv6 address | x | x | interfaces/fqdn | x | x | system/architecture | x | x | system/operating system | x | x | system/build | x | x | system/medium | x | x | system/partition table | x | x | system/pxe loader | x | x | system/custom partition table | x | x | system/image | x | x | system/image file | x | x | system/use image | x | x | Parameters/ | x | x | parameters/ | x | x | info/owner | x | x | info/owner id | x | x | info/owner type | x | x | info/enabled | x | x | info/model | x | x | info/comment | x | x | proxy | x | x | information/content view environments/content view/id | x | x | information/content view environments/content view/name | x | x | information/content view environments/content view/composite | x | x | information/content view environments/lifecycle environment/id | x | x | information/content view environments/lifecycle environment/name | x | x | information/content source/id | x | x | information/content source/name | x | x | information/kickstart repository/id | x | x | information/kickstart repository/name | x | x | information/applicable packages | x | x | information/upgradable packages | x | x | information/applicable errata/enhancement | x | x | information/applicable errata/bug fix | x | x | information/applicable errata/security | x | x | information/uuid | x | x | information/last checkin | x | x | information/release version | x | x | information/autoheal | x | x | information/registered to | x | x | information/registered at | x | x | information/registered by activation keys/ | x | x | information/system purpose/service level | x | x | information/system purpose/purpose usage | x | x | information/system purpose/purpose role | x | x | information/system purpose/purpose addons | x | x | status | x | x | collections/id | x | x | collections/name | x | x | -------------------------------------------------------------------------|-----|---------|----- you can find option types and the value an option can accept: One of true/false, yes/no, 1/0 Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format Possible values are described in the option's description Path to a file Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters Any combination of possible values described in the option's description Numeric value. Integer Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters Value described in the option's description. Mostly simple string", + "help": "Print help -------------------------------------------------------------------------|-----|---------|----- | ALL | DEFAULT | THIN -------------------------------------------------------------------------|-----|---------|----- | x | x | x | x | x | | x | x | x | x | x | | x | x | group | x | x | resource | x | x | profile | x | x | name | x | x | | x | x | | x | x | at | x | x | report | x | x | (seconds) | x | x | Status/global status | x | x | Status/build status | x | x | Network/ipv4 address | x | x | Network/ipv6 address | x | x | Network/mac | x | x | Network/subnet ipv4 | x | x | Network/subnet ipv6 | x | x | Network/domain | x | x | Network/service provider/sp name | x | x | Network/service provider/sp ip | x | x | Network/service provider/sp mac | x | x | Network/service provider/sp subnet | x | x | interfaces/id | x | x | interfaces/identifier | x | x | interfaces/type | x | x | interfaces/mac address | x | x | interfaces/ipv4 address | x | x | interfaces/ipv6 address | x | x | interfaces/fqdn | x | x | system/architecture | x | x | system/operating system | x | x | system/build | x | x | system/medium | x | x | system/partition table | x | x | system/pxe loader | x | x | system/custom partition table | x | x | system/image | x | x | system/image file | x | x | system/use image | x | x | Parameters/ | x | x | parameters/ | x | x | info/owner | x | x | info/owner id | x | x | info/owner type | x | x | info/enabled | x | x | info/model | x | x | info/comment | x | x | proxy | x | x | information/content view environments/content view/id | x | x | information/content view environments/content view/name | x | x | information/content view environments/content view/composite | x | x | information/content view environments/lifecycle environment/id | x | x | information/content view environments/lifecycle environment/name | x | x | information/content source/id | x | x | information/content source/name | x | x | information/kickstart repository/id | x | x | information/kickstart repository/name | x | x | information/applicable packages | x | x | information/upgradable packages | x | x | information/applicable errata/enhancement | x | x | information/applicable errata/bug fix | x | x | information/applicable errata/security | x | x | information/uuid | x | x | information/last checkin | x | x | information/release version | x | x | information/autoheal | x | x | information/registered to | x | x | information/registered at | x | x | information/registered by activation keys/ | x | x | information/system purpose/service level | x | x | information/system purpose/purpose usage | x | x | information/system purpose/purpose role | x | x | status | x | x | collections/id | x | x | collections/name | x | x | -------------------------------------------------------------------------|-----|---------|----- you can find option types and the value an option can accept: One of true/false, yes/no, 1/0 Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format Possible values are described in the option's description Path to a file Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters Any combination of possible values described in the option's description Numeric value. Integer Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters Value described in the option's description. Mostly simple string", "name": "help", "shortname": "h", "value": null @@ -24902,12 +24884,6 @@ "shortname": null, "value": "NUMBER" }, - { - "help": "Sets the system add-ons", - "name": "purpose-addons", - "shortname": null, - "value": "LIST" - }, { "help": "Sets the system purpose usage", "name": "purpose-role", diff --git a/tests/robottelo/test_hammer.py b/tests/robottelo/test_hammer.py index fce548fa0d6..c41be83c1c9 100644 --- a/tests/robottelo/test_hammer.py +++ b/tests/robottelo/test_hammer.py @@ -468,7 +468,6 @@ def test_parse(self): ' Service Level:', ' Purpose Usage:', ' Purpose Role:', - ' Purpose Addons:', 'Host Collections:', ] ) @@ -531,7 +530,6 @@ def test_parse(self): 'service-level': '', 'purpose-usage': '', 'purpose-role': '', - 'purpose-addons': '', }, }, 'host-collections': {},