diff --git a/plugins/modules/activation_key.py b/plugins/modules/activation_key.py index 824e1e635d..7dbf0dca43 100644 --- a/plugins/modules/activation_key.py +++ b/plugins/modules/activation_key.py @@ -113,6 +113,7 @@ auto_attach: description: - Set Auto-Attach on or off + - The C(auto_attach) parameter is deprecated since Katello 4.13 and not available after Katello 4.19 type: bool release_version: description: @@ -187,7 +188,6 @@ override: enabled - label: ExampleOrganization_ExampleCustomProduct_ExampleRepository override: enabled - auto_attach: false release_version: 7Server service_level: Standard diff --git a/roles/activation_keys/README.md b/roles/activation_keys/README.md index ab7617083a..acd01fdb38 100644 --- a/roles/activation_keys/README.md +++ b/roles/activation_keys/README.md @@ -20,7 +20,6 @@ The following fields are required for an activation key but have defaults which The following fields are optional in the sense that the server will use default values when they are omitted: -- `auto_attach`: Auto Attach behavior for the activation key. When true, it will attempt to attach a minimum of subscriptions (from the subset of assigned subscriptions on the activation key; selects from all subscriptions in the organization if none are assigned) to cover any present products on the host. When false, it will attempt to attach all subscriptions assigned on the activation key to the host at registration time. server defaults to true. - `unlimited_hosts`: Allow an unlimited number of hosts to register with the activation key when true. When false, the `max_hosts` parameter which sets a numerical limit on the number of hosts that can be registered becomes required. server defaults to true. The following fields are optional and will be omitted by default: @@ -71,7 +70,6 @@ Define two Activation Keys. The first registers hosts in the "ACME" organization foreman_organization: "ACME" foreman_activation_keys: - name: "ACME_App_Key" - auto_attach: false subscriptions: - name: "ACME_App" - name: "ACME_RHEL7_Base_Test" diff --git a/roles/convert2rhel/tasks/activation_keys.yml b/roles/convert2rhel/tasks/activation_keys.yml index 457fd0c6fc..40024e47b0 100644 --- a/roles/convert2rhel/tasks/activation_keys.yml +++ b/roles/convert2rhel/tasks/activation_keys.yml @@ -82,7 +82,6 @@ name: "{{ foreman_convert2rhel_key_rhel7 }}" lifecycle_environment: "{{ foreman_convert2rhel_lifecycle_env }}" content_view: "{{ foreman_convert2rhel_content_view }}" - auto_attach: false when: foreman_content_rhel_enable_rhel7 - name: "Create activation key '{{ foreman_convert2rhel_key_rhel8 }}'" @@ -95,7 +94,6 @@ name: "{{ foreman_convert2rhel_key_rhel8 }}" lifecycle_environment: "{{ foreman_convert2rhel_lifecycle_env }}" content_view: "{{ foreman_convert2rhel_content_view }}" - auto_attach: false when: foreman_content_rhel_enable_rhel8 - name: "Add subscriptions to '{{ foreman_convert2rhel_key_rhel7 }}'" diff --git a/tests/test_playbooks/activation_key.yml b/tests/test_playbooks/activation_key.yml index 96607f60e8..cf6f990f9a 100644 --- a/tests/test_playbooks/activation_key.yml +++ b/tests/test_playbooks/activation_key.yml @@ -159,38 +159,6 @@ activation_key_state: absent expected_change: true - - name: create AK with auto_attach=true - include_tasks: tasks/activation_key.yml - vars: - activation_key_auto_attach: true - expected_change: true - - name: create AK with auto_attach=true again, no change - include_tasks: tasks/activation_key.yml - vars: - activation_key_auto_attach: true - expected_change: false - - name: remove AK with auto_attach=true - include_tasks: tasks/activation_key.yml - vars: - activation_key_state: absent - expected_change: true - - - name: create AK with auto_attach=false - include_tasks: tasks/activation_key.yml - vars: - activation_key_auto_attach: false - expected_change: true - - name: create AK with auto_attach=false again, no change - include_tasks: tasks/activation_key.yml - vars: - activation_key_auto_attach: false - expected_change: false - - name: remove AK with auto_attach=false - include_tasks: tasks/activation_key.yml - vars: - activation_key_state: absent - expected_change: true - - name: create AK with unlimited_hosts=false include_tasks: tasks/activation_key.yml vars: diff --git a/tests/test_playbooks/activation_keys_role.yml b/tests/test_playbooks/activation_keys_role.yml index e2fec6c41f..f5ecd09955 100644 --- a/tests/test_playbooks/activation_keys_role.yml +++ b/tests/test_playbooks/activation_keys_role.yml @@ -25,4 +25,3 @@ foreman_activation_keys: - name: Testkey1 - name: Testkey2 - auto_attach: false diff --git a/tests/test_playbooks/fixtures/activation_key-0.yml b/tests/test_playbooks/fixtures/activation_key-0.yml index 78cc8b8f2f..ea86f00dfb 100644 --- a/tests/test_playbooks/fixtures/activation_key-0.yml +++ b/tests/test_playbooks/fixtures/activation_key-0.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,7 +127,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test @@ -148,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -175,7 +175,7 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Activation Key", "organization_id": 69}' + body: '{"name": "Test Activation Key", "organization_id": 6}' headers: Accept: - application/json;version=2 @@ -184,7 +184,7 @@ interactions: Connection: - keep-alive Content-Length: - - '54' + - '53' Content-Type: - application/json User-Agent: @@ -193,10 +193,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":781,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:27 UTC","updated_at":"2025-12-08 10:28:27 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":22,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:33:47 UTC","updated_at":"2025-12-13 23:33:47 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -205,7 +205,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '765' + - '743' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -213,9 +213,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-1.yml b/tests/test_playbooks/fixtures/activation_key-1.yml index 11bbcac5a2..e9108b60de 100644 --- a/tests/test_playbooks/fixtures/activation_key-1.yml +++ b/tests/test_playbooks/fixtures/activation_key-1.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":781,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:27 UTC","updated_at":"2025-12-08 10:28:27 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":22,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:33:47 UTC","updated_at":"2025-12-13 23:33:47 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '868' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -189,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/781?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/22?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":781,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:27 UTC","updated_at":"2025-12-08 10:28:27 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":22,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:33:47 UTC","updated_at":"2025-12-13 23:33:47 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -204,7 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '765' + - '743' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,9 +212,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-10.yml b/tests/test_playbooks/fixtures/activation_key-10.yml index 4286334dff..37b8e442e0 100644 --- a/tests/test_playbooks/fixtures/activation_key-10.yml +++ b/tests/test_playbooks/fixtures/activation_key-10.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,16 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -145,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1318' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -153,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,15 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/24?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -208,7 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1193' + - '1155' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -216,9 +216,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -254,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/24/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test - Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"default","overrides":[],"enabled_content_override":null,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":10,"name":"Test + Product"},"content":{"id":10,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765668763121","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"default","overrides":[],"enabled_content_override":null,"redhat":false}]} ' headers: @@ -278,7 +278,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: @@ -319,15 +319,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/783/content_override + uri: https://foreman.example.org/katello/api/activation_keys/24/content_override response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"1"}],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"1"}],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -336,7 +336,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1288' + - '1250' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -346,7 +346,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-11.yml b/tests/test_playbooks/fixtures/activation_key-11.yml index 34343d90b8..5d8d31965b 100644 --- a/tests/test_playbooks/fixtures/activation_key-11.yml +++ b/tests/test_playbooks/fixtures/activation_key-11.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,16 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -145,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1318' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -153,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,15 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/24?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"1"}],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"1"}],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -208,7 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1288' + - '1250' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -216,9 +216,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -254,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/24/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test - Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"1","overrides":[{"name":"enabled","value":true}],"enabled_content_override":true,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":10,"name":"Test + Product"},"content":{"id":10,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765668763121","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"1","overrides":[{"name":"enabled","value":true}],"enabled_content_override":true,"redhat":false}]} ' headers: @@ -278,7 +278,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-12.yml b/tests/test_playbooks/fixtures/activation_key-12.yml index 8c2a7a1f0c..c6e2007ca2 100644 --- a/tests/test_playbooks/fixtures/activation_key-12.yml +++ b/tests/test_playbooks/fixtures/activation_key-12.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,16 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -145,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1318' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -153,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -193,18 +193,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/783 + uri: https://foreman.example.org/katello/api/activation_keys/24 response: body: - string: ' {"id":"f3d75a8d-152d-4c9a-a473-c5388410a1fc","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"117e4872-db63-4c9b-ad4f-755339231324","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:39 UTC","ended_at":"2025-12-08 - 10:28:39 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":783,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"481a8cfc-0d20-4e05-a200-2b53e2013cc8","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-13 23:34:21 UTC","ended_at":"2025-12-13 + 23:34:21 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":24,"name":"Test + Activation Key"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"3e9cc569-7b81-4255-8e58-32d8ed92b32f","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/783/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:39 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/24/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:34:21 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -221,7 +221,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-13.yml b/tests/test_playbooks/fixtures/activation_key-13.yml index b190d2977a..4c0549c513 100644 --- a/tests/test_playbooks/fixtures/activation_key-13.yml +++ b/tests/test_playbooks/fixtures/activation_key-13.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,7 +127,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test @@ -148,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -175,7 +175,8 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Activation Key", "organization_id": 69, "auto_attach": true}' + body: '{"name": "Test Activation Key", "organization_id": 6, "max_hosts": 10, + "unlimited_hosts": false}' headers: Accept: - application/json;version=2 @@ -184,7 +185,7 @@ interactions: Connection: - keep-alive Content-Length: - - '75' + - '96' Content-Type: - application/json User-Agent: @@ -193,10 +194,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":784,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:40 UTC","updated_at":"2025-12-08 10:28:40 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":25,"name":"Test + Activation Key","description":null,"unlimited_hosts":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:23 UTC","updated_at":"2025-12-13 23:34:23 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -205,7 +206,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '765' + - '742' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -213,9 +214,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-14.yml b/tests/test_playbooks/fixtures/activation_key-14.yml index c88b02f6d4..a3b289c4e1 100644 --- a/tests/test_playbooks/fixtures/activation_key-14.yml +++ b/tests/test_playbooks/fixtures/activation_key-14.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":784,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:40 UTC","updated_at":"2025-12-08 10:28:40 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":25,"name":"Test + Activation Key","description":null,"unlimited_hosts":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:23 UTC","updated_at":"2025-12-13 23:34:23 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '867' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -189,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/784?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/25?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":784,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:40 UTC","updated_at":"2025-12-08 10:28:40 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":25,"name":"Test + Activation Key","description":null,"unlimited_hosts":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:23 UTC","updated_at":"2025-12-13 23:34:23 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -204,7 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '765' + - '742' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,9 +212,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-15.yml b/tests/test_playbooks/fixtures/activation_key-15.yml index 47cdc6c064..8761ee86bb 100644 --- a/tests/test_playbooks/fixtures/activation_key-15.yml +++ b/tests/test_playbooks/fixtures/activation_key-15.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":784,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:40 UTC","updated_at":"2025-12-08 10:28:40 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":25,"name":"Test + Activation Key","description":null,"unlimited_hosts":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:23 UTC","updated_at":"2025-12-13 23:34:23 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '867' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/784 + uri: https://foreman.example.org/katello/api/activation_keys/25 response: body: - string: ' {"id":"f0135d61-f0e1-462e-9695-f07ceebc1d77","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"89c0a8e6-d204-4ec5-9e12-f211514c1aa7","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:42 UTC","ended_at":"2025-12-08 - 10:28:42 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":784,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"4bde7f6b-879a-4979-b70b-dfb2bea080e7","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-13 23:34:28 UTC","ended_at":"2025-12-13 + 23:34:29 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":25,"name":"Test + Activation Key"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"e07f422c-7e35-4ba4-b0af-07fa8f752634","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/784/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:42 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/25/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:34:28 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -219,7 +219,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-16.yml b/tests/test_playbooks/fixtures/activation_key-16.yml index 0f2f8b3436..7ef0c8867d 100644 --- a/tests/test_playbooks/fixtures/activation_key-16.yml +++ b/tests/test_playbooks/fixtures/activation_key-16.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,7 +127,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test @@ -148,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -175,7 +175,7 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Activation Key", "organization_id": 69, "auto_attach": false}' + body: null headers: Accept: - application/json;version=2 @@ -183,8 +183,68 @@ interactions: - gzip, deflate Connection: - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/6/host_collections?search=name%3D%22TheAnswer%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"TheAnswer\"","sort":{"by":"name","order":"asc"},"results":[{"name":"TheAnswer","organization_id":6,"max_hosts":null,"description":"Foo + host collection for Foo servers","total_hosts":0,"unlimited_hosts":true,"created_at":"2025-12-13 + 23:32:45 UTC","updated_at":"2025-12-13 23:32:45 UTC","id":2,"permissions":{"deletable":true,"editable":true}}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive Content-Length: - - '76' + - '444' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"name": "Test Activation Key", "organization_id": 6}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '53' Content-Type: - application/json User-Agent: @@ -193,10 +253,10 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":785,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:43 UTC","updated_at":"2025-12-08 10:28:43 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":26,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:31 UTC","updated_at":"2025-12-13 23:34:31 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -205,7 +265,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '766' + - '743' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -213,11 +273,11 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=97 + - timeout=15, max=96 Referrer-Policy: - strict-origin-when-cross-origin content-security-policy: @@ -239,4 +299,69 @@ interactions: status: code: 201 message: Created +- request: + body: '{"host_collection_ids": [2]}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '28' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: POST + uri: https://foreman.example.org/katello/api/activation_keys/26/host_collections + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":26,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:31 UTC","updated_at":"2025-12-13 23:34:31 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '770' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=95 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-17.yml b/tests/test_playbooks/fixtures/activation_key-17.yml index 387360cefe..763e018ee3 100644 --- a/tests/test_playbooks/fixtures/activation_key-17.yml +++ b/tests/test_playbooks/fixtures/activation_key-17.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":785,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:43 UTC","updated_at":"2025-12-08 10:28:43 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":26,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:31 UTC","updated_at":"2025-12-13 23:34:31 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '891' + - '895' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -189,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/785?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/26?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":785,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:43 UTC","updated_at":"2025-12-08 10:28:43 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":26,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:31 UTC","updated_at":"2025-12-13 23:34:31 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -204,7 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '766' + - '770' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,9 +212,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -238,4 +238,64 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/6/host_collections?search=name%3D%22TheAnswer%22&per_page=4294967296 + response: + body: + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"TheAnswer\"","sort":{"by":"name","order":"asc"},"results":[{"name":"TheAnswer","organization_id":6,"max_hosts":null,"description":"Foo + host collection for Foo servers","total_hosts":0,"unlimited_hosts":true,"created_at":"2025-12-13 + 23:32:45 UTC","updated_at":"2025-12-13 23:32:45 UTC","id":2,"permissions":{"deletable":true,"editable":true}}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '444' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=96 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-18.yml b/tests/test_playbooks/fixtures/activation_key-18.yml index 81f4e53fb4..2d1dc7f5ed 100644 --- a/tests/test_playbooks/fixtures/activation_key-18.yml +++ b/tests/test_playbooks/fixtures/activation_key-18.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":785,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:43 UTC","updated_at":"2025-12-08 10:28:43 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":26,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:31 UTC","updated_at":"2025-12-13 23:34:31 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '891' + - '895' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -186,30 +186,90 @@ interactions: - gzip, deflate Connection: - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/26?organization_id=6 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":26,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:31 UTC","updated_at":"2025-12-13 23:34:31 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":2,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive Content-Length: + - '770' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: - '0' + status: + code: 200 + message: OK +- request: + body: '{"host_collection_ids": [2]}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '28' + Content-Type: + - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/785 + method: PUT + uri: https://foreman.example.org/katello/api/activation_keys/26/host_collections response: body: - string: ' {"id":"a631a9ff-a939-4d6d-a302-fa90d8b53a35","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete - Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:44 UTC","ended_at":"2025-12-08 - 10:28:45 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":785,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"69c1b9a2-e755-404d-8347-1aefb3611267","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete - Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/785/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:44 UTC","available_actions":{"cancellable":false,"resumable":false}} + string: ' {"service_level":null,"content_overrides":[],"id":26,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:31 UTC","updated_at":"2025-12-13 23:34:31 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: Cache-Control: - - no-cache + - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '743' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -219,13 +279,11 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=97 + - timeout=15, max=96 Referrer-Policy: - strict-origin-when-cross-origin - Transfer-Encoding: - - chunked content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -243,6 +301,6 @@ interactions: x-xss-protection: - '0' status: - code: 202 - message: Accepted + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-19.yml b/tests/test_playbooks/fixtures/activation_key-19.yml index f525d5e774..aa84f04bee 100644 --- a/tests/test_playbooks/fixtures/activation_key-19.yml +++ b/tests/test_playbooks/fixtures/activation_key-19.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,11 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":26,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:31 UTC","updated_at":"2025-12-13 23:34:31 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '172' + - '868' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -175,8 +178,7 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Activation Key", "organization_id": 69, "max_hosts": 10, - "unlimited_hosts": false}' + body: null headers: Accept: - application/json;version=2 @@ -185,28 +187,29 @@ interactions: Connection: - keep-alive Content-Length: - - '97' - Content-Type: - - application/json + - '0' User-Agent: - apypie (https://github.com/Apipie/apypie) - method: POST - uri: https://foreman.example.org/katello/api/activation_keys + method: DELETE + uri: https://foreman.example.org/katello/api/activation_keys/26 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":786,"name":"Test - Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:45 UTC","updated_at":"2025-12-08 10:28:46 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"id":"f4c5520b-ae16-4d6c-9f97-0fbd2e945376","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + Activation Key activation key ''Test Activation Key''; organization ''Test + Organization''","username":"admin","started_at":"2025-12-13 23:34:39 UTC","ended_at":"2025-12-13 + 23:34:40 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":26,"name":"Test + Activation Key"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"a3ba6620-13db-4062-8b88-600709eed490","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Activation Key","input":[["activation_key",{"text":"activation key ''Test + Activation Key''","link":"/activation_keys/26/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:34:39 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: Cache-Control: - - max-age=0, private, must-revalidate + - no-cache Connection: - Keep-Alive - Content-Length: - - '764' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -214,13 +217,15 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: - strict-origin-when-cross-origin + Transfer-Encoding: + - chunked content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -238,6 +243,6 @@ interactions: x-xss-protection: - '0' status: - code: 201 - message: Created + code: 202 + message: Accepted version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-2.yml b/tests/test_playbooks/fixtures/activation_key-2.yml index fbfd47e500..69bd679a8a 100644 --- a/tests/test_playbooks/fixtures/activation_key-2.yml +++ b/tests/test_playbooks/fixtures/activation_key-2.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":781,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:27 UTC","updated_at":"2025-12-08 10:28:27 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":22,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:33:47 UTC","updated_at":"2025-12-13 23:33:47 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '868' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/781 + uri: https://foreman.example.org/katello/api/activation_keys/22 response: body: - string: ' {"id":"30f97794-7196-45c9-ac4c-153091e9374e","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"c3e21c59-af73-4321-80b5-d9b12cb33176","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:28 UTC","ended_at":"2025-12-08 - 10:28:29 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":781,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"a14aa40c-194c-44f7-abe8-f4b261143a9d","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-13 23:33:52 UTC","ended_at":"2025-12-13 + 23:33:52 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":22,"name":"Test + Activation Key"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"663458c4-764c-46e8-8903-0876a6fc7580","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/781/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:28 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/22/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:33:52 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -219,7 +219,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-20.yml b/tests/test_playbooks/fixtures/activation_key-20.yml index f69d0c620d..f67b4091b5 100644 --- a/tests/test_playbooks/fixtures/activation_key-20.yml +++ b/tests/test_playbooks/fixtures/activation_key-20.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":786,"name":"Test - Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:45 UTC","updated_at":"2025-12-08 10:28:46 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -143,7 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '889' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -178,7 +175,7 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"name": "Test Activation Key", "organization_id": 6}' headers: Accept: - application/json;version=2 @@ -186,16 +183,20 @@ interactions: - gzip, deflate Connection: - keep-alive + Content-Length: + - '53' + Content-Type: + - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/activation_keys/786?organization_id=69 + method: POST + uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":786,"name":"Test - Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:45 UTC","updated_at":"2025-12-08 10:28:46 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":27,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:42 UTC","updated_at":"2025-12-13 23:34:42 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -204,7 +205,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '764' + - '743' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,9 +213,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -236,6 +237,6 @@ interactions: x-xss-protection: - '0' status: - code: 200 - message: OK + code: 201 + message: Created version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-21.yml b/tests/test_playbooks/fixtures/activation_key-21.yml index b887e935dd..be7fc8c22c 100644 --- a/tests/test_playbooks/fixtures/activation_key-21.yml +++ b/tests/test_playbooks/fixtures/activation_key-21.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":786,"name":"Test - Activation Key","description":null,"unlimited_hosts":false,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":10,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:45 UTC","updated_at":"2025-12-08 10:28:46 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":27,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:42 UTC","updated_at":"2025-12-13 23:34:42 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '889' + - '868' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -186,30 +186,87 @@ interactions: - gzip, deflate Connection: - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/27?organization_id=6 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":27,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:42 UTC","updated_at":"2025-12-13 23:34:42 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive Content-Length: + - '743' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive User-Agent: - apypie (https://github.com/Apipie/apypie) - method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/786 + method: GET + uri: https://foreman.example.org/katello/api/organizations/6/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: ' {"id":"0cba66d1-fc4f-4234-9f80-b539cf8918a1","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete - Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:47 UTC","ended_at":"2025-12-08 - 10:28:48 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":786,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"1cae3d4d-ea59-4a0a-bae6-6f6afe090882","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete - Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/786/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:47 UTC","available_actions":{"cancellable":false,"resumable":false}} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":5,"name":"Library","label":"Library","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":10},{"name":"Test Content View 2","id":11},{"name":"Test + Content View 3","id":12}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":5},{"id":6},{"id":7},{"id":8}]}]}]} ' headers: Cache-Control: - - no-cache + - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1266' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,15 +274,78 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=96 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/6/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + response: + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":9,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[5],"repository_ids":[],"id":9,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","last_task":null,"latest_version_environments":[{"id":5,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":9,"version":"1.0","published":"2025-12-13 + 23:32:35 UTC","description":null,"environment_ids":[5],"filters_applied":null,"published_at_words":"2 + minutes"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 23:32:35 UTC","environments":[{"id":5,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1393' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: - ; ANY + Foreman_current_organization: + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=97 + - timeout=15, max=95 Referrer-Policy: - strict-origin-when-cross-origin - Transfer-Encoding: - - chunked content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -243,6 +363,6 @@ interactions: x-xss-protection: - '0' status: - code: 202 - message: Accepted + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-22.yml b/tests/test_playbooks/fixtures/activation_key-22.yml index 1393adc113..b15fb148e0 100644 --- a/tests/test_playbooks/fixtures/activation_key-22.yml +++ b/tests/test_playbooks/fixtures/activation_key-22.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,11 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":27,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:42 UTC","updated_at":"2025-12-13 23:34:42 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '172' + - '868' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -186,12 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/host_collections?search=name%3D%22TheAnswer%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/27?organization_id=6 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"TheAnswer\"","sort":{"by":"name","order":"asc"},"results":[{"name":"TheAnswer","organization_id":69,"max_hosts":null,"description":"Foo - host collection for Foo servers","total_hosts":0,"unlimited_hosts":true,"created_at":"2025-12-08 - 10:27:49 UTC","updated_at":"2025-12-08 10:27:49 UTC","id":51,"permissions":{"deletable":true,"editable":true}}]} + string: ' {"service_level":null,"content_overrides":[],"id":27,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:42 UTC","updated_at":"2025-12-13 23:34:42 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -200,7 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '446' + - '743' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -208,9 +212,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -235,7 +239,7 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Activation Key", "organization_id": 69}' + body: null headers: Accept: - application/json;version=2 @@ -243,20 +247,14 @@ interactions: - gzip, deflate Connection: - keep-alive - Content-Length: - - '54' - Content-Type: - - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: POST - uri: https://foreman.example.org/katello/api/activation_keys + method: GET + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -265,7 +263,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '765' + - '177' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -273,9 +271,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: @@ -297,10 +295,10 @@ interactions: x-xss-protection: - '0' status: - code: 201 - message: Created + code: 200 + message: OK - request: - body: '{"host_collection_ids": [51]}' + body: '{"new_name": "Test Activation Key Copy", "organization_id": 6}' headers: Accept: - application/json;version=2 @@ -309,19 +307,19 @@ interactions: Connection: - keep-alive Content-Length: - - '29' + - '62' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/activation_keys/787/host_collections + uri: https://foreman.example.org/katello/api/activation_keys/27/copy response: body: - string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":28,"name":"Test + Activation Key Copy","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:48 UTC","updated_at":"2025-12-13 23:34:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -330,7 +328,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '793' + - '748' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -338,9 +336,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - ; ANY + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 Referrer-Policy: @@ -362,6 +360,6 @@ interactions: x-xss-protection: - '0' status: - code: 200 - message: OK + code: 201 + message: Created version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-23.yml b/tests/test_playbooks/fixtures/activation_key-23.yml index 9e461dc5dd..5c17e92a6e 100644 --- a/tests/test_playbooks/fixtures/activation_key-23.yml +++ b/tests/test_playbooks/fixtures/activation_key-23.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":787,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":27,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:42 UTC","updated_at":"2025-12-13 23:34:42 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '918' + - '868' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -189,13 +189,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/787?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/27?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":27,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:42 UTC","updated_at":"2025-12-13 23:34:42 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -204,7 +204,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '793' + - '743' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,9 +212,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -250,12 +250,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/host_collections?search=name%3D%22TheAnswer%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"TheAnswer\"","sort":{"by":"name","order":"asc"},"results":[{"name":"TheAnswer","organization_id":69,"max_hosts":null,"description":"Foo - host collection for Foo servers","total_hosts":0,"unlimited_hosts":true,"created_at":"2025-12-08 - 10:27:49 UTC","updated_at":"2025-12-08 10:27:49 UTC","id":51,"permissions":{"deletable":true,"editable":true}}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[{"id":28,"name":"Test + Activation Key Copy","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:48 UTC","updated_at":"2025-12-13 23:34:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -264,7 +266,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '446' + - '878' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -272,9 +274,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: @@ -298,4 +300,65 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/28?organization_id=6 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":28,"name":"Test + Activation Key Copy","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:48 UTC","updated_at":"2025-12-13 23:34:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '748' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=95 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-24.yml b/tests/test_playbooks/fixtures/activation_key-24.yml index c92f06af3a..3b3c660602 100644 --- a/tests/test_playbooks/fixtures/activation_key-24.yml +++ b/tests/test_playbooks/fixtures/activation_key-24.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":787,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[{"id":28,"name":"Test + Activation Key Copy","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:48 UTC","updated_at":"2025-12-13 23:34:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '918' + - '878' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -186,90 +186,30 @@ interactions: - gzip, deflate Connection: - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/activation_keys/787?organization_id=69 - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[{"id":51,"name":"TheAnswer"}],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive Content-Length: - - '793' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - '0' - status: - code: 200 - message: OK -- request: - body: '{"host_collection_ids": [51]}' - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '29' - Content-Type: - - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/787/host_collections + method: DELETE + uri: https://foreman.example.org/katello/api/activation_keys/28 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":787,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"id":"ee173f00-32f5-457c-90ff-c88d000cb1fe","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + Activation Key activation key ''Test Activation Key Copy''; organization ''Test + Organization''","username":"admin","started_at":"2025-12-13 23:34:54 UTC","ended_at":"2025-12-13 + 23:34:54 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":28,"name":"Test + Activation Key Copy"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"6692a74d-1f83-4db3-8e34-39b1ba203620","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Activation Key","input":[["activation_key",{"text":"activation key ''Test + Activation Key Copy''","link":"/activation_keys/28/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:34:54 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: Cache-Control: - - max-age=0, private, must-revalidate + - no-cache Connection: - Keep-Alive - Content-Length: - - '765' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -279,11 +219,13 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=96 + - timeout=15, max=97 Referrer-Policy: - strict-origin-when-cross-origin + Transfer-Encoding: + - chunked content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -301,6 +243,6 @@ interactions: x-xss-protection: - '0' status: - code: 200 - message: OK + code: 202 + message: Accepted version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-25.yml b/tests/test_playbooks/fixtures/activation_key-25.yml index fc198186f1..192f877e1c 100644 --- a/tests/test_playbooks/fixtures/activation_key-25.yml +++ b/tests/test_playbooks/fixtures/activation_key-25.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":787,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:48 UTC","updated_at":"2025-12-08 10:28:49 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":27,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:42 UTC","updated_at":"2025-12-13 23:34:42 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +143,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '868' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +151,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,18 +191,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/787 + uri: https://foreman.example.org/katello/api/activation_keys/27 response: body: - string: ' {"id":"41fc65b7-9005-48df-99c7-aa524ba91f19","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"88ae6646-c1e9-47f3-acbe-3b64d2eafb09","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:51 UTC","ended_at":"2025-12-08 - 10:28:51 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":787,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"8b8bace9-61bd-4f28-9f9b-1be8f3ba328f","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-13 23:34:57 UTC","ended_at":"2025-12-13 + 23:34:57 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":27,"name":"Test + Activation Key"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"5a0dc656-2b9c-4cc2-959f-0bf8a47408b7","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/787/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:51 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/27/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:34:57 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -219,7 +219,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-26.yml b/tests/test_playbooks/fixtures/activation_key-26.yml index 08dac6bff6..3af0cbf168 100644 --- a/tests/test_playbooks/fixtures/activation_key-26.yml +++ b/tests/test_playbooks/fixtures/activation_key-26.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,7 +127,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test @@ -148,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -174,69 +174,4 @@ interactions: status: code: 200 message: OK -- request: - body: '{"name": "Test Activation Key", "organization_id": 69}' - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '54' - Content-Type: - - application/json - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: POST - uri: https://foreman.example.org/katello/api/activation_keys - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":788,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '765' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 201 - message: Created version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-27.yml b/tests/test_playbooks/fixtures/activation_key-27.yml index 4e0062dbbc..5d579c8507 100644 --- a/tests/test_playbooks/fixtures/activation_key-27.yml +++ b/tests/test_playbooks/fixtures/activation_key-27.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":788,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -143,7 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '190' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -178,68 +175,8 @@ interactions: code: 200 message: OK - request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/activation_keys/788?organization_id=69 - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":788,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '765' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null + body: '{"name": "Test Activation Key with multiple CVs", "organization_id": 6, + "content_view_environments": ["Dev/Test_Content_View_1", "Test/Test_Content_View_2"]}' headers: Accept: - application/json;version=2 @@ -247,82 +184,23 @@ interactions: - gzip, deflate Connection: - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 - response: - body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test - Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test - Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive Content-Length: - - '1291' + - '157' Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=96 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive + - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + method: POST + uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 - 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 - minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 - 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + string: ' {"service_level":null,"content_overrides":[],"id":29,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:01 UTC","updated_at":"2025-12-13 23:35:02 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -331,7 +209,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1384' + - '1581' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -339,11 +217,11 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=95 + - timeout=15, max=97 Referrer-Policy: - strict-origin-when-cross-origin content-security-policy: @@ -363,6 +241,6 @@ interactions: x-xss-protection: - '0' status: - code: 200 - message: OK + code: 201 + message: Created version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-28.yml b/tests/test_playbooks/fixtures/activation_key-28.yml index 54e2538469..ac579616c4 100644 --- a/tests/test_playbooks/fixtures/activation_key-28.yml +++ b/tests/test_playbooks/fixtures/activation_key-28.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":788,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":29,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:01 UTC","updated_at":"2025-12-13 23:35:02 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +146,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '1724' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +154,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -189,13 +192,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/788?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/29?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":788,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":29,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:01 UTC","updated_at":"2025-12-13 23:35:02 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -204,7 +210,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '765' + - '1581' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,9 +218,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -238,128 +244,4 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 - response: - body: - string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '177' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=96 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: '{"new_name": "Test Activation Key Copy", "organization_id": 69}' - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '63' - Content-Type: - - application/json - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: POST - uri: https://foreman.example.org/katello/api/activation_keys/788/copy - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":789,"name":"Test - Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:54 UTC","updated_at":"2025-12-08 10:28:55 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '770' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=95 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 201 - message: Created version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-29.yml b/tests/test_playbooks/fixtures/activation_key-29.yml index b52536dfa9..b703b251c8 100644 --- a/tests/test_playbooks/fixtures/activation_key-29.yml +++ b/tests/test_playbooks/fixtures/activation_key-29.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":788,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":29,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:01 UTC","updated_at":"2025-12-13 23:35:02 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +146,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '1724' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +154,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -189,13 +192,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/788?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/29?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":788,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":29,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:01 UTC","updated_at":"2025-12-13 23:35:02 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -204,7 +210,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '765' + - '1581' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -212,9 +218,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -239,7 +245,8 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"organization_id": 6, "content_view_environments": ["Dev/Test_Content_View_1", + "Prod/Test_Content_View_3", "Test/Test_Content_View_2"]}' headers: Accept: - application/json;version=2 @@ -247,78 +254,24 @@ interactions: - gzip, deflate Connection: - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 - response: - body: - string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[{"id":789,"name":"Test - Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:54 UTC","updated_at":"2025-12-08 10:28:55 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive Content-Length: - - '900' + - '136' Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=96 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive + - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/activation_keys/789?organization_id=69 + method: PUT + uri: https://foreman.example.org/katello/api/activation_keys/29 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":789,"name":"Test - Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:54 UTC","updated_at":"2025-12-08 10:28:55 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":29,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Prod/Test_Content_View_3,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:01 UTC","updated_at":"2025-12-13 23:35:02 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":12,"name":"Test + Content View 3","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":12,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":21},"lifecycle_environment":{"id":8,"name":"Prod","lifecycle_environment_library":false},"label":"Prod/Test_Content_View_3"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -327,7 +280,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '770' + - '1971' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -335,11 +288,11 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=95 + - timeout=15, max=96 Referrer-Policy: - strict-origin-when-cross-origin content-security-policy: diff --git a/tests/test_playbooks/fixtures/activation_key-3.yml b/tests/test_playbooks/fixtures/activation_key-3.yml index 2ff374e60c..3187654775 100644 --- a/tests/test_playbooks/fixtures/activation_key-3.yml +++ b/tests/test_playbooks/fixtures/activation_key-3.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,7 +127,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test @@ -148,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -186,14 +186,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test - Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test - Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":5,"name":"Library","label":"Library","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":10},{"name":"Test Content View 2","id":11},{"name":"Test + Content View 3","id":12}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":5},{"id":6},{"id":7},{"id":8}]}]}]} ' headers: @@ -202,7 +202,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1291' + - '1266' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,9 +210,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -248,17 +248,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 - 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 - minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 - 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":9,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[5],"repository_ids":[],"id":9,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","last_task":null,"latest_version_environments":[{"id":5,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":9,"version":"1.0","published":"2025-12-13 + 23:32:35 UTC","description":null,"environment_ids":[5],"filters_applied":null,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 23:32:35 UTC","environments":[{"id":5,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -267,7 +267,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1384' + - '1392' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -275,9 +275,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: @@ -302,8 +302,8 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Activation Key", "organization_id": 69, "content_view_id": - 163, "environment_id": 167}' + body: '{"name": "Test Activation Key", "organization_id": 6, "content_view_id": + 9, "environment_id": 5}' headers: Accept: - application/json;version=2 @@ -312,7 +312,7 @@ interactions: Connection: - keep-alive Content-Length: - - '101' + - '96' Content-Type: - application/json User-Agent: @@ -321,12 +321,12 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":782,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:30 UTC","updated_at":"2025-12-08 10:28:30 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":23,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:33:55 UTC","updated_at":"2025-12-13 23:33:55 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -335,7 +335,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1193' + - '1155' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -343,9 +343,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-30.yml b/tests/test_playbooks/fixtures/activation_key-30.yml index 237a3dd164..c6fa723898 100644 --- a/tests/test_playbooks/fixtures/activation_key-30.yml +++ b/tests/test_playbooks/fixtures/activation_key-30.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+Copy%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key Copy\"","sort":{"by":"name","order":"asc"},"results":[{"id":789,"name":"Test - Activation Key Copy","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:54 UTC","updated_at":"2025-12-08 10:28:55 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":29,"name":"Test + Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Prod/Test_Content_View_3,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:01 UTC","updated_at":"2025-12-13 23:35:02 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":12,"name":"Test + Content View 3","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":12,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":21},"lifecycle_environment":{"id":8,"name":"Prod","lifecycle_environment_library":false},"label":"Prod/Test_Content_View_3"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -143,7 +147,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '900' + - '2114' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +155,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,18 +195,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/789 + uri: https://foreman.example.org/katello/api/activation_keys/29 response: body: - string: ' {"id":"2e6b3499-d8ec-4382-9969-25a748491769","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete - Activation Key activation key ''Test Activation Key Copy''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:56 UTC","ended_at":"2025-12-08 - 10:28:57 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":789,"name":"Test - Activation Key Copy"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"b201fe75-68c5-48ec-8ae0-2697ccdaf63a","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + string: ' {"id":"de250ab3-53cb-4632-b29a-6b2505206246","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + Activation Key activation key ''Test Activation Key with multiple CVs''; organization + ''Test Organization''","username":"admin","started_at":"2025-12-13 23:35:09 + UTC","ended_at":"2025-12-13 23:35:10 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":29,"name":"Test + Activation Key with multiple CVs"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"f2ffbbc9-ca43-4a98-b861-474c40beca25","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key Copy''","link":"/activation_keys/789/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:56 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key with multiple CVs''","link":"/activation_keys/29/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:35:09 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -219,7 +223,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-31.yml b/tests/test_playbooks/fixtures/activation_key-31.yml index c0c88fc2e5..5ec81aae2e 100644 --- a/tests/test_playbooks/fixtures/activation_key-31.yml +++ b/tests/test_playbooks/fixtures/activation_key-31.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,14 +127,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":788,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:52 UTC","updated_at":"2025-12-08 10:28:52 UTC","content_view_environments":[],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":null,"content_view":null,"environment_id":null,"environment":null,"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -143,7 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '890' + - '172' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -178,7 +175,8 @@ interactions: code: 200 message: OK - request: - body: null + body: '{"name": "Test Activation Key", "organization_id": 6, "content_view_environments": + ["Dev/Test_Content_View_1", "Test/Test_Content_View_2"]}' headers: Accept: - application/json;version=2 @@ -187,29 +185,31 @@ interactions: Connection: - keep-alive Content-Length: - - '0' + - '139' + Content-Type: + - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/788 + method: POST + uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"id":"bba02d63-57d2-4da6-a4f3-915337e313ba","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete - Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:58 UTC","ended_at":"2025-12-08 - 10:28:58 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":788,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"8a85cc36-e1ee-497b-8643-b7d28c5662bb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete - Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/788/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:57 UTC","available_actions":{"cancellable":false,"resumable":false}} + string: ' {"service_level":null,"content_overrides":[],"id":30,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:12 UTC","updated_at":"2025-12-13 23:35:12 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: Cache-Control: - - no-cache + - max-age=0, private, must-revalidate Connection: - Keep-Alive + Content-Length: + - '1563' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,15 +217,13 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - ; ANY + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: - strict-origin-when-cross-origin - Transfer-Encoding: - - chunked content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -243,6 +241,6 @@ interactions: x-xss-protection: - '0' status: - code: 202 - message: Accepted + code: 201 + message: Created version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-32.yml b/tests/test_playbooks/fixtures/activation_key-32.yml index 6c9574e4c8..e24152b53c 100644 --- a/tests/test_playbooks/fixtures/activation_key-32.yml +++ b/tests/test_playbooks/fixtures/activation_key-32.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,11 +127,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":30,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:12 UTC","updated_at":"2025-12-13 23:35:12 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,7 +146,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '172' + - '1688' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,9 +154,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -174,4 +180,262 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/30?organization_id=6 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":30,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:12 UTC","updated_at":"2025-12-13 23:35:12 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1563' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/6/environments?search=name%3D%22Library%22&per_page=4294967296 + response: + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":5,"name":"Library","label":"Library","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":10},{"name":"Test Content View 2","id":11},{"name":"Test + Content View 3","id":12}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":5},{"id":6},{"id":7},{"id":8}]}]}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1266' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=96 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/organizations/6/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + response: + body: + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":9,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[5],"repository_ids":[],"id":9,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","last_task":null,"latest_version_environments":[{"id":5,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":9,"version":"1.0","published":"2025-12-13 + 23:32:35 UTC","description":null,"environment_ids":[5],"filters_applied":null,"published_at_words":"3 + minutes"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 23:32:35 UTC","environments":[{"id":5,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1393' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=95 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"organization_id": 6, "content_view_id": 9, "environment_id": 5}' + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '65' + Content-Type: + - application/json + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: PUT + uri: https://foreman.example.org/katello/api/activation_keys/30 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":30,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:12 UTC","updated_at":"2025-12-13 23:35:12 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1155' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=94 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-33.yml b/tests/test_playbooks/fixtures/activation_key-33.yml index f118ebe04b..318a59d9b7 100644 --- a/tests/test_playbooks/fixtures/activation_key-33.yml +++ b/tests/test_playbooks/fixtures/activation_key-33.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,11 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":30,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:12 UTC","updated_at":"2025-12-13 23:35:12 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -140,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '190' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -175,8 +180,71 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Activation Key with multiple CVs", "organization_id": 69, - "content_view_environments": ["Dev/Test_Content_View_1", "Test/Test_Content_View_2"]}' + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/katello/api/activation_keys/30?organization_id=6 + response: + body: + string: ' {"service_level":null,"content_overrides":[],"id":30,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:12 UTC","updated_at":"2025-12-13 23:35:12 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + + ' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1155' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - 6; Test Organization + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=97 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"organization_id": 6, "content_view_environments": ["Dev/Test_Content_View_1", + "Test/Test_Content_View_2"]}' headers: Accept: - application/json;version=2 @@ -185,22 +253,22 @@ interactions: Connection: - keep-alive Content-Length: - - '158' + - '108' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) - method: POST - uri: https://foreman.example.org/katello/api/activation_keys + method: PUT + uri: https://foreman.example.org/katello/api/activation_keys/30 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":790,"name":"Test - Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":30,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:12 UTC","updated_at":"2025-12-13 23:35:12 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -209,7 +277,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1619' + - '1563' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -217,11 +285,11 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=97 + - timeout=15, max=96 Referrer-Policy: - strict-origin-when-cross-origin content-security-policy: @@ -241,6 +309,6 @@ interactions: x-xss-protection: - '0' status: - code: 201 - message: Created + code: 200 + message: OK version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-34.yml b/tests/test_playbooks/fixtures/activation_key-34.yml index 42cac613e8..08503cab45 100644 --- a/tests/test_playbooks/fixtures/activation_key-34.yml +++ b/tests/test_playbooks/fixtures/activation_key-34.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,17 +127,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":790,"name":"Test - Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":30,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:35:12 UTC","updated_at":"2025-12-13 23:35:12 UTC","content_view_environments":[{"content_view":{"id":10,"name":"Test + Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":10,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":11},"lifecycle_environment":{"id":6,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":11,"name":"Test + Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":11,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":16},"lifecycle_environment":{"id":7,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":10,"content_view":{"id":10,"name":"Test + Content View 1"},"environment_id":6,"environment":{"id":6,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -146,7 +146,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1762' + - '1688' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -154,9 +154,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -189,28 +189,30 @@ interactions: - gzip, deflate Connection: - keep-alive + Content-Length: + - '0' User-Agent: - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/activation_keys/790?organization_id=69 + method: DELETE + uri: https://foreman.example.org/katello/api/activation_keys/30 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":790,"name":"Test - Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"id":"f2abcc5e-bb4f-4844-a209-e4f87b67c39c","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + Activation Key activation key ''Test Activation Key''; organization ''Test + Organization''","username":"admin","started_at":"2025-12-13 23:35:21 UTC","ended_at":"2025-12-13 + 23:35:21 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":30,"name":"Test + Activation Key"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"aaf6fe25-03bb-451e-8472-e54d226bce94","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Activation Key","input":[["activation_key",{"text":"activation key ''Test + Activation Key''","link":"/activation_keys/30/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:35:21 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: Cache-Control: - - max-age=0, private, must-revalidate + - no-cache Connection: - Keep-Alive - Content-Length: - - '1619' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -218,13 +220,15 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: - strict-origin-when-cross-origin + Transfer-Encoding: + - chunked content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; @@ -242,6 +246,6 @@ interactions: x-xss-protection: - '0' status: - code: 200 - message: OK + code: 202 + message: Accepted version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-35.yml b/tests/test_playbooks/fixtures/activation_key-35.yml deleted file mode 100644 index 196c30c63f..0000000000 --- a/tests/test_playbooks/fixtures/activation_key-35.yml +++ /dev/null @@ -1,317 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/api/status - response: - body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '94' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=100 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 - response: - body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test - Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '389' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=99 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 - response: - body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":790,"name":"Test - Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1762' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=98 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/activation_keys/790?organization_id=69 - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":790,"name":"Test - Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1619' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: '{"organization_id": 69, "content_view_environments": ["Dev/Test_Content_View_1", - "Prod/Test_Content_View_3", "Test/Test_Content_View_2"]}' - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '137' - Content-Type: - - application/json - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/790 - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":790,"name":"Test - Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Prod/Test_Content_View_3,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":166,"name":"Test - Content View 3","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":216,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":376},"lifecycle_environment":{"id":170,"name":"Prod","lifecycle_environment_library":false},"label":"Prod/Test_Content_View_3"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '2014' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=96 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-36.yml b/tests/test_playbooks/fixtures/activation_key-36.yml deleted file mode 100644 index f2fbd7906d..0000000000 --- a/tests/test_playbooks/fixtures/activation_key-36.yml +++ /dev/null @@ -1,252 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/api/status - response: - body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '94' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=100 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 - response: - body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test - Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '389' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=99 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key+with+multiple+CVs%22&per_page=4294967296 - response: - body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key with multiple CVs\"","sort":{"by":"name","order":"asc"},"results":[{"id":790,"name":"Test - Activation Key with multiple CVs","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Prod/Test_Content_View_3,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:59 UTC","updated_at":"2025-12-08 10:28:59 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":166,"name":"Test - Content View 3","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":216,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":376},"lifecycle_environment":{"id":170,"name":"Prod","lifecycle_environment_library":false},"label":"Prod/Test_Content_View_3"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '2157' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=98 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/790 - response: - body: - string: ' {"id":"33cbc771-5cfc-42da-be61-68488a34d1eb","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete - Activation Key activation key ''Test Activation Key with multiple CVs''; organization - ''Test Organization''","username":"admin","started_at":"2025-12-08 10:29:02 - UTC","ended_at":"2025-12-08 10:29:03 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":790,"name":"Test - Activation Key with multiple CVs"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"219c4765-4d88-429f-aa08-f00129590ec1","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete - Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key with multiple CVs''","link":"/activation_keys/790/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:29:02 UTC","available_actions":{"cancellable":false,"resumable":false}} - - ' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - Transfer-Encoding: - - chunked - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-37.yml b/tests/test_playbooks/fixtures/activation_key-37.yml deleted file mode 100644 index b3a5028141..0000000000 --- a/tests/test_playbooks/fixtures/activation_key-37.yml +++ /dev/null @@ -1,246 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/api/status - response: - body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '94' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=100 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 - response: - body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test - Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '389' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=99 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 - response: - body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '172' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=98 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: '{"name": "Test Activation Key", "organization_id": 69, "content_view_environments": - ["Dev/Test_Content_View_1", "Test/Test_Content_View_2"]}' - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '140' - Content-Type: - - application/json - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: POST - uri: https://foreman.example.org/katello/api/activation_keys - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1601' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 201 - message: Created -version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-38.yml b/tests/test_playbooks/fixtures/activation_key-38.yml deleted file mode 100644 index b4449bdfb8..0000000000 --- a/tests/test_playbooks/fixtures/activation_key-38.yml +++ /dev/null @@ -1,441 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/api/status - response: - body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '94' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=100 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 - response: - body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test - Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '389' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=99 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 - response: - body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":791,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1726' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=98 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/activation_keys/791?organization_id=69 - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1601' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 - response: - body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test - Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test - Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1291' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=96 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 - response: - body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 - 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 - minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 - 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1384' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=95 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: '{"organization_id": 69, "content_view_id": 163, "environment_id": 167}' - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '70' - Content-Type: - - application/json - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/791 - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1193' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=94 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-39.yml b/tests/test_playbooks/fixtures/activation_key-39.yml deleted file mode 100644 index 5a471beb5f..0000000000 --- a/tests/test_playbooks/fixtures/activation_key-39.yml +++ /dev/null @@ -1,314 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/api/status - response: - body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '94' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=100 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 - response: - body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test - Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '389' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=99 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 - response: - body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":791,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1318' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=98 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/activation_keys/791?organization_id=69 - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1193' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: '{"organization_id": 69, "content_view_environments": ["Dev/Test_Content_View_1", - "Test/Test_Content_View_2"]}' - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '109' - Content-Type: - - application/json - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/791 - response: - body: - string: ' {"service_level":null,"content_overrides":[],"id":791,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1601' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=96 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-4.yml b/tests/test_playbooks/fixtures/activation_key-4.yml index 3ec87cb9e3..3fc7059df5 100644 --- a/tests/test_playbooks/fixtures/activation_key-4.yml +++ b/tests/test_playbooks/fixtures/activation_key-4.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,16 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":782,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:30 UTC","updated_at":"2025-12-08 10:28:30 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":23,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:33:55 UTC","updated_at":"2025-12-13 23:33:55 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -145,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1318' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -153,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,15 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/782?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/23?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":782,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:30 UTC","updated_at":"2025-12-08 10:28:30 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":23,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:33:55 UTC","updated_at":"2025-12-13 23:33:55 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -208,7 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1193' + - '1155' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -216,9 +216,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -254,14 +254,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test - Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test - Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":5,"name":"Library","label":"Library","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":10},{"name":"Test Content View 2","id":11},{"name":"Test + Content View 3","id":12}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":5},{"id":6},{"id":7},{"id":8}]}]}]} ' headers: @@ -270,7 +270,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1291' + - '1266' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -278,9 +278,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: @@ -316,18 +316,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 - 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 - minute"}],"components":[],"content_view_components":[],"activation_keys":[{"id":782,"name":"Test - Activation Key"}],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 - 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[782],"hosts":[],"permissions":{"readable":true}}]}]} + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":9,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[5],"repository_ids":[],"id":9,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","last_task":null,"latest_version_environments":[{"id":5,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":9,"version":"1.0","published":"2025-12-13 + 23:32:35 UTC","description":null,"environment_ids":[5],"filters_applied":null,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[{"id":23,"name":"Test + Activation Key"}],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 23:32:35 UTC","environments":[{"id":5,"label":"Library","name":"Library","activation_keys":[23],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -336,7 +336,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1426' + - '1432' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -344,9 +344,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-40.yml b/tests/test_playbooks/fixtures/activation_key-40.yml deleted file mode 100644 index 484bf4aecf..0000000000 --- a/tests/test_playbooks/fixtures/activation_key-40.yml +++ /dev/null @@ -1,251 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/api/status - response: - body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '94' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=100 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 - response: - body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": - 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test - Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '389' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=99 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 - response: - body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":791,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Dev/Test_Content_View_1,Test/Test_Content_View_2","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:29:03 UTC","updated_at":"2025-12-08 10:29:04 UTC","content_view_environments":[{"content_view":{"id":164,"name":"Test - Content View 1","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":214,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":366},"lifecycle_environment":{"id":168,"name":"Dev","lifecycle_environment_library":false},"label":"Dev/Test_Content_View_1"},{"content_view":{"id":165,"name":"Test - Content View 2","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":215,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":371},"lifecycle_environment":{"id":169,"name":"Test","lifecycle_environment_library":false},"label":"Test/Test_Content_View_2"}],"products":[],"host_collections":[],"multi_content_view_environment":true,"content_view_id":164,"content_view":{"id":164,"name":"Test - Content View 1"},"environment_id":168,"environment":{"id":168,"name":"Dev"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} - - ' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1726' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - 69; Test Organization - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=98 - Referrer-Policy: - - strict-origin-when-cross-origin - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/791 - response: - body: - string: ' {"id":"956f066e-e160-4dd1-9b2a-f859be70fb24","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete - Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:29:07 UTC","ended_at":"2025-12-08 - 10:29:07 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":791,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"d738a60b-9b0f-4ced-b8a3-60321174c895","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete - Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/791/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:29:07 UTC","available_actions":{"cancellable":false,"resumable":false}} - - ' - headers: - Cache-Control: - - no-cache - Connection: - - Keep-Alive - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.16.0.7 - Keep-Alive: - - timeout=15, max=97 - Referrer-Policy: - - strict-origin-when-cross-origin - Transfer-Encoding: - - chunked - content-security-policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' - strict-transport-security: - - max-age=631139040; includeSubdomains - x-content-type-options: - - nosniff - x-download-options: - - noopen - x-frame-options: - - sameorigin - x-permitted-cross-domain-policies: - - none - x-xss-protection: - - '0' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/test_playbooks/fixtures/activation_key-5.yml b/tests/test_playbooks/fixtures/activation_key-5.yml index de8e4faf61..20b682b694 100644 --- a/tests/test_playbooks/fixtures/activation_key-5.yml +++ b/tests/test_playbooks/fixtures/activation_key-5.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,16 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":782,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:30 UTC","updated_at":"2025-12-08 10:28:30 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":23,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:33:55 UTC","updated_at":"2025-12-13 23:33:55 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -145,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1318' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -153,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -193,18 +193,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: DELETE - uri: https://foreman.example.org/katello/api/activation_keys/782 + uri: https://foreman.example.org/katello/api/activation_keys/23 response: body: - string: ' {"id":"805ee270-9c7b-49d9-8357-5bab54ce47cf","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete + string: ' {"id":"97613251-a64b-4dcb-a643-6bfe26ff6bdc","label":"Actions::Katello::ActivationKey::Destroy","pending":false,"action":"Delete Activation Key activation key ''Test Activation Key''; organization ''Test - Organization''","username":"admin","started_at":"2025-12-08 10:28:32 UTC","ended_at":"2025-12-08 - 10:28:32 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":782,"name":"Test - Activation Key"},"organization":{"id":69,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"864446c5-9564-4ad0-a189-22f3b96f9f6c","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete + Organization''","username":"admin","started_at":"2025-12-13 23:34:00 UTC","ended_at":"2025-12-13 + 23:34:01 UTC","state":"stopped","result":"success","progress":1.0,"input":{"activation_key":{"id":23,"name":"Test + Activation Key"},"organization":{"id":6,"name":"Test Organization","label":"Test_Organization"},"services_checked":["candlepin","candlepin_auth"],"current_request_id":"d58683b1-ab58-4db6-9494-080fee7dd0e6","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Delete Activation Key","input":[["activation_key",{"text":"activation key ''Test - Activation Key''","link":"/activation_keys/782/info"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/69/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-08 - 10:28:32 UTC","available_actions":{"cancellable":false,"resumable":false}} + Activation Key''","link":"/activation_keys/23/info"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/6/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:34:00 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -221,7 +221,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-6.yml b/tests/test_playbooks/fixtures/activation_key-6.yml index 2f1f1fda78..df2f1b7ffb 100644 --- a/tests/test_playbooks/fixtures/activation_key-6.yml +++ b/tests/test_playbooks/fixtures/activation_key-6.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,7 +127,7 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test @@ -148,9 +148,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -186,14 +186,14 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":167,"name":"Library","label":"Library","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test - Content View 1","id":164},{"name":"Test Content View 2","id":165},{"name":"Test - Content View 3","id":166}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":167},{"id":168},{"id":169},{"id":170}]}]}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":5,"name":"Library","label":"Library","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":3,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":1,"docker_repositories":0,"ostree_repositories":0,"products":1,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"Test + Content View 1","id":10},{"name":"Test Content View 2","id":11},{"name":"Test + Content View 3","id":12}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":5},{"id":6},{"id":7},{"id":8}]}]}]} ' headers: @@ -202,7 +202,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1291' + - '1266' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,9 +210,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -248,17 +248,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":213,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"repository_ids":[],"id":163,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:27:42 UTC","updated_at":"2025-12-08 10:27:42 UTC","last_task":null,"latest_version_environments":[{"id":167,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":213,"version":"1.0","published":"2025-12-08 - 10:27:42 UTC","description":null,"environment_ids":[167],"filters_applied":null,"published_at_words":"1 - minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-08 - 10:27:42 UTC","environments":[{"id":167,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":9,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[5],"repository_ids":[],"id":9,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:32:35 UTC","updated_at":"2025-12-13 23:32:35 UTC","last_task":null,"latest_version_environments":[{"id":5,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":9,"version":"1.0","published":"2025-12-13 + 23:32:35 UTC","description":null,"environment_ids":[5],"filters_applied":null,"published_at_words":"1 + minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 23:32:35 UTC","environments":[{"id":5,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -267,7 +267,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1384' + - '1392' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -275,9 +275,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: @@ -302,8 +302,8 @@ interactions: code: 200 message: OK - request: - body: '{"name": "Test Activation Key", "organization_id": 69, "content_view_id": - 163, "environment_id": 167}' + body: '{"name": "Test Activation Key", "organization_id": 6, "content_view_id": + 9, "environment_id": 5}' headers: Accept: - application/json;version=2 @@ -312,7 +312,7 @@ interactions: Connection: - keep-alive Content-Length: - - '101' + - '96' Content-Type: - application/json User-Agent: @@ -321,12 +321,12 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -335,7 +335,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1193' + - '1155' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -343,9 +343,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 Referrer-Policy: @@ -386,15 +386,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/783/content_override + uri: https://foreman.example.org/katello/api/activation_keys/24/content_override response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -403,7 +403,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1288' + - '1250' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -413,7 +413,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=94 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-7.yml b/tests/test_playbooks/fixtures/activation_key-7.yml index 393db62455..f2b11675bb 100644 --- a/tests/test_playbooks/fixtures/activation_key-7.yml +++ b/tests/test_playbooks/fixtures/activation_key-7.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,16 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -145,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1318' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -153,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,15 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/24?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -208,7 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1288' + - '1250' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -216,9 +216,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -254,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/24/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test - Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"0","overrides":[{"name":"enabled","value":false}],"enabled_content_override":false,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":10,"name":"Test + Product"},"content":{"id":10,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765668763121","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"0","overrides":[{"name":"enabled","value":false}],"enabled_content_override":false,"redhat":false}]} ' headers: @@ -278,7 +278,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-8.yml b/tests/test_playbooks/fixtures/activation_key-8.yml index b7dede7a17..bab4a50a56 100644 --- a/tests/test_playbooks/fixtures/activation_key-8.yml +++ b/tests/test_playbooks/fixtures/activation_key-8.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,16 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -145,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1318' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -153,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,15 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/24?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[{"content_label":"Test_Organization_Test_Product_Test_Repository","name":"enabled","value":"0"}],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -208,7 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1288' + - '1250' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -216,9 +216,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -254,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/24/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test - Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"0","overrides":[{"name":"enabled","value":false}],"enabled_content_override":false,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":10,"name":"Test + Product"},"content":{"id":10,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765668763121","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"0","overrides":[{"name":"enabled","value":false}],"enabled_content_override":false,"redhat":false}]} ' headers: @@ -278,7 +278,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: @@ -319,15 +319,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: PUT - uri: https://foreman.example.org/katello/api/activation_keys/783/content_override + uri: https://foreman.example.org/katello/api/activation_keys/24/content_override response: body: - string: ' {"service_level":null,"content_overrides":[],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -336,7 +336,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1193' + - '1155' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -346,7 +346,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_key-9.yml b/tests/test_playbooks/fixtures/activation_key-9.yml index 0e762e655b..491101ab67 100644 --- a/tests/test_playbooks/fixtures/activation_key-9.yml +++ b/tests/test_playbooks/fixtures/activation_key-9.yml @@ -14,14 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"satellite_version":"6.18.1","result":"ok","status":200,"version":"3.16.0.7","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '94' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -31,7 +31,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 Referrer-Policy: @@ -72,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-08 - 10:27:40 UTC\",\"updated_at\":\"2025-12-08 10:27:44 UTC\",\"id\":69,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 23:32:34 UTC\",\"updated_at\":\"2025-12-13 23:32:36 UTC\",\"id\":6,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -81,7 +81,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '389' + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,7 +91,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 Referrer-Policy: @@ -127,16 +127,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/69/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/6/activation_keys?search=name%3D%22Test+Activation+Key%22&per_page=4294967296 response: body: string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Test - Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} + Activation Key\"","sort":{"by":"name","order":"asc"},"results":[{"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}}]} ' headers: @@ -145,7 +145,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1318' + - '1280' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -153,9 +153,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 Referrer-Policy: @@ -191,15 +191,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783?organization_id=69 + uri: https://foreman.example.org/katello/api/activation_keys/24?organization_id=6 response: body: - string: ' {"service_level":null,"content_overrides":[],"id":783,"name":"Test - Activation Key","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":69,"organization":{"name":"Test - Organization","label":"Test_Organization","id":69},"created_at":"2025-12-08 - 10:28:33 UTC","updated_at":"2025-12-08 10:28:33 UTC","content_view_environments":[{"content_view":{"id":163,"name":"Default - Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":213,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":364},"lifecycle_environment":{"id":167,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":163,"content_view":{"id":163,"name":"Default - Organization View"},"environment_id":167,"environment":{"id":167,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":24,"name":"Test + Activation Key","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":6,"organization":{"name":"Test + Organization","label":"Test_Organization","id":6},"created_at":"2025-12-13 + 23:34:04 UTC","updated_at":"2025-12-13 23:34:04 UTC","content_view_environments":[{"content_view":{"id":9,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":9,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":9},"lifecycle_environment":{"id":5,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":9,"content_view":{"id":9,"name":"Default + Organization View"},"environment_id":5,"environment":{"id":5,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -208,7 +208,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1193' + - '1155' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -216,9 +216,9 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 69; Test Organization + - 6; Test Organization Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 Referrer-Policy: @@ -254,12 +254,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/activation_keys/783/product_content?content_access_mode_all=true&per_page=4294967296 + uri: https://foreman.example.org/katello/api/activation_keys/24/product_content?content_access_mode_all=true&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":55,"name":"Test - Product"},"content":{"id":55,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test - Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765189667908","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"default","overrides":[],"enabled_content_override":null,"redhat":false}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":null,"sort":{"by":"name","order":"asc"},"results":[{"enabled":false,"product":{"id":10,"name":"Test + Product"},"content":{"id":10,"name":"Test Repository","label":"Test_Organization_Test_Product_Test_Repository","vendor":"Custom","content_type":"yum","content_url":"/custom/Test_Product/Test_Repository","gpg_url":null},"repositories":[],"name":"Test + Repository","vendor":"Custom","label":"Test_Organization_Test_Product_Test_Repository","id":"1765668763121","type":"yum","gpgUrl":null,"contentUrl":"/custom/Test_Product/Test_Repository","archRestricted":"noarch","osRestricted":null,"override":"default","overrides":[],"enabled_content_override":null,"redhat":false}]} ' headers: @@ -278,7 +278,7 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.16.0.7 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 Referrer-Policy: diff --git a/tests/test_playbooks/fixtures/activation_keys_role-0.yml b/tests/test_playbooks/fixtures/activation_keys_role-0.yml index 31a98cdf12..95979786f9 100644 --- a/tests/test_playbooks/fixtures/activation_keys_role-0.yml +++ b/tests/test_playbooks/fixtures/activation_keys_role-0.yml @@ -14,16 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -33,25 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '62' + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,21 +70,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2020-11-19 21:41:36 UTC\",\"updated_at\"\ - :\"2020-12-11 20:30:53 UTC\",\"id\":4,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-15 + 06:53:11 UTC\",\"updated_at\":\"2025-12-15 06:53:13 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -94,25 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '388' + x-xss-protection: + - '0' status: code: 200 message: OK @@ -128,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Testkey1%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/activation_keys?search=name%3D%22Testkey1%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Testkey1\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Testkey1\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -139,10 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '161' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -150,27 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - ; ANY + - 3; Test Organization Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '148' + x-xss-protection: + - '0' status: code: 200 message: OK @@ -186,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-11-19 - 21:41:37 UTC","updated_at":"2020-11-19 21:41:37 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":0,"puppet_modules":0,"module_streams":0,"errata":{"security":null,"bugfix":0,"enhancement":0,"total":null},"yum_repositories":15,"docker_repositories":0,"ostree_repositories":0,"products":5},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":2,"name":"Library","label":"Library","description":null,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2025-12-15 + 06:53:11 UTC","updated_at":"2025-12-15 06:53:11 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":0,"docker_repositories":0,"ostree_repositories":0,"products":0,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2}]}]}]} ' headers: @@ -199,10 +198,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '1124' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,27 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 3; Test Organization Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '963' + x-xss-protection: + - '0' status: code: 200 message: OK @@ -246,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":true,"force_puppet_environment":false,"version_count":1,"latest_version":"1.0","auto_publish":false,"solve_dependencies":false,"repository_ids":[],"id":3,"name":"Default - Organization View","label":"84c34306-0cb6-4e05-aef5-a424387251a3","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-11-19 - 21:41:38 UTC","updated_at":"2020-11-19 21:41:38 UTC","environments":[{"id":3,"name":"Library","label":"Library","permissions":{"readable":true}}],"repositories":[],"puppet_modules":[],"versions":[{"id":3,"version":"1.0","published":"2020-11-19 - 21:41:38 UTC","environment_ids":[3]}],"components":[],"content_view_components":[],"activation_keys":[],"next_version":"1.0","last_published":"2020-11-19 - 21:41:38 UTC","permissions":{"view_content_views":true,"edit_content_views":true,"destroy_content_views":true,"publish_content_views":true,"promote_or_remove_content_views":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":2,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[2],"repository_ids":[],"id":2,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2025-12-15 + 06:53:11 UTC","updated_at":"2025-12-15 06:53:11 UTC","last_task":null,"latest_version_environments":[{"id":2,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":2,"version":"1.0","published":"2025-12-15 + 06:53:11 UTC","description":null,"environment_ids":[2],"filters_applied":null,"published_at_words":"less + than a minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-15 + 06:53:11 UTC","environments":[{"id":2,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -263,10 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '1402' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -274,33 +272,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 3; Test Organization Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '1169' + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Testkey1", "environment_id": 3, "content_view_id": - 3}' + body: '{"name": "Testkey1", "organization_id": 3, "content_view_id": 2, "environment_id": + 2}' headers: Accept: - application/json;version=2 @@ -318,10 +318,11 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":21,"name":"Testkey1","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-12-16 - 22:26:37 UTC","updated_at":"2020-12-16 22:26:38 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":1,"name":"Testkey1","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2025-12-15 + 06:53:14 UTC","updated_at":"2025-12-15 06:53:14 UTC","content_view_environments":[{"content_view":{"id":2,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":2,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":2},"lifecycle_environment":{"id":2,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":2,"content_view":{"id":2,"name":"Default + Organization View"},"environment_id":2,"environment":{"id":2,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -329,10 +330,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '1143' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -340,25 +339,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - ; ANY + - 3; Test Organization Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/activation_keys_role-1.yml b/tests/test_playbooks/fixtures/activation_keys_role-1.yml index 95bce480d8..ef4eac1835 100644 --- a/tests/test_playbooks/fixtures/activation_keys_role-1.yml +++ b/tests/test_playbooks/fixtures/activation_keys_role-1.yml @@ -14,16 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"2.2.0","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -33,25 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '62' + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,21 +70,18 @@ interactions: uri: https://foreman.example.org/katello/api/organizations?search=name%3D%22Test+Organization%22&per_page=4294967296 response: body: - string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\"\ - : 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\"\ - : {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\"\ - :\"Test_Organization\",\"created_at\":\"2020-11-19 21:41:36 UTC\",\"updated_at\"\ - :\"2020-12-11 20:30:53 UTC\",\"id\":4,\"name\":\"Test Organization\",\"title\"\ - :\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" + string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": + 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-15 + 06:53:11 UTC\",\"updated_at\":\"2025-12-15 06:53:13 UTC\",\"id\":3,\"name\":\"Test + Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '388' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -94,25 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '388' + x-xss-protection: + - '0' status: code: 200 message: OK @@ -128,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22Testkey2%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/activation_keys?search=name%3D%22Testkey2%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Testkey2\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Testkey2\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -139,10 +138,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '161' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -150,27 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - ; ANY + - 3; Test Organization Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '148' + x-xss-protection: + - '0' status: code: 200 message: OK @@ -186,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-11-19 - 21:41:37 UTC","updated_at":"2020-11-19 21:41:37 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":0,"puppet_modules":0,"module_streams":0,"errata":{"security":null,"bugfix":0,"enhancement":0,"total":null},"yum_repositories":15,"docker_repositories":0,"ostree_repositories":0,"products":5},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":2,"name":"Library","label":"Library","description":null,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2025-12-15 + 06:53:11 UTC","updated_at":"2025-12-15 06:53:11 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":0,"module_streams":0,"errata":{"security":0,"bugfix":0,"enhancement":0,"total":0},"yum_repositories":0,"docker_repositories":0,"ostree_repositories":0,"products":0,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":2}]}]}]} ' headers: @@ -199,10 +198,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '1124' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -210,27 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 3; Test Organization Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '963' + x-xss-protection: + - '0' status: code: 200 message: OK @@ -246,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/3/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":true,"force_puppet_environment":false,"version_count":1,"latest_version":"1.0","auto_publish":false,"solve_dependencies":false,"repository_ids":[],"id":3,"name":"Default - Organization View","label":"84c34306-0cb6-4e05-aef5-a424387251a3","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-11-19 - 21:41:38 UTC","updated_at":"2020-11-19 21:41:38 UTC","environments":[{"id":3,"name":"Library","label":"Library","permissions":{"readable":true}}],"repositories":[],"puppet_modules":[],"versions":[{"id":3,"version":"1.0","published":"2020-11-19 - 21:41:38 UTC","environment_ids":[3]}],"components":[],"content_view_components":[],"activation_keys":[{"id":21,"name":"Testkey1"}],"next_version":"1.0","last_published":"2020-11-19 - 21:41:38 UTC","permissions":{"view_content_views":true,"edit_content_views":true,"destroy_content_views":true,"publish_content_views":true,"promote_or_remove_content_views":true}}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":2,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[2],"repository_ids":[],"id":2,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2025-12-15 + 06:53:11 UTC","updated_at":"2025-12-15 06:53:11 UTC","last_task":null,"latest_version_environments":[{"id":2,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":2,"version":"1.0","published":"2025-12-15 + 06:53:11 UTC","description":null,"environment_ids":[2],"filters_applied":null,"published_at_words":"less + than a minute"}],"components":[],"content_view_components":[],"activation_keys":[{"id":1,"name":"Testkey1"}],"hosts":[],"next_version":"1.0","last_published":"2025-12-15 + 06:53:11 UTC","environments":[{"id":2,"label":"Library","name":"Library","activation_keys":[1],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -263,10 +263,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '1429' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -274,33 +272,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 3; Test Organization Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Vary: - - Accept-Encoding - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block - content-length: - - '1196' + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Testkey2", "environment_id": 3, "content_view_id": - 3, "auto_attach": false}' + body: '{"name": "Testkey2", "organization_id": 3, "content_view_id": 2, "environment_id": + 2}' headers: Accept: - application/json;version=2 @@ -309,7 +309,7 @@ interactions: Connection: - keep-alive Content-Length: - - '107' + - '85' Content-Type: - application/json User-Agent: @@ -318,10 +318,11 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":22,"name":"Testkey2","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_id":3,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2020-12-16 - 22:26:40 UTC","updated_at":"2020-12-16 22:26:41 UTC","content_view":{"id":3,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":2,"name":"Testkey2","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":3,"organization":{"name":"Test + Organization","label":"Test_Organization","id":3},"created_at":"2025-12-15 + 06:53:15 UTC","updated_at":"2025-12-15 06:53:15 UTC","content_view_environments":[{"content_view":{"id":2,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":2,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":2},"lifecycle_environment":{"id":2,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":2,"content_view":{"id":2,"name":"Default + Organization View"},"environment_id":2,"environment":{"id":2,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -329,10 +330,8 @@ interactions: - max-age=0, private, must-revalidate Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + Content-Length: + - '1143' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -340,25 +339,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - ; ANY + - 3; Test Organization Foreman_version: - - 2.2.0 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - Transfer-Encoding: - - chunked - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-0.yml b/tests/test_playbooks/fixtures/convert2rhel-0.yml index 081431e2fc..eca9f92c46 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-0.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-0.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Convert2RHEL7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Convert2RHEL7%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL7\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL7\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '168' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '166' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,28 +147,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Convert2RHEL7"}' + body: '{"organization_id": 5, "name": "Convert2RHEL7"}' headers: Accept: - application/json;version=2 @@ -186,9 +192,9 @@ interactions: uri: https://foreman.example.org/katello/api/products response: body: - string: ' {"sync_state_aggregated":null,"redhat":false,"id":5,"cp_id":"176163814735","name":"Convert2RHEL7","label":"Convert2RHEL7","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":0,"created_at":"2023-11-13 - 09:23:24 UTC","updated_at":"2023-11-13 09:23:24 UTC","product_content":[],"available_content":[],"repositories":[],"provider":{"name":"Anonymous"},"sync_status":{"id":null,"product_id":null,"progress":null,"sync_id":null,"state":null,"raw_state":null,"start_time":null,"finish_time":null,"duration":null,"display_size":null,"size":null,"is_running":null,"error_details":null},"permissions":{"view_products":true,"edit_products":true,"destroy_products":true,"sync_products":true},"published_content_view_ids":[],"has_last_affected_repo_in_filter":false,"active_task_count":0} + string: ' {"sync_state_aggregated":null,"redhat":false,"id":6,"cp_id":"184790177306","name":"Convert2RHEL7","label":"Convert2RHEL7","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":0,"created_at":"2025-12-13 + 22:57:46 UTC","updated_at":"2025-12-13 22:57:46 UTC","product_content":[],"available_content":[],"repositories":[],"provider":{"name":"Anonymous"},"sync_status":{"id":null,"product_id":null,"progress":null,"sync_id":null,"state":null,"raw_state":null,"start_time":null,"finish_time":null,"duration":null,"display_size":null,"size":null,"is_running":null,"error_details":null},"permissions":{"view_products":true,"edit_products":true,"destroy_products":true,"sync_products":true},"published_content_view_ids":[],"has_last_affected_repo_in_filter":false,"active_task_count":0} ' headers: @@ -198,10 +204,6 @@ interactions: - Keep-Alive Content-Length: - '1083' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -209,23 +211,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-1.yml b/tests/test_playbooks/fixtures/convert2rhel-1.yml index 2174fd25c3..fc69824990 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-1.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-1.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,11 +127,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Convert2RHEL7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Convert2RHEL7%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL7\"","sort":{"by":"name","order":"asc"},"results":[{"id":5,"cp_id":"176163814735","name":"Convert2RHEL7","label":"Convert2RHEL7","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":0}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL7\"","sort":{"by":"name","order":"asc"},"results":[{"id":6,"cp_id":"184790177306","name":"Convert2RHEL7","label":"Convert2RHEL7","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":0}]} ' headers: @@ -136,11 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '605' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '603' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,23 +148,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -180,10 +186,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/5/repositories?search=name%3D%22Convert2RHEL7+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/6/repositories?search=name%3D%22Convert2RHEL7+main%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL7 + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL7 main\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":0} ' @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '198' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '196' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -207,26 +209,32 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"name": "Convert2RHEL7 main", "product_id": 5, "content_type": "yum", + body: '{"name": "Convert2RHEL7 main", "product_id": 6, "content_type": "yum", "url": "https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel/server/7/7Server/x86_64/os/", "download_policy": "immediate", "verify_ssl_on_sync": true}' headers: @@ -246,12 +254,12 @@ interactions: uri: https://foreman.example.org/katello/api/repositories response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main","promoted":false,"content_view_version_id":5,"library_instance_id":null,"last_contents_changed":"2023-11-13 - 09:23:25 UTC","organization_id":4,"organization":{"name":"Test Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:25 UTC","updated_at":"2023-11-13 09:23:25 UTC","backend_identifier":"42ac9443-2167-4189-b4da-bbfcf402b74a","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main/","version_href":"/pulp/api/v3/repositories/rpm/rpm/b5fce5ea-3912-45b8-966e-fb9f15e774e2/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/a363bf7a-e6cf-44fb-a11c-b50602ce53f7/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel/server/7/7Server/x86_64/os/","arch":"noarch","os_versions":[],"content_id":"1699867405581","generic_remote_options":null,"major":null,"minor":null,"product":{"id":5,"cp_id":"176163814735","name":"Convert2RHEL7","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL7_Convert2RHEL7_main","last_sync_words":null,"environment":{"id":3,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + string: ' {"relative_path":"Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main","promoted":false,"content_view_version_id":6,"library_instance_id":null,"last_contents_changed":"2025-12-13 + 22:57:50 UTC","organization_id":5,"organization":{"name":"Test Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:49 UTC","updated_at":"2025-12-13 22:57:50 UTC","backend_identifier":"09c7cb58-b07f-4338-9ba7-7f2e1561d2b8","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main/","full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-4765-7ccc-8023-5090af77d70d/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-465e-7033-a168-d93a2ed7e5ff/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":10,"name":"Convert2RHEL7 + main","label":"Convert2RHEL7_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel/server/7/7Server/x86_64/os/","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666670615","generic_remote_options":null,"major":null,"minor":null,"product":{"id":6,"cp_id":"184790177306","name":"Convert2RHEL7","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL7_Convert2RHEL7_main","last_sync_words":null,"flatpak_dependencies":false,"environment":{"id":4,"registry_unauthenticated_pull":false},"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_dependencies":true,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"allow_updates":true,"is_container_push":false,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -260,11 +268,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '2849' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2950' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -274,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-10.yml b/tests/test_playbooks/fixtures/convert2rhel-10.yml index ad14f263ad..5c1efbf103 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-10.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-10.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Oracle+Linux+7+Convert2RHEL%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Oracle+Linux+7+Convert2RHEL%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle - Linux 7 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[{"id":7,"cp_id":"521078275134","name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-11-13 - 09:23:31 UTC","last_sync_words":"less than a minute","organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":1}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle + Linux 7 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[{"id":8,"cp_id":"300996341100","name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":1}]} ' headers: @@ -139,11 +142,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '684' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '645' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +150,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,15 +188,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/7/repositories?search=name%3D%22Oracle+Linux+7+Convert2RHEL+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/8/repositories?search=name%3D%22Oracle+Linux+7+Convert2RHEL+main%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle - Linux 7 Convert2RHEL main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"d6aba245-2ef6-4acb-a6b9-dbc72aa036e7","relative_path":"Test_Organization/Library/custom/Oracle_Linux_7_Convert2RHEL/Oracle_Linux_7_Convert2RHEL_main","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Oracle_Linux_7_Convert2RHEL/Oracle_Linux_7_Convert2RHEL_main/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/4c024768-b01e-40d3-99be-42578160b23d/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/6c55319c-9e62-4548-9484-c74c343b720c/","publication_href":"/pulp/api/v3/publications/rpm/rpm/c8edf621-e161-404f-9c25-ea8a584faae7/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi/server/7/7Server/x86_64/os","arch":"noarch","os_versions":[],"content_id":"1699867410895","generic_remote_options":null,"major":null,"minor":null,"product":{"id":7,"cp_id":"521078275134","name":"Oracle - Linux 7 Convert2RHEL","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Oracle_Linux_7_Convert2RHEL_Oracle_Linux_7_Convert2RHEL_main","last_sync_words":null}],"org_repository_count":4} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle + Linux 7 Convert2RHEL main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"76212e8b-1f15-4468-b7bc-b255f3079cc9","relative_path":"Test_Organization/Library/custom/Oracle_Linux_7_Convert2RHEL/Oracle_Linux_7_Convert2RHEL_main","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Oracle_Linux_7_Convert2RHEL/Oracle_Linux_7_Convert2RHEL_main/","library_instance_id":null,"full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-7a55-70e0-9fe2-5dbc69e66ed9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-7963-795e-b441-bbbb859e2e60/","publication_href":"/pulp/api/v3/publications/rpm/rpm/019b19ef-7ca2-749c-a299-8e2593ff2104/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi/server/7/7Server/x86_64/os","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666683649","generic_remote_options":null,"major":null,"minor":null,"product":{"id":8,"cp_id":"300996341100","name":"Oracle + Linux 7 Convert2RHEL","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Oracle_Linux_7_Convert2RHEL_Oracle_Linux_7_Convert2RHEL_main","last_sync_words":null,"flatpak_dependencies":false}],"org_repository_count":4} ' headers: @@ -200,11 +206,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1860' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2042' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -214,21 +216,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -248,20 +256,20 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/repositories/11/sync + uri: https://foreman.example.org/katello/api/repositories/12/sync response: body: - string: ' {"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: ' {"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:52 UTC","available_actions":{"cancellable":false,"resumable":false}} + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:58:27 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -269,10 +277,6 @@ interactions: - no-cache Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -282,23 +286,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted @@ -314,33 +324,30 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/4bfd9d94-3005-4447-9597-18db66d3adfc + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f response: body: - string: '{"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":null,"duration":"4.201438","state":"running","result":"pending","progress":0.07,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"4.587691","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Waiting - to start.\n--------------------------------\nAssociating Content: 0/0\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:52 UTC","available_actions":{"cancellable":true,"resumable":false}}' + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 6/1024\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 + UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '1951' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2002' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -350,21 +357,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -380,22 +393,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/4bfd9d94-3005-4447-9597-18db66d3adfc + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f response: body: - string: '{"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":null,"duration":"8.236905","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"8.900534","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 6/1015\n--------------------------------\nAssociating Content: 0/0\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/1009\nSkipping - Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 09:23:52 + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 6/1024\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: @@ -404,10 +417,6 @@ interactions: - Keep-Alive Content-Length: - '2002' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -417,21 +426,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=94 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -447,22 +462,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/4bfd9d94-3005-4447-9597-18db66d3adfc + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f response: body: - string: '{"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":null,"duration":"12.270949","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"13.314207","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 6/1015\n--------------------------------\nAssociating Content: 0/0\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/1009\nSkipping - Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 09:23:52 + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 6/1024\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: @@ -471,10 +486,6 @@ interactions: - Keep-Alive Content-Length: - '2003' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -484,21 +495,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=93 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -514,22 +531,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/4bfd9d94-3005-4447-9597-18db66d3adfc + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f response: body: - string: '{"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":null,"duration":"16.306915","state":"running","result":"pending","progress":0.28,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"17.624289","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 1010/1515\n--------------------------------\nAssociating Content: 500/500\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 504/1009\nSkipping - Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 09:23:52 + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 6/1024\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: @@ -537,11 +554,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '2012' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2003' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -551,21 +564,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=92 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -581,22 +600,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/4bfd9d94-3005-4447-9597-18db66d3adfc + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f response: body: - string: '{"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":null,"duration":"20.344052","state":"running","result":"pending","progress":0.28,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"21.933424","state":"running","result":"pending","progress":0.22,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 1010/1515\n--------------------------------\nAssociating Content: 500/500\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 504/1009\nSkipping - Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 09:23:52 + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 510/1024\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 504/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: @@ -604,11 +623,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '2012' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2007' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -618,21 +633,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=91 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -648,34 +669,99 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/4bfd9d94-3005-4447-9597-18db66d3adfc + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f response: body: - string: '{"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":null,"duration":"24.383743","state":"running","result":"pending","progress":0.41,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"26.308643","state":"running","result":"pending","progress":0.28,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 1515/1515\n--------------------------------\nAssociating Content: 500/500\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Advisories: 0/0\nParsed - Comps: 0/0\nParsed Packages: 1009/1009\nSkipping Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:52 UTC","available_actions":{"cancellable":true,"resumable":false}}' + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 1010/1524\n--------------------------------\nAssociating Content: 500/500\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 504/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 + UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '2056' - Content-Security-Policy: + - '2012' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=90 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f + response: + body: + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"30.629509","state":"running","result":"pending","progress":0.28,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 1010/1524\n--------------------------------\nAssociating Content: 500/500\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 504/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 + UTC","available_actions":{"cancellable":true,"resumable":false}}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2012' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -685,21 +771,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=90 - Strict-Transport-Security: + - timeout=15, max=89 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -715,23 +807,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/4bfd9d94-3005-4447-9597-18db66d3adfc + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f response: body: - string: '{"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":null,"duration":"28.430898","state":"running","result":"pending","progress":0.52,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"3a1a8732-373a-4a68-ab01-748fd1a97cce","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"35.0184","state":"running","result":"pending","progress":0.28,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 2024/2024\n--------------------------------\nAssociating Content: 1009/1009\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Advisories: 0/0\nParsed - Comps: 0/0\nParsed Packages: 1009/1009\nSkipping Packages: 0/0\nUn-Associating - Content: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 09:23:52 + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 1010/1524\n--------------------------------\nAssociating Content: 500/500\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 504/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: @@ -739,11 +830,76 @@ interactions: Connection: - Keep-Alive Content-Length: - - '2087' - Content-Security-Policy: + - '2010' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=88 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f + response: + body: + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"39.337308","state":"running","result":"pending","progress":0.28,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 1010/1524\n--------------------------------\nAssociating Content: 500/500\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 504/1018\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 + UTC","available_actions":{"cancellable":true,"resumable":false}}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2012' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -753,21 +909,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=89 - Strict-Transport-Security: + - timeout=15, max=87 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -783,35 +945,101 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/4bfd9d94-3005-4447-9597-18db66d3adfc + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f response: body: - string: '{"id":"4bfd9d94-3005-4447-9597-18db66d3adfc","label":"Actions::Katello::Repository::Sync","pending":false,"action":"Synchronize + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:23:52 UTC","ended_at":"2023-11-13 09:24:22 UTC","duration":"30.539575","state":"stopped","result":"success","progress":1.0,"input":{"repository":{"id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":7,"name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"521078275134"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"publication_provided":false,"contents_changed":true},"skip_metadata_check":false,"validate_contents":false,"contents_changed":true,"current_request_id":"098e3149-fee4-48dc-9fea-5163ef971f46","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":null,"duration":"43.726983","state":"running","result":"pending","progress":0.63,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b060e224-304d-4461-9a27-16b488685d35","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 7 Convert2RHEL''","link":"/products/7/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Added Rpms: - 1009\nTotal steps: 2024/2024\n--------------------------------\nAssociating - Content: 1009/1009\nDownloading Artifacts: 0/0\nDownloading Metadata Files: - 6/6\nParsed Advisories: 0/0\nParsed Comps: 0/0\nParsed Packages: 1009/1009\nSkipping - Packages: 0/0\nUn-Associating Content: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:52 UTC","available_actions":{"cancellable":false,"resumable":false}}' + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 2042/2042\n--------------------------------\nAssociating Content: 1018/1018\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Advisories: 0/0\nParsed + Comps: 0/0\nParsed Packages: 1018/1018\nSkipping Packages: 0/0\nUn-Associating + Content: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:58:27 + UTC","available_actions":{"cancellable":false,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '1867' - Content-Security-Policy: + - '2088' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=86 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/foreman_tasks/api/tasks/e4680bcb-ce0a-4107-8a11-854059745a0f + response: + body: + string: '{"id":"e4680bcb-ce0a-4107-8a11-854059745a0f","label":"Actions::Katello::Repository::Sync","pending":false,"action":"Synchronize + repository ''Oracle Linux 7 Convert2RHEL main''; product ''Oracle Linux 7 + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:58:27 UTC","ended_at":"2025-12-13 22:59:11 UTC","duration":"44.061445","state":"stopped","result":"success","progress":1.0,"input":{"repository":{"id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","cp_id":"300996341100"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"publication_provided":false,"contents_changed":true},"skip_metadata_check":false,"validate_contents":false,"contents_changed":true,"current_request_id":"7d6e9b3a-bdff-4622-aa9e-50a37e6ee6eb","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Oracle Linux 7 Convert2RHEL main''","link":null}],["product",{"text":"product + ''Oracle Linux 7 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Added Rpms: + 1018\nTotal steps: 2042/2042\n--------------------------------\nAssociating + Content: 1018/1018\nDownloading Artifacts: 0/0\nDownloading Metadata Files: + 6/6\nParsed Advisories: 0/0\nParsed Comps: 0/0\nParsed Packages: 1018/1018\nSkipping + Packages: 0/0\nUn-Associating Content: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:58:27 UTC","available_actions":{"cancellable":false,"resumable":false}}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '1867' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -821,21 +1049,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=88 - Strict-Transport-Security: + - timeout=15, max=85 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/convert2rhel-11.yml b/tests/test_playbooks/fixtures/convert2rhel-11.yml index 7a005a9127..72b06d7fef 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-11.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-11.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,14 +127,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Oracle+Linux+8+Convert2RHEL%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Oracle+Linux+8+Convert2RHEL%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle - Linux 8 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[{"id":8,"cp_id":"533490883786","name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-11-13 - 09:23:34 UTC","last_sync_words":"1 minute","organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":1}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle + Linux 8 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[{"id":9,"cp_id":"380210074378","name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":1}]} ' headers: @@ -139,11 +142,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '674' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '645' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -151,23 +150,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -183,15 +188,16 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/8/repositories?search=name%3D%22Oracle+Linux+8+Convert2RHEL+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/9/repositories?search=name%3D%22Oracle+Linux+8+Convert2RHEL+main%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle - Linux 8 Convert2RHEL main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"578d0b29-4bca-45e8-8213-1ee30b86bea5","relative_path":"Test_Organization/Library/custom/Oracle_Linux_8_Convert2RHEL/Oracle_Linux_8_Convert2RHEL_main","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Oracle_Linux_8_Convert2RHEL/Oracle_Linux_8_Convert2RHEL_main/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/7ba6e2c9-531a-4021-b2ca-2a7482cc6d4d/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/de92cca5-e59c-4c3c-b6e9-a0468cadf657/","publication_href":"/pulp/api/v3/publications/rpm/rpm/d19e5137-e5b7-44aa-b8b6-954ec146f31b/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":12,"name":"Oracle - Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/","arch":"noarch","os_versions":[],"content_id":"1699867413416","generic_remote_options":null,"major":null,"minor":null,"product":{"id":8,"cp_id":"533490883786","name":"Oracle - Linux 8 Convert2RHEL","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Oracle_Linux_8_Convert2RHEL_Oracle_Linux_8_Convert2RHEL_main","last_sync_words":null}],"org_repository_count":4} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle + Linux 8 Convert2RHEL main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"fb4f782f-1194-4c4e-a8fd-d569029ed8f2","relative_path":"Test_Organization/Library/custom/Oracle_Linux_8_Convert2RHEL/Oracle_Linux_8_Convert2RHEL_main","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Oracle_Linux_8_Convert2RHEL/Oracle_Linux_8_Convert2RHEL_main/","library_instance_id":null,"full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-9351-70c2-97ba-762f34c75323/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-9260-7433-9296-a9a932105ad5/","publication_href":"/pulp/api/v3/publications/rpm/rpm/019b19ef-95aa-7318-b70e-372d0889dff0/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666690062","generic_remote_options":null,"major":null,"minor":null,"product":{"id":9,"cp_id":"380210074378","name":"Oracle + Linux 8 Convert2RHEL","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Oracle_Linux_8_Convert2RHEL_Oracle_Linux_8_Convert2RHEL_main","last_sync_words":null,"flatpak_dependencies":false}],"org_repository_count":4} ' headers: @@ -200,11 +206,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1854' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2036' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -214,21 +216,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -248,20 +256,20 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/repositories/12/sync + uri: https://foreman.example.org/katello/api/repositories/13/sync response: body: - string: ' {"id":"bbe34c69-1051-4d08-afdb-3e63d24dfaad","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: ' {"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:25 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"repository":{"id":12,"name":"Oracle - Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"533490883786"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"d04fa5c4-d220-4b57-8535-10340dcadb21","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 8 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:25 UTC","available_actions":{"cancellable":false,"resumable":false}} + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:59:18 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -269,10 +277,6 @@ interactions: - no-cache Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -282,23 +286,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted @@ -314,22 +324,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/bbe34c69-1051-4d08-afdb-3e63d24dfaad + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc response: body: - string: '{"id":"bbe34c69-1051-4d08-afdb-3e63d24dfaad","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:25 UTC","ended_at":null,"duration":"4.183188","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":12,"name":"Oracle - Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"533490883786"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"d04fa5c4-d220-4b57-8535-10340dcadb21","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"duration":"4.675254","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 8 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 6/755\n--------------------------------\nAssociating Content: 0/0\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/749\nSkipping - Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 09:24:25 + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 6/774\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/768\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:59:18 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: @@ -338,10 +348,75 @@ interactions: - Keep-Alive Content-Length: - '2000' - Content-Security-Policy: + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=95 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc + response: + body: + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"duration":"8.990816","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 6/774\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/768\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:59:18 + UTC","available_actions":{"cancellable":true,"resumable":false}}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2000' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -351,21 +426,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=95 - Strict-Transport-Security: + - timeout=15, max=94 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -381,22 +462,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/bbe34c69-1051-4d08-afdb-3e63d24dfaad + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc response: body: - string: '{"id":"bbe34c69-1051-4d08-afdb-3e63d24dfaad","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:25 UTC","ended_at":null,"duration":"8.214787","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":12,"name":"Oracle - Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"533490883786"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"d04fa5c4-d220-4b57-8535-10340dcadb21","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"duration":"13.381387","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 8 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 6/755\n--------------------------------\nAssociating Content: 0/0\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/749\nSkipping - Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 09:24:25 + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 6/774\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/768\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:59:18 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: @@ -404,11 +485,76 @@ interactions: Connection: - Keep-Alive Content-Length: - - '2000' - Content-Security-Policy: + - '2001' + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=93 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc + response: + body: + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"duration":"17.719644","state":"running","result":"pending","progress":0.04,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 6/774\n--------------------------------\nAssociating Content: 0/0\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Packages: 0/768\nSkipping + Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:59:18 + UTC","available_actions":{"cancellable":true,"resumable":false}}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2001' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -418,21 +564,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=94 - Strict-Transport-Security: + - timeout=15, max=92 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -448,23 +600,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/bbe34c69-1051-4d08-afdb-3e63d24dfaad + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc response: body: - string: '{"id":"bbe34c69-1051-4d08-afdb-3e63d24dfaad","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:25 UTC","ended_at":null,"duration":"12.252544","state":"running","result":"pending","progress":0.41,"input":{"repository":{"id":12,"name":"Oracle - Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"533490883786"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"d04fa5c4-d220-4b57-8535-10340dcadb21","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"duration":"22.041493","state":"running","result":"pending","progress":0.41,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 8 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 755/755\n--------------------------------\nAssociating Content: 0/0\nDownloading + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 774/774\n--------------------------------\nAssociating Content: 0/0\nDownloading Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Advisories: 0/0\nParsed - Comps: 0/0\nParsed Packages: 749/749\nSkipping Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:25 UTC","available_actions":{"cancellable":true,"resumable":false}}' + Comps: 0/0\nParsed Packages: 768/768\nSkipping Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:59:18 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate @@ -472,10 +624,75 @@ interactions: - Keep-Alive Content-Length: - '2048' - Content-Security-Policy: + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=91 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc + response: + body: + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"duration":"26.388416","state":"running","result":"pending","progress":0.41,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 1274/1274\n--------------------------------\nAssociating Content: 500/500\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Advisories: 0/0\nParsed + Comps: 0/0\nParsed Packages: 768/768\nSkipping Packages: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:59:18 UTC","available_actions":{"cancellable":true,"resumable":false}}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2054' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -485,21 +702,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=93 - Strict-Transport-Security: + - timeout=15, max=90 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -515,23 +738,23 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/bbe34c69-1051-4d08-afdb-3e63d24dfaad + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc response: body: - string: '{"id":"bbe34c69-1051-4d08-afdb-3e63d24dfaad","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:25 UTC","ended_at":null,"duration":"16.298499","state":"running","result":"pending","progress":0.54,"input":{"repository":{"id":12,"name":"Oracle - Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"533490883786"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"11f026fb-c3ba-409d-8690-d8bceacd7d21","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"d04fa5c4-d220-4b57-8535-10340dcadb21","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"duration":"30.704399","state":"running","result":"pending","progress":0.41,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 8 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Total steps: - 1504/1504\n--------------------------------\nAssociating Content: 749/749\nDownloading + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 1542/1542\n--------------------------------\nAssociating Content: 768/768\nDownloading Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Advisories: 0/0\nParsed - Comps: 0/0\nParsed Packages: 749/749\nSkipping Packages: 0/0\nUn-Associating - Content: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 09:24:25 + Comps: 0/0\nParsed Packages: 768/768\nSkipping Packages: 0/0\nUn-Associating + Content: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:59:18 UTC","available_actions":{"cancellable":true,"resumable":false}}' headers: Cache-Control: @@ -540,10 +763,76 @@ interactions: - Keep-Alive Content-Length: - '2083' - Content-Security-Policy: + Content-Type: + - application/json; charset=utf-8 + Foreman_api_version: + - '2' + Foreman_current_location: + - ; ANY + Foreman_current_organization: + - ; ANY + Foreman_version: + - 3.18.0-develop + Keep-Alive: + - timeout=15, max=89 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: + - nosniff + x-download-options: + - noopen + x-frame-options: + - sameorigin + x-permitted-cross-domain-policies: + - none + x-xss-protection: + - '0' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json;version=2 + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - apypie (https://github.com/Apipie/apypie) + method: GET + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc + response: + body: + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":null,"duration":"35.023785","state":"running","result":"pending","progress":0.63,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"21045367-f01a-44c0-8a20-cc2b699ee126","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Total steps: + 1542/1542\n--------------------------------\nAssociating Content: 768/768\nDownloading + Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed Advisories: 0/0\nParsed + Comps: 0/0\nParsed Packages: 768/768\nSkipping Packages: 0/0\nUn-Associating + Content: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 22:59:18 + UTC","available_actions":{"cancellable":false,"resumable":false}}' + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Connection: + - Keep-Alive + Content-Length: + - '2084' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -553,21 +842,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=92 - Strict-Transport-Security: + - timeout=15, max=88 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -583,24 +878,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/bbe34c69-1051-4d08-afdb-3e63d24dfaad + uri: https://foreman.example.org/foreman_tasks/api/tasks/68fe0b4f-ef20-488e-a721-77c126df1fdc response: body: - string: '{"id":"bbe34c69-1051-4d08-afdb-3e63d24dfaad","label":"Actions::Katello::Repository::Sync","pending":false,"action":"Synchronize + string: '{"id":"68fe0b4f-ef20-488e-a721-77c126df1fdc","label":"Actions::Katello::Repository::Sync","pending":false,"action":"Synchronize repository ''Oracle Linux 8 Convert2RHEL main''; product ''Oracle Linux 8 - Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:25 UTC","ended_at":"2023-11-13 09:24:43 UTC","duration":"17.593308","state":"stopped","result":"success","progress":1.0,"input":{"repository":{"id":12,"name":"Oracle - Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":8,"name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"533490883786"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":12,"sync_result":{"publication_provided":false,"contents_changed":true},"skip_metadata_check":false,"validate_contents":false,"contents_changed":true,"current_request_id":"d04fa5c4-d220-4b57-8535-10340dcadb21","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + Convert2RHEL''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 22:59:18 UTC","ended_at":"2025-12-13 22:59:54 UTC","duration":"35.795511","state":"stopped","result":"success","progress":1.0,"input":{"repository":{"id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main"},"product":{"id":9,"name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","cp_id":"380210074378"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":13,"sync_result":{"publication_provided":false,"contents_changed":true},"skip_metadata_check":false,"validate_contents":false,"contents_changed":true,"current_request_id":"391eb513-2556-4dbc-9722-866651ab56a2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository ''Oracle Linux 8 Convert2RHEL main''","link":null}],["product",{"text":"product - ''Oracle Linux 8 Convert2RHEL''","link":"/products/8/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Added Rpms: - 749\nTotal steps: 1504/1504\n--------------------------------\nAssociating - Content: 749/749\nDownloading Artifacts: 0/0\nDownloading Metadata Files: - 6/6\nParsed Advisories: 0/0\nParsed Comps: 0/0\nParsed Packages: 749/749\nSkipping - Packages: 0/0\nUn-Associating Content: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:25 UTC","available_actions":{"cancellable":false,"resumable":false}}' + ''Oracle Linux 8 Convert2RHEL''","link":"/products/9/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Added Rpms: + 768\nTotal steps: 1542/1542\n--------------------------------\nAssociating + Content: 768/768\nDownloading Artifacts: 0/0\nDownloading Metadata Files: + 6/6\nParsed Advisories: 0/0\nParsed Comps: 0/0\nParsed Packages: 768/768\nSkipping + Packages: 0/0\nUn-Associating Content: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:59:18 UTC","available_actions":{"cancellable":false,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate @@ -608,10 +903,6 @@ interactions: - Keep-Alive Content-Length: - '1862' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -621,21 +912,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - - timeout=15, max=91 - Strict-Transport-Security: + - timeout=15, max=87 + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/convert2rhel-12.yml b/tests/test_playbooks/fixtures/convert2rhel-12.yml index 67df21b1db..039848d0cf 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-12.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-12.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22convert2rhel_centos7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22convert2rhel_centos7%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_centos7\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_centos7\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '175' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '173' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,23 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -179,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Convert2RHEL7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Convert2RHEL7%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL7\"","sort":{"by":"name","order":"asc"},"results":[{"id":5,"cp_id":"176163814735","name":"Convert2RHEL7","label":"Convert2RHEL7","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{"success":1},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":"Syncing - Complete.","last_sync":"2023-11-13 09:23:34 UTC","last_sync_words":"1 minute","organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":1}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL7\"","sort":{"by":"name","order":"asc"},"results":[{"id":6,"cp_id":"184790177306","name":"Convert2RHEL7","label":"Convert2RHEL7","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{"success":1},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":"Syncing + Complete.","last_sync":"2025-12-13 22:58:13 UTC","last_sync_words":"2 minutes","organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":1}]} ' headers: @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '658' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '657' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -205,23 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -237,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/5/repositories?search=name%3D%22Convert2RHEL7+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/6/repositories?search=name%3D%22Convert2RHEL7+main%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL7 - main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"42ac9443-2167-4189-b4da-bbfcf402b74a","relative_path":"Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/b5fce5ea-3912-45b8-966e-fb9f15e774e2/versions/1/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/a363bf7a-e6cf-44fb-a11c-b50602ce53f7/","publication_href":"/pulp/api/v3/publications/rpm/rpm/4b42d252-9805-49e8-a125-737f3e9235d8/","content_counts":{"rpm":12,"erratum":12,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main","description":null,"content_view_versions":[],"filters":[],"last_sync":{"id":"b159576b-062a-43a2-a6bb-82d5ef2859e6","username":"admin","started_at":"2023-11-13 - 09:23:34 UTC","ended_at":"2023-11-13 09:23:42 UTC","state":"stopped","result":"success","progress":1.0},"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel/server/7/7Server/x86_64/os/","arch":"noarch","os_versions":[],"content_id":"1699867405581","generic_remote_options":null,"major":null,"minor":null,"product":{"id":5,"cp_id":"176163814735","name":"Convert2RHEL7","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL7_Convert2RHEL7_main","last_sync_words":"1 - minute"}],"org_repository_count":4} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL7 + main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"09c7cb58-b07f-4338-9ba7-7f2e1561d2b8","relative_path":"Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main/","library_instance_id":null,"full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-4765-7ccc-8023-5090af77d70d/versions/1/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-465e-7033-a168-d93a2ed7e5ff/","publication_href":"/pulp/api/v3/publications/rpm/rpm/019b19ef-a66f-7f31-9017-c8b7ca1c67f8/","content_counts":{"rpm":18,"erratum":18,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":10,"name":"Convert2RHEL7 + main","label":"Convert2RHEL7_main","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"content_view_versions":[],"filters":[],"last_sync":{"id":"bf30c16c-4d3f-43de-8e0f-2d45954d4707","username":"admin","started_at":"2025-12-13 + 22:58:13 UTC","ended_at":"2025-12-13 22:58:16 UTC","state":"stopped","result":"success","progress":1.0},"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel/server/7/7Server/x86_64/os/","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666670615","generic_remote_options":null,"major":null,"minor":null,"product":{"id":6,"cp_id":"184790177306","name":"Convert2RHEL7","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL7_Convert2RHEL7_main","last_sync_words":"2 + minutes","flatpak_dependencies":false}],"org_repository_count":4} ' headers: @@ -255,11 +264,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1930' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2114' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -269,27 +274,33 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: body: '{"name": "convert2rhel_centos7", "composite": false, "repository_ids": - [9], "auto_publish": false}' + [10], "auto_publish": false}' headers: Accept: - application/json;version=2 @@ -298,19 +309,19 @@ interactions: Connection: - keep-alive Content-Length: - - '98' + - '99' Content-Type: - application/json User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/organizations/4/content_views + uri: https://foreman.example.org/katello/api/organizations/5/content_views response: body: - string: ' {"content_host_count":0,"composite":false,"component_ids":[],"default":false,"version_count":0,"latest_version":null,"latest_version_id":null,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":true,"filtered":false,"repository_ids":[9],"id":6,"name":"convert2rhel_centos7","label":"convert2rhel_centos7","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:24:46 UTC","updated_at":"2023-11-13 09:24:46 UTC","last_task":null,"latest_version_environments":[],"repositories":[{"id":9,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main","content_type":"yum"}],"versions":[],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":null,"environments":[],"duplicate_repositories_to_publish":[],"errors":null} + string: ' {"content_host_count":0,"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":false,"version_count":0,"latest_version":null,"latest_version_id":null,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":true,"environment_ids":[],"repository_ids":[10],"id":7,"name":"convert2rhel_centos7","label":"convert2rhel_centos7","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:00 UTC","updated_at":"2025-12-13 23:00:00 UTC","last_task":null,"latest_version_environments":[],"repositories":[{"id":10,"name":"Convert2RHEL7 + main","label":"Convert2RHEL7_main","content_type":"yum"}],"versions":[],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":null,"environments":[],"errors":null} ' headers: @@ -319,11 +330,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '966' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1005' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +338,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-13.yml b/tests/test_playbooks/fixtures/convert2rhel-13.yml index bd03af901c..885b30dfa0 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-13.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-13.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,12 +127,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22convert2rhel_centos7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22convert2rhel_centos7%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_centos7\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":false,"version_count":0,"latest_version":null,"latest_version_id":null,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":true,"filtered":false,"repository_ids":[9],"id":6,"name":"convert2rhel_centos7","label":"convert2rhel_centos7","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:24:46 UTC","updated_at":"2023-11-13 09:24:46 UTC","last_task":null,"latest_version_environments":[],"repositories":[{"id":9,"name":"Convert2RHEL7 + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_centos7\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":false,"version_count":0,"latest_version":null,"latest_version_id":null,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":true,"environment_ids":[],"repository_ids":[10],"id":7,"name":"convert2rhel_centos7","label":"convert2rhel_centos7","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:00 UTC","updated_at":"2025-12-13 23:00:00 UTC","last_task":null,"latest_version_environments":[],"repositories":[{"id":10,"name":"Convert2RHEL7 main","label":"Convert2RHEL7_main","content_type":"yum"}],"versions":[],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":null,"environments":[]}]} ' @@ -138,11 +142,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1062' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1138' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -150,23 +150,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -182,10 +188,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/content_view_versions?search=content_view_id%3D6%2Cversion%3D1.0&per_page=4294967296 + uri: https://foreman.example.org/katello/api/content_view_versions?search=content_view_id%3D7%2Cversion%3D1.0&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"content_view_id=6,version=1.0","sort":{"by":"version","order":"desc"},"results":[]} + string: '{"total":2,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"content_view_id=7,version=1.0","sort":{"by":"version","order":"desc"},"results":[]} ' headers: @@ -194,11 +200,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '179' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '177' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -208,21 +210,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -238,12 +246,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":1782,"module_streams":0,"errata":{"security":4,"bugfix":4,"enhancement":16,"total":24},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[]}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Library","label":"Library","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":0,"packages":1822,"module_streams":0,"errata":{"security":4,"bugfix":6,"enhancement":26,"total":36},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":4}]}]}]} ' headers: @@ -252,11 +260,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1006' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1128' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -264,23 +268,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -300,17 +310,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/content_views/6/publish + uri: https://foreman.example.org/katello/api/content_views/7/publish response: body: - string: ' {"id":"cde4e2e9-d82a-4eb4-95d5-736bb355f4d7","label":"Actions::Katello::ContentView::Publish","pending":true,"action":"Publish - content view ''convert2rhel_centos7''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:47 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"content_view":{"id":6,"name":"convert2rhel_centos7","label":"convert2rhel_centos7"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":6,"content_view_id":6,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos7 - 1.0","content_view_version_id":6,"environment_id":3,"user_id":4,"skip_promotion":null,"current_request_id":"fdfae693-e9d8-4b9b-9cb4-0df1832b984e","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Publish","input":[["content_view",{"text":"content - view ''convert2rhel_centos7''","link":"/content_views/6/versions"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:47 UTC","available_actions":{"cancellable":false,"resumable":false}} + string: ' {"id":"7b4aa579-2dae-4a35-801f-11e71d87453a","label":"Actions::Katello::ContentView::Publish","pending":true,"action":"Publish + content view ''convert2rhel_centos7''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 23:00:04 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"content_view":{"id":7,"name":"convert2rhel_centos7","label":"convert2rhel_centos7"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":7,"content_view_id":7,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos7 + 1.0","content_view_version_id":7,"environment_id":4,"user_id":4,"skip_promotion":null,"current_request_id":"faaf39cc-d98b-4ff8-982c-a9ad04be0956","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Publish","input":[["content_view",{"text":"content + view ''convert2rhel_centos7''","link":"/content_views/7/versions"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:00:04 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -318,10 +328,6 @@ interactions: - no-cache Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +337,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted @@ -363,28 +375,24 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/cde4e2e9-d82a-4eb4-95d5-736bb355f4d7 + uri: https://foreman.example.org/foreman_tasks/api/tasks/7b4aa579-2dae-4a35-801f-11e71d87453a response: body: - string: '{"id":"cde4e2e9-d82a-4eb4-95d5-736bb355f4d7","label":"Actions::Katello::ContentView::Publish","pending":false,"action":"Publish - content view ''convert2rhel_centos7''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:47 UTC","ended_at":"2023-11-13 09:24:49 UTC","duration":"2.64056","state":"stopped","result":"success","progress":1.0,"input":{"content_view":{"id":6,"name":"convert2rhel_centos7","label":"convert2rhel_centos7"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":6,"content_view_id":6,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos7 - 1.0","content_view_version_id":6,"environment_id":3,"user_id":4,"skip_promotion":null,"current_request_id":"fdfae693-e9d8-4b9b-9cb4-0df1832b984e","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{"content_view_id":6,"content_view_version_id":6,"skip_promotion":null,"history_id":6},"humanized":{"action":"Publish","input":[["content_view",{"text":"content - view ''convert2rhel_centos7''","link":"/content_views/6/versions"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:47 UTC","available_actions":{"cancellable":false,"resumable":false}}' + string: '{"id":"7b4aa579-2dae-4a35-801f-11e71d87453a","label":"Actions::Katello::ContentView::Publish","pending":false,"action":"Publish + content view ''convert2rhel_centos7''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 23:00:04 UTC","ended_at":"2025-12-13 23:00:06 UTC","duration":"2.474384","state":"stopped","result":"success","progress":1.0,"input":{"content_view":{"id":7,"name":"convert2rhel_centos7","label":"convert2rhel_centos7"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":7,"content_view_id":7,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos7 + 1.0","content_view_version_id":7,"environment_id":4,"user_id":4,"skip_promotion":null,"current_request_id":"faaf39cc-d98b-4ff8-982c-a9ad04be0956","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{"content_view_id":7,"content_view_version_id":7,"skip_promotion":null,"history_id":7},"humanized":{"action":"Publish","input":[["content_view",{"text":"content + view ''convert2rhel_centos7''","link":"/content_views/7/versions"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:00:04 UTC","available_actions":{"cancellable":false,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '1435' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1436' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -394,21 +402,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=94 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -424,22 +438,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/content_view_versions/6 + uri: https://foreman.example.org/katello/api/content_view_versions/7 response: body: - string: ' {"version":"1.0","major":1,"minor":0,"composite_content_view_ids":[],"published_in_composite_content_view_ids":[],"content_view_id":6,"default":false,"description":null,"id":6,"name":"convert2rhel_centos7 - 1.0","created_at":"2023-11-13 09:24:47 UTC","updated_at":"2023-11-13 09:24:49 - UTC","content_view":{"id":6,"name":"convert2rhel_centos7","label":"convert2rhel_centos7","generated_for":"none"},"composite_content_views":[],"composite_content_view_versions":[],"published_in_composite_content_views":[],"environments":[{"id":3,"name":"Library","label":"Library","publish_date":"less - than a minute","permissions":{"readable":true,"promotable_or_removable":true,"all_hosts_editable":true,"all_keys_editable":true},"host_count":0,"activation_key_count":0}],"repositories":[{"id":13,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main","content_type":"yum","library_instance_id":9,"mirroring_policy":"mirror_content_only"}],"last_event":{"user":"admin","status":"successful","description":null,"action":"publish","created_at":"2023-11-13 - 09:24:47 UTC","updated_at":"2023-11-13 09:24:49 UTC","environment":null,"task":{"id":"cde4e2e9-d82a-4eb4-95d5-736bb355f4d7","label":"Actions::Katello::ContentView::Publish","pending":false,"action":"Publish - content view ''convert2rhel_centos7''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:47 UTC","ended_at":"2023-11-13 09:24:49 UTC","state":"stopped","result":"success","progress":1.0,"input":{"content_view":{"id":6,"name":"convert2rhel_centos7","label":"convert2rhel_centos7"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":6,"content_view_id":6,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos7 - 1.0","content_view_version_id":6,"environment_id":3,"user_id":4,"skip_promotion":null,"current_request_id":"fdfae693-e9d8-4b9b-9cb4-0df1832b984e","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{"content_view_id":6,"content_view_version_id":6,"skip_promotion":null,"history_id":6},"humanized":{"action":"Publish","input":[["content_view",{"text":"content - view ''convert2rhel_centos7''","link":"/content_views/6/versions"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:47 UTC","available_actions":{"cancellable":false,"resumable":false}},"version":"1.0","publish":true,"version_id":6,"triggered_by":null,"triggered_by_id":null},"active_history":[],"ansible_collection_count":0,"deb_count":0,"docker_manifest_count":0,"docker_manifest_list_count":0,"docker_tag_count":0,"file_count":0,"python_package_count":0,"rpm_count":12,"modulemd_count":0,"erratum_count":12,"package_group_count":0,"srpm_count":0,"module_stream_count":0,"package_count":12,"component_view_count":0,"ansible_collection_repository_count":0,"deb_repository_count":0,"docker_repository_count":0,"file_repository_count":0,"python_repository_count":0,"yum_repository_count":1,"errata_counts":{"security":2,"bugfix":2,"enhancement":8,"total":12},"permissions":{"deletable":true},"filters_applied":false} + string: ' {"version":"1.0","major":1,"minor":0,"composite_content_view_ids":[],"published_in_composite_content_view_ids":[],"content_view_id":7,"default":false,"description":null,"id":7,"name":"convert2rhel_centos7 + 1.0","created_at":"2025-12-13 23:00:04 UTC","updated_at":"2025-12-13 23:00:06 + UTC","content_view":{"id":7,"name":"convert2rhel_centos7","label":"convert2rhel_centos7","generated_for":"none"},"composite_content_views":[],"composite_content_view_versions":[],"published_in_composite_content_views":[],"content_view_environments":[{"label":"Library/convert2rhel_centos7","environment_id":4,"environment_name":"Library"}],"environments":[{"id":4,"name":"Library","label":"Library","publish_date":"less + than a minute","permissions":{"readable":true,"promotable_or_removable":true,"all_hosts_editable":true,"all_keys_editable":true},"host_count":0,"multi_env_host_count":0,"activation_key_count":0,"multi_env_ak_count":0}],"repositories":[{"id":14,"name":"Convert2RHEL7 + main","label":"Convert2RHEL7_main","content_type":"yum","library_instance_id":10,"mirroring_policy":"mirror_content_only"}],"last_event":{"user":"admin","status":"successful","description":null,"action":"publish","created_at":"2025-12-13 + 23:00:04 UTC","updated_at":"2025-12-13 23:00:06 UTC","environment":null,"task":{"id":"7b4aa579-2dae-4a35-801f-11e71d87453a","label":"Actions::Katello::ContentView::Publish","pending":false,"action":"Publish + content view ''convert2rhel_centos7''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 23:00:04 UTC","ended_at":"2025-12-13 23:00:06 UTC","state":"stopped","result":"success","progress":1.0,"input":{"content_view":{"id":7,"name":"convert2rhel_centos7","label":"convert2rhel_centos7"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":7,"content_view_id":7,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos7 + 1.0","content_view_version_id":7,"environment_id":4,"user_id":4,"skip_promotion":null,"current_request_id":"faaf39cc-d98b-4ff8-982c-a9ad04be0956","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{"content_view_id":7,"content_view_version_id":7,"skip_promotion":null,"history_id":7},"humanized":{"action":"Publish","input":[["content_view",{"text":"content + view ''convert2rhel_centos7''","link":"/content_views/7/versions"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:00:04 UTC","available_actions":{"cancellable":false,"resumable":false}},"version":"1.0","publish":true,"version_id":7,"triggered_by":null,"triggered_by_id":null},"active_history":[],"rpm_count":18,"modulemd_count":0,"erratum_count":18,"package_group_count":0,"srpm_count":0,"ansible_collection_count":0,"deb_count":0,"docker_manifest_count":0,"docker_manifest_list_count":0,"docker_tag_count":0,"file_count":0,"python_package_count":0,"module_stream_count":0,"package_count":18,"component_view_count":0,"ansible_collection_repository_count":0,"deb_repository_count":0,"docker_repository_count":0,"file_repository_count":0,"python_repository_count":0,"yum_repository_count":1,"errata_counts":{"security":2,"bugfix":3,"enhancement":13,"total":18},"permissions":{"deletable":true},"filters_applied":false} ' headers: @@ -448,11 +462,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '3265' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '3434' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -462,21 +472,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=93 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/convert2rhel-14.yml b/tests/test_playbooks/fixtures/convert2rhel-14.yml index 949468fc77..012894684e 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-14.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-14.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22convert2rhel_centos8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22convert2rhel_centos8%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_centos8\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":2,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_centos8\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '175' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '173' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,23 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -179,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Convert2RHEL8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Convert2RHEL8%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL8\"","sort":{"by":"name","order":"asc"},"results":[{"id":6,"cp_id":"139454427959","name":"Convert2RHEL8","label":"Convert2RHEL8","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{"success":1},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":"Syncing - Complete.","last_sync":"2023-11-13 09:23:43 UTC","last_sync_words":"1 minute","organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":1}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL8\"","sort":{"by":"name","order":"asc"},"results":[{"id":7,"cp_id":"600225996063","name":"Convert2RHEL8","label":"Convert2RHEL8","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{"success":1},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":"Syncing + Complete.","last_sync":"2025-12-13 22:58:20 UTC","last_sync_words":"2 minutes","organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":1}]} ' headers: @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '658' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '657' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -205,23 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -237,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/6/repositories?search=name%3D%22Convert2RHEL8+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/7/repositories?search=name%3D%22Convert2RHEL8+main%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL8 - main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"efcacfee-d580-4ee2-ba9d-6e814db96635","relative_path":"Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/cd1634f4-f76f-4748-90ca-4cda8c82524a/versions/1/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/a2ec2855-7266-4aeb-b92a-59c3ff60617e/","publication_href":"/pulp/api/v3/publications/rpm/rpm/62737c27-3499-472b-a7df-c33e756e980d/","content_counts":{"rpm":12,"erratum":12,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":10,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main","description":null,"content_view_versions":[],"filters":[],"last_sync":{"id":"a2bd6ed7-6d60-4e31-b32d-0c93503870b5","username":"admin","started_at":"2023-11-13 - 09:23:43 UTC","ended_at":"2023-11-13 09:23:50 UTC","state":"stopped","result":"success","progress":1.0},"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel8/8/x86_64/os/","arch":"noarch","os_versions":[],"content_id":"1699867408251","generic_remote_options":null,"major":null,"minor":null,"product":{"id":6,"cp_id":"139454427959","name":"Convert2RHEL8","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL8_Convert2RHEL8_main","last_sync_words":"1 - minute"}],"org_repository_count":6} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL8 + main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"84ac7715-0446-430c-9a8c-7aca2e8fffe3","relative_path":"Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main/","library_instance_id":null,"full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-613d-72a7-ae06-23dcf7e4b2e5/versions/1/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-603a-757f-af6e-e421522523c7/","publication_href":"/pulp/api/v3/publications/rpm/rpm/019b19ef-c264-77c2-aa48-554efe58c5b4/","content_counts":{"rpm":18,"erratum":18,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":11,"name":"Convert2RHEL8 + main","label":"Convert2RHEL8_main","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"content_view_versions":[],"filters":[],"last_sync":{"id":"816c6cd2-ff31-45da-b849-6736080d0d9b","username":"admin","started_at":"2025-12-13 + 22:58:20 UTC","ended_at":"2025-12-13 22:58:23 UTC","state":"stopped","result":"success","progress":1.0},"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel8/8/x86_64/os/","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666677224","generic_remote_options":null,"major":null,"minor":null,"product":{"id":7,"cp_id":"600225996063","name":"Convert2RHEL8","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL8_Convert2RHEL8_main","last_sync_words":"2 + minutes","flatpak_dependencies":false}],"org_repository_count":6} ' headers: @@ -255,11 +264,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1917' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2100' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -269,27 +274,33 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: body: '{"name": "convert2rhel_centos8", "composite": false, "repository_ids": - [10], "auto_publish": false}' + [11], "auto_publish": false}' headers: Accept: - application/json;version=2 @@ -304,13 +315,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/organizations/4/content_views + uri: https://foreman.example.org/katello/api/organizations/5/content_views response: body: - string: ' {"content_host_count":0,"composite":false,"component_ids":[],"default":false,"version_count":0,"latest_version":null,"latest_version_id":null,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":true,"filtered":false,"repository_ids":[10],"id":7,"name":"convert2rhel_centos8","label":"convert2rhel_centos8","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:24:52 UTC","updated_at":"2023-11-13 09:24:52 UTC","last_task":null,"latest_version_environments":[],"repositories":[{"id":10,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main","content_type":"yum"}],"versions":[],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":null,"environments":[],"duplicate_repositories_to_publish":[],"errors":null} + string: ' {"content_host_count":0,"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":false,"version_count":0,"latest_version":null,"latest_version_id":null,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":true,"environment_ids":[],"repository_ids":[11],"id":8,"name":"convert2rhel_centos8","label":"convert2rhel_centos8","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:12 UTC","updated_at":"2025-12-13 23:00:12 UTC","last_task":null,"latest_version_environments":[],"repositories":[{"id":11,"name":"Convert2RHEL8 + main","label":"Convert2RHEL8_main","content_type":"yum"}],"versions":[],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":null,"environments":[],"errors":null} ' headers: @@ -319,11 +330,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '968' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1005' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +338,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-15.yml b/tests/test_playbooks/fixtures/convert2rhel-15.yml index fec9454ab4..4ab3f71b7b 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-15.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-15.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,12 +127,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22convert2rhel_centos8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22convert2rhel_centos8%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_centos8\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":false,"version_count":0,"latest_version":null,"latest_version_id":null,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":true,"filtered":false,"repository_ids":[10],"id":7,"name":"convert2rhel_centos8","label":"convert2rhel_centos8","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:24:52 UTC","updated_at":"2023-11-13 09:24:52 UTC","last_task":null,"latest_version_environments":[],"repositories":[{"id":10,"name":"Convert2RHEL8 + string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_centos8\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":false,"version_count":0,"latest_version":null,"latest_version_id":null,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":true,"environment_ids":[],"repository_ids":[11],"id":8,"name":"convert2rhel_centos8","label":"convert2rhel_centos8","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:12 UTC","updated_at":"2025-12-13 23:00:12 UTC","last_task":null,"latest_version_environments":[],"repositories":[{"id":11,"name":"Convert2RHEL8 main","label":"Convert2RHEL8_main","content_type":"yum"}],"versions":[],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":null,"environments":[]}]} ' @@ -138,11 +142,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1064' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1138' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -150,23 +150,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -182,10 +188,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/content_view_versions?search=content_view_id%3D7%2Cversion%3D1.0&per_page=4294967296 + uri: https://foreman.example.org/katello/api/content_view_versions?search=content_view_id%3D8%2Cversion%3D1.0&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"content_view_id=7,version=1.0","sort":{"by":"version","order":"desc"},"results":[]} + string: '{"total":3,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"content_view_id=8,version=1.0","sort":{"by":"version","order":"desc"},"results":[]} ' headers: @@ -194,11 +200,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '179' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '177' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -208,21 +210,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -238,12 +246,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":1,"packages":1782,"module_streams":0,"errata":{"security":4,"bugfix":4,"enhancement":16,"total":24},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":6}]}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Library","label":"Library","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":1,"packages":1822,"module_streams":0,"errata":{"security":4,"bugfix":6,"enhancement":26,"total":36},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":7}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":4}]}]}]} ' headers: @@ -252,11 +260,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1044' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1166' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -264,23 +268,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -300,17 +310,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/content_views/7/publish + uri: https://foreman.example.org/katello/api/content_views/8/publish response: body: - string: ' {"id":"d2db03ba-2aac-4798-820f-291d47e10bcc","label":"Actions::Katello::ContentView::Publish","pending":true,"action":"Publish - content view ''convert2rhel_centos8''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:53 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"content_view":{"id":7,"name":"convert2rhel_centos8","label":"convert2rhel_centos8"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":7,"content_view_id":7,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos8 - 1.0","content_view_version_id":7,"environment_id":3,"user_id":4,"skip_promotion":null,"current_request_id":"af1bc64e-4615-4d83-a6b3-11a6ae8b2de5","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Publish","input":[["content_view",{"text":"content - view ''convert2rhel_centos8''","link":"/content_views/7/versions"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:53 UTC","available_actions":{"cancellable":false,"resumable":false}} + string: ' {"id":"2bebf917-5481-4c4e-80e5-4ae4472be5e3","label":"Actions::Katello::ContentView::Publish","pending":true,"action":"Publish + content view ''convert2rhel_centos8''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 23:00:15 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"content_view":{"id":8,"name":"convert2rhel_centos8","label":"convert2rhel_centos8"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":8,"content_view_id":8,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos8 + 1.0","content_view_version_id":8,"environment_id":4,"user_id":4,"skip_promotion":null,"current_request_id":"af3c715d-c313-4386-a247-d47485d64916","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Publish","input":[["content_view",{"text":"content + view ''convert2rhel_centos8''","link":"/content_views/8/versions"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:00:15 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -318,10 +328,6 @@ interactions: - no-cache Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +337,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted @@ -363,17 +375,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/d2db03ba-2aac-4798-820f-291d47e10bcc + uri: https://foreman.example.org/foreman_tasks/api/tasks/2bebf917-5481-4c4e-80e5-4ae4472be5e3 response: body: - string: '{"id":"d2db03ba-2aac-4798-820f-291d47e10bcc","label":"Actions::Katello::ContentView::Publish","pending":false,"action":"Publish - content view ''convert2rhel_centos8''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:53 UTC","ended_at":"2023-11-13 09:24:55 UTC","duration":"2.550393","state":"stopped","result":"success","progress":1.0,"input":{"content_view":{"id":7,"name":"convert2rhel_centos8","label":"convert2rhel_centos8"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":7,"content_view_id":7,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos8 - 1.0","content_view_version_id":7,"environment_id":3,"user_id":4,"skip_promotion":null,"current_request_id":"af1bc64e-4615-4d83-a6b3-11a6ae8b2de5","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{"content_view_id":7,"content_view_version_id":7,"skip_promotion":null,"history_id":7},"humanized":{"action":"Publish","input":[["content_view",{"text":"content - view ''convert2rhel_centos8''","link":"/content_views/7/versions"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:53 UTC","available_actions":{"cancellable":false,"resumable":false}}' + string: '{"id":"2bebf917-5481-4c4e-80e5-4ae4472be5e3","label":"Actions::Katello::ContentView::Publish","pending":false,"action":"Publish + content view ''convert2rhel_centos8''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 23:00:15 UTC","ended_at":"2025-12-13 23:00:17 UTC","duration":"2.423464","state":"stopped","result":"success","progress":1.0,"input":{"content_view":{"id":8,"name":"convert2rhel_centos8","label":"convert2rhel_centos8"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":8,"content_view_id":8,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos8 + 1.0","content_view_version_id":8,"environment_id":4,"user_id":4,"skip_promotion":null,"current_request_id":"af3c715d-c313-4386-a247-d47485d64916","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{"content_view_id":8,"content_view_version_id":8,"skip_promotion":null,"history_id":8},"humanized":{"action":"Publish","input":[["content_view",{"text":"content + view ''convert2rhel_centos8''","link":"/content_views/8/versions"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:00:15 UTC","available_actions":{"cancellable":false,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate @@ -381,10 +393,6 @@ interactions: - Keep-Alive Content-Length: - '1436' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -394,21 +402,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=94 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -424,22 +438,22 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/content_view_versions/7 + uri: https://foreman.example.org/katello/api/content_view_versions/8 response: body: - string: ' {"version":"1.0","major":1,"minor":0,"composite_content_view_ids":[],"published_in_composite_content_view_ids":[],"content_view_id":7,"default":false,"description":null,"id":7,"name":"convert2rhel_centos8 - 1.0","created_at":"2023-11-13 09:24:53 UTC","updated_at":"2023-11-13 09:24:55 - UTC","content_view":{"id":7,"name":"convert2rhel_centos8","label":"convert2rhel_centos8","generated_for":"none"},"composite_content_views":[],"composite_content_view_versions":[],"published_in_composite_content_views":[],"environments":[{"id":3,"name":"Library","label":"Library","publish_date":"less - than a minute","permissions":{"readable":true,"promotable_or_removable":true,"all_hosts_editable":true,"all_keys_editable":true},"host_count":0,"activation_key_count":0}],"repositories":[{"id":15,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main","content_type":"yum","library_instance_id":10,"mirroring_policy":"mirror_content_only"}],"last_event":{"user":"admin","status":"successful","description":null,"action":"publish","created_at":"2023-11-13 - 09:24:53 UTC","updated_at":"2023-11-13 09:24:55 UTC","environment":null,"task":{"id":"d2db03ba-2aac-4798-820f-291d47e10bcc","label":"Actions::Katello::ContentView::Publish","pending":false,"action":"Publish - content view ''convert2rhel_centos8''; organization ''Test Organization''","username":"admin","started_at":"2023-11-13 - 09:24:53 UTC","ended_at":"2023-11-13 09:24:55 UTC","state":"stopped","result":"success","progress":1.0,"input":{"content_view":{"id":7,"name":"convert2rhel_centos8","label":"convert2rhel_centos8"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":7,"content_view_id":7,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos8 - 1.0","content_view_version_id":7,"environment_id":3,"user_id":4,"skip_promotion":null,"current_request_id":"af1bc64e-4615-4d83-a6b3-11a6ae8b2de5","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{"content_view_id":7,"content_view_version_id":7,"skip_promotion":null,"history_id":7},"humanized":{"action":"Publish","input":[["content_view",{"text":"content - view ''convert2rhel_centos8''","link":"/content_views/7/versions"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:24:53 UTC","available_actions":{"cancellable":false,"resumable":false}},"version":"1.0","publish":true,"version_id":7,"triggered_by":null,"triggered_by_id":null},"active_history":[],"ansible_collection_count":0,"deb_count":0,"docker_manifest_count":0,"docker_manifest_list_count":0,"docker_tag_count":0,"file_count":0,"python_package_count":0,"rpm_count":12,"modulemd_count":0,"erratum_count":12,"package_group_count":0,"srpm_count":0,"module_stream_count":0,"package_count":12,"component_view_count":0,"ansible_collection_repository_count":0,"deb_repository_count":0,"docker_repository_count":0,"file_repository_count":0,"python_repository_count":0,"yum_repository_count":1,"errata_counts":{"security":2,"bugfix":2,"enhancement":8,"total":12},"permissions":{"deletable":true},"filters_applied":false} + string: ' {"version":"1.0","major":1,"minor":0,"composite_content_view_ids":[],"published_in_composite_content_view_ids":[],"content_view_id":8,"default":false,"description":null,"id":8,"name":"convert2rhel_centos8 + 1.0","created_at":"2025-12-13 23:00:15 UTC","updated_at":"2025-12-13 23:00:17 + UTC","content_view":{"id":8,"name":"convert2rhel_centos8","label":"convert2rhel_centos8","generated_for":"none"},"composite_content_views":[],"composite_content_view_versions":[],"published_in_composite_content_views":[],"content_view_environments":[{"label":"Library/convert2rhel_centos8","environment_id":4,"environment_name":"Library"}],"environments":[{"id":4,"name":"Library","label":"Library","publish_date":"less + than a minute","permissions":{"readable":true,"promotable_or_removable":true,"all_hosts_editable":true,"all_keys_editable":true},"host_count":0,"multi_env_host_count":0,"activation_key_count":0,"multi_env_ak_count":0}],"repositories":[{"id":16,"name":"Convert2RHEL8 + main","label":"Convert2RHEL8_main","content_type":"yum","library_instance_id":11,"mirroring_policy":"mirror_content_only"}],"last_event":{"user":"admin","status":"successful","description":null,"action":"publish","created_at":"2025-12-13 + 23:00:15 UTC","updated_at":"2025-12-13 23:00:17 UTC","environment":null,"task":{"id":"2bebf917-5481-4c4e-80e5-4ae4472be5e3","label":"Actions::Katello::ContentView::Publish","pending":false,"action":"Publish + content view ''convert2rhel_centos8''; organization ''Test Organization''","username":"admin","started_at":"2025-12-13 + 23:00:15 UTC","ended_at":"2025-12-13 23:00:17 UTC","state":"stopped","result":"success","progress":1.0,"input":{"content_view":{"id":8,"name":"convert2rhel_centos8","label":"convert2rhel_centos8"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3","candlepin","candlepin_auth"],"history_id":8,"content_view_id":8,"auto_publish_composite_ids":[],"content_view_version_name":"convert2rhel_centos8 + 1.0","content_view_version_id":8,"environment_id":4,"user_id":4,"skip_promotion":null,"current_request_id":"af3c715d-c313-4386-a247-d47485d64916","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{"content_view_id":8,"content_view_version_id":8,"skip_promotion":null,"history_id":8},"humanized":{"action":"Publish","input":[["content_view",{"text":"content + view ''convert2rhel_centos8''","link":"/content_views/8/versions"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 23:00:15 UTC","available_actions":{"cancellable":false,"resumable":false}},"version":"1.0","publish":true,"version_id":8,"triggered_by":null,"triggered_by_id":null},"active_history":[],"rpm_count":18,"modulemd_count":0,"erratum_count":18,"package_group_count":0,"srpm_count":0,"ansible_collection_count":0,"deb_count":0,"docker_manifest_count":0,"docker_manifest_list_count":0,"docker_tag_count":0,"file_count":0,"python_package_count":0,"module_stream_count":0,"package_count":18,"component_view_count":0,"ansible_collection_repository_count":0,"deb_repository_count":0,"docker_repository_count":0,"file_repository_count":0,"python_repository_count":0,"yum_repository_count":1,"errata_counts":{"security":2,"bugfix":3,"enhancement":13,"total":18},"permissions":{"deletable":true},"filters_applied":false} ' headers: @@ -448,11 +462,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '3266' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '3434' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -462,21 +472,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=93 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/convert2rhel-16.yml b/tests/test_playbooks/fixtures/convert2rhel-16.yml index 9363f2d2f6..67b4110b72 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-16.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-16.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,132 +127,127 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4 + uri: https://foreman.example.org/katello/api/organizations/5 response: body: - string: '{"label":"Test_Organization","redhat_repository_url":"https://cdn.redhat.com","system_purposes":{"support_type":[],"usage":[],"roles":[],"addons":[],"support_level":[]},"service_levels":[],"service_level":null,"select_all_types":[],"description":"A - test organization","created_at":"2023-11-13 09:23:21 UTC","updated_at":"2023-11-13 - 09:23:23 UTC","ancestry":null,"parent_id":null,"parent_name":null,"id":4,"name":"Test - Organization","title":"Test Organization","users":[],"smart_proxies":[{"name":"centos8-stream-katello-4-9.tanso.example.com","id":1,"url":"https://centos8-stream-katello-4-9.tanso.example.com:9090","inherited":false}],"subnets":[],"compute_resources":[],"media":[],"ptables":[{"description":null,"os_family":"Suse","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"AutoYaST entire - SCSI disk","id":125,"inherited":false},{"description":null,"os_family":"Suse","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"AutoYaST entire - virtual disk","id":126,"inherited":false},{"description":null,"os_family":"Suse","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"AutoYaST LVM","id":127,"inherited":false},{"description":null,"os_family":"Coreos","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"CoreOS default - fake","id":128,"inherited":false},{"description":null,"os_family":"Rancheros","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Empty","id":129,"inherited":false},{"description":null,"os_family":"Freebsd","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"FreeBSD default - fake","id":130,"inherited":false},{"description":null,"os_family":"Solaris","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Jumpstart default","id":131,"inherited":false},{"description":null,"os_family":"Solaris","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Jumpstart mirrored","id":132,"inherited":false},{"description":null,"os_family":"Junos","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Junos default - fake","id":133,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Kickstart custom","id":134,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Kickstart default","id":135,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Kickstart default - thin","id":136,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Kickstart dynamic","id":137,"inherited":false},{"description":null,"os_family":"NXOS","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"NX-OS default - fake","id":138,"inherited":false},{"description":null,"os_family":"Debian","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Preseed default","id":139,"inherited":false},{"description":"Preseed + string: '{"label":"Test_Organization","redhat_repository_url":"https://cdn.redhat.com","manifest_expiration_date":null,"manifest_expire_days_remaining":0,"system_purposes":{"usage":[],"roles":[],"addons":[],"support_level":[],"support_type":[]},"service_levels":[],"service_level":null,"select_all_types":[],"description":"A + test organization","created_at":"2025-12-13 22:57:39 UTC","updated_at":"2025-12-13 + 22:57:43 UTC","ancestry":null,"parent_id":null,"parent_name":null,"id":5,"name":"Test + Organization","title":"Test Organization","users":[],"smart_proxies":[{"name":"foreman.example.org","id":1,"url":"https://foreman.example.org:9090","inherited":false}],"subnets":[],"compute_resources":[],"media":[],"ptables":[{"description":null,"os_family":"Suse","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"AutoYaST entire + SCSI disk","id":124,"inherited":false},{"description":null,"os_family":"Suse","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"AutoYaST entire + virtual disk","id":125,"inherited":false},{"description":null,"os_family":"Suse","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"AutoYaST LVM","id":126,"inherited":false},{"description":null,"os_family":"Coreos","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"CoreOS default + fake","id":127,"inherited":false},{"description":null,"os_family":"Rancheros","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Empty","id":128,"inherited":false},{"description":null,"os_family":"Freebsd","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"FreeBSD default + fake","id":129,"inherited":false},{"description":null,"os_family":"Solaris","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Jumpstart default","id":130,"inherited":false},{"description":null,"os_family":"Solaris","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Jumpstart mirrored","id":131,"inherited":false},{"description":null,"os_family":"Junos","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Junos default + fake","id":132,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Kickstart custom","id":133,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Kickstart default","id":134,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Kickstart default + encrypted","id":135,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Kickstart default + thin","id":136,"inherited":false},{"description":null,"os_family":"Redhat","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Kickstart dynamic","id":137,"inherited":false},{"description":null,"os_family":"NXOS","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"NX-OS default + fake","id":138,"inherited":false},{"description":null,"os_family":"Debian","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Preseed default","id":139,"inherited":false},{"description":"Preseed Autoinstall default storage snippet configures drives automatically\nwith - LVM. The snippet is automatically indented by 2 spaces. For reference:\nhttps://ubuntu.com/server/docs/install/autoinstall-reference","os_family":"Debian","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Preseed default - autoinstall","id":140,"inherited":false},{"description":null,"os_family":"Debian","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Preseed default - LVM","id":141,"inherited":false},{"description":null,"os_family":"Windows","created_at":"2023-10-26 - 09:22:57 UTC","updated_at":"2023-10-26 09:22:57 UTC","name":"Windows default - GPT EFI partition table","id":143,"inherited":false},{"description":null,"os_family":"Windows","created_at":"2023-10-26 - 09:22:56 UTC","updated_at":"2023-10-26 09:22:56 UTC","name":"Windows default - partition table","id":142,"inherited":false},{"description":null,"os_family":"Xenserver","created_at":"2023-10-26 - 09:22:57 UTC","updated_at":"2023-10-26 09:22:57 UTC","name":"XenServer default","id":144,"inherited":false}],"provisioning_templates":[{"id":50,"name":"Alterator - default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":32,"name":"Alterator - default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":13,"name":"Alterator - default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":68,"name":"alterator_pkglist","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":70,"name":"ansible_provisioning_callback","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":72,"name":"ansible_tower_callback_script","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":74,"name":"ansible_tower_callback_service","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":51,"name":"Atomic - Kickstart default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":52,"name":"AutoYaST - default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":41,"name":"AutoYaST - default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":2,"name":"AutoYaST - default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":7,"name":"AutoYaST - default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":14,"name":"AutoYaST - default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":119,"name":"AutoYaST - default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":53,"name":"AutoYaST - SLES default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":76,"name":"blacklist_kernel_modules","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":77,"name":"bmc_nic_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":78,"name":"built","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":79,"name":"chef_client","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":31,"name":"CloudInit - default","template_kind_id":12,"template_kind_name":"cloud-init","inherited":false},{"id":80,"name":"coreos_cloudconfig","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":54,"name":"CoreOS - provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":15,"name":"CoreOS - PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":81,"name":"create_users","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":82,"name":"csr_attributes.yaml","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":83,"name":"efibootmgr_netboot","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":84,"name":"eject_cdrom","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":85,"name":"epel","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":86,"name":"fips_packages","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":87,"name":"fix_hosts","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":33,"name":"FreeBSD - (mfsBSD) finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":55,"name":"FreeBSD - (mfsBSD) provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":16,"name":"FreeBSD - (mfsBSD) PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":88,"name":"freeipa_register","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":64,"name":"Global - Registration","template_kind_id":13,"template_kind_name":"registration","inherited":false},{"id":66,"name":"Grubby - default","template_kind_id":8,"template_kind_name":"script","inherited":false},{"id":89,"name":"http_proxy","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":90,"name":"insights","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":42,"name":"iPXE - default local boot","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":43,"name":"iPXE - global default","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":44,"name":"iPXE - intermediate script","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":56,"name":"Jumpstart - default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":34,"name":"Jumpstart - default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":3,"name":"Jumpstart - default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":35,"name":"Junos - default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":57,"name":"Junos - default SLAX","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":30,"name":"Junos - default ZTP config","template_kind_id":10,"template_kind_name":"ZTP","inherited":false},{"id":58,"name":"Kickstart - default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":36,"name":"Kickstart - default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":45,"name":"Kickstart - default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":4,"name":"Kickstart - default PXEGrub","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":8,"name":"Kickstart - default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":17,"name":"Kickstart - default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":120,"name":"Kickstart - default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":94,"name":"kickstart_ifcfg_bonded_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":92,"name":"kickstart_ifcfg_bond_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":96,"name":"kickstart_ifcfg_generic_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":98,"name":"kickstart_ifcfg_get_identifier_names","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":100,"name":"kickstart_kernel_options","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":101,"name":"kickstart_networking_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":59,"name":"Kickstart - oVirt-RHVH","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":18,"name":"Kickstart - oVirt-RHVH PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":102,"name":"kickstart_rhsm","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":40,"name":"Linux - host_init_config default","template_kind_id":1,"template_kind_name":"host_init_config","inherited":false},{"id":103,"name":"ntp","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":1,"name":"NX-OS - default POAP setup","template_kind_id":11,"template_kind_name":"POAP","inherited":false},{"id":104,"name":"pkg_manager","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":121,"name":"Preseed - Autoinstall cloud-init user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":60,"name":"Preseed - default","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":37,"name":"Preseed - default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":46,"name":"Preseed - default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":47,"name":"Preseed - default iPXE Autoinstall","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":9,"name":"Preseed - default PXEGrub2","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":10,"name":"Preseed - default PXEGrub2 Autoinstall","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":19,"name":"Preseed - default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":20,"name":"Preseed - default PXELinux Autoinstall","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":122,"name":"Preseed - default user data","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":105,"name":"preseed_kernel_options","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":107,"name":"preseed_kernel_options_autoinstall","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":109,"name":"preseed_netplan_generic_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":110,"name":"preseed_netplan_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":111,"name":"preseed_networking_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":112,"name":"puppet.conf","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":114,"name":"puppetlabs_repo","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":113,"name":"puppet_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":115,"name":"pxegrub2_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":11,"name":"PXEGrub2 - default local boot","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":116,"name":"pxegrub2_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":12,"name":"PXEGrub2 - global default","template_kind_id":4,"template_kind_name":"PXEGrub2","inherited":false},{"id":117,"name":"pxegrub2_mac","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":118,"name":"pxegrub_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":5,"name":"PXEGrub - default local boot","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":93,"name":"pxegrub_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":6,"name":"PXEGrub - global default","template_kind_id":3,"template_kind_name":"PXEGrub","inherited":false},{"id":21,"name":"PXELinux - chain iPXE","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":22,"name":"PXELinux - chain iPXE UNDI","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":95,"name":"pxelinux_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":23,"name":"PXELinux - default local boot","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":24,"name":"PXELinux - default memdisk","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":97,"name":"pxelinux_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":25,"name":"PXELinux - global default","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":106,"name":"rancheros_cloudconfig","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":61,"name":"RancherOS - provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":26,"name":"RancherOS - PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":108,"name":"redhat_register","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":65,"name":"remote_execution_pull_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":69,"name":"remote_execution_ssh_keys","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":71,"name":"saltstack_minion","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":75,"name":"saltstack_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":73,"name":"schedule_reboot","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":123,"name":"UserData - default","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":124,"name":"UserData - open-vm-tools","template_kind_id":9,"template_kind_name":"user_data","inherited":false},{"id":27,"name":"WAIK - default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":38,"name":"Windows - default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":48,"name":"Windows - default iPXE","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":49,"name":"Windows - default iPXE httpboot","template_kind_id":5,"template_kind_name":"iPXE","inherited":false},{"id":62,"name":"Windows - default provision","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":28,"name":"Windows - default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":91,"name":"Windows - network","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":67,"name":"Windows - peSetup.cmd","template_kind_id":8,"template_kind_name":"script","inherited":false},{"id":63,"name":"XenServer - default answerfile","template_kind_id":6,"template_kind_name":"provision","inherited":false},{"id":39,"name":"XenServer - default finish","template_kind_id":7,"template_kind_name":"finish","inherited":false},{"id":29,"name":"XenServer - default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":99,"name":"yum_proxy","template_kind_id":null,"template_kind_name":null,"inherited":false}],"domains":[],"realms":[],"hostgroups":[],"locations":[{"id":2,"name":"Default + LVM. The snippet is automatically indented by 2 spaces. For reference:\nhttps://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html","os_family":"Debian","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Preseed default + autoinstall","id":140,"inherited":false},{"description":"Preseed Autoinstall + default storage snippet configures drives automatically\nwith LVM and disk + encryption.\nRequires Ubuntu >= 22.04.3.\nThe snippet is automatically indented + by 2 spaces. For reference:\nhttps://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html","os_family":"Debian","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Preseed default + autoinstall encrypted","id":141,"inherited":false},{"description":null,"os_family":"Debian","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Preseed default + LVM","id":142,"inherited":false},{"description":null,"os_family":"Windows","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Windows default + GPT EFI partition table","id":144,"inherited":false},{"description":null,"os_family":"Windows","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"Windows default + partition table","id":143,"inherited":false},{"description":null,"os_family":"Xenserver","created_at":"2025-12-12 + 22:42:27 UTC","updated_at":"2025-12-12 22:42:27 UTC","name":"XenServer default","id":145,"inherited":false}],"provisioning_templates":[{"id":44,"name":"Alterator + default","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":26,"name":"Alterator + default finish","template_kind_id":6,"template_kind_name":"finish","inherited":false},{"id":8,"name":"Alterator + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":62,"name":"alterator_pkglist","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":63,"name":"ansible_provisioning_callback","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":64,"name":"ansible_tower_callback_script","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":65,"name":"ansible_tower_callback_service","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":45,"name":"AutoYaST + default","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":35,"name":"AutoYaST + default iPXE","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":2,"name":"AutoYaST + default PXEGrub2","template_kind_id":3,"template_kind_name":"PXEGrub2","inherited":false},{"id":9,"name":"AutoYaST + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":117,"name":"AutoYaST + default user data","template_kind_id":8,"template_kind_name":"user_data","inherited":false},{"id":46,"name":"AutoYaST + SLES default","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":66,"name":"blacklist_kernel_modules","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":67,"name":"bmc_nic_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":68,"name":"built","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":69,"name":"ca_registration","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":70,"name":"chef_client","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":25,"name":"CloudInit + default","template_kind_id":11,"template_kind_name":"cloud-init","inherited":false},{"id":71,"name":"container_certs_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":72,"name":"coreos_cloudconfig","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":47,"name":"CoreOS + provision","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":10,"name":"CoreOS + PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":73,"name":"create_users","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":74,"name":"csr_attributes.yaml","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":75,"name":"disk_enc_clevis_tang","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":76,"name":"efibootmgr_netboot","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":77,"name":"eject_cdrom","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":78,"name":"epel","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":79,"name":"fips_packages","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":80,"name":"fix_hosts","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":56,"name":"foreman_ca_refresh","template_kind_id":15,"template_kind_name":"public","inherited":false},{"id":57,"name":"foreman_raw_ca","template_kind_id":15,"template_kind_name":"public","inherited":false},{"id":27,"name":"FreeBSD + (mfsBSD) finish","template_kind_id":6,"template_kind_name":"finish","inherited":false},{"id":48,"name":"FreeBSD + (mfsBSD) provision","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":11,"name":"FreeBSD + (mfsBSD) PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":81,"name":"freeipa_register","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":58,"name":"Global + Registration","template_kind_id":12,"template_kind_name":"registration","inherited":false},{"id":60,"name":"Grubby + default","template_kind_id":7,"template_kind_name":"script","inherited":false},{"id":82,"name":"http_proxy","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":83,"name":"insights","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":36,"name":"iPXE + default local boot","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":37,"name":"iPXE + global default","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":38,"name":"iPXE + intermediate script","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":49,"name":"Jumpstart + default","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":28,"name":"Jumpstart + default finish","template_kind_id":6,"template_kind_name":"finish","inherited":false},{"id":29,"name":"Junos + default finish","template_kind_id":6,"template_kind_name":"finish","inherited":false},{"id":50,"name":"Junos + default SLAX","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":24,"name":"Junos + default ZTP config","template_kind_id":9,"template_kind_name":"ZTP","inherited":false},{"id":51,"name":"Kickstart + default","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":30,"name":"Kickstart + default finish","template_kind_id":6,"template_kind_name":"finish","inherited":false},{"id":39,"name":"Kickstart + default iPXE","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":3,"name":"Kickstart + default PXEGrub2","template_kind_id":3,"template_kind_name":"PXEGrub2","inherited":false},{"id":12,"name":"Kickstart + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":118,"name":"Kickstart + default user data","template_kind_id":8,"template_kind_name":"user_data","inherited":false},{"id":85,"name":"kickstart_ifcfg_bonded_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":84,"name":"kickstart_ifcfg_bond_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":86,"name":"kickstart_ifcfg_generic_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":87,"name":"kickstart_ifcfg_get_identifier_names","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":88,"name":"kickstart_kernel_options","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":90,"name":"kickstart_networking_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":89,"name":"kickstart_network_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":91,"name":"kickstart_rhsm","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":34,"name":"Linux + host_init_config default","template_kind_id":1,"template_kind_name":"host_init_config","inherited":false},{"id":92,"name":"ntp","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":1,"name":"NX-OS + default POAP setup","template_kind_id":10,"template_kind_name":"POAP","inherited":false},{"id":93,"name":"pkg_manager","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":94,"name":"preseed_autoinstall_clevis_tang_wrapper","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":119,"name":"Preseed + Autoinstall cloud-init user data","template_kind_id":8,"template_kind_name":"user_data","inherited":false},{"id":52,"name":"Preseed + default","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":31,"name":"Preseed + default finish","template_kind_id":6,"template_kind_name":"finish","inherited":false},{"id":40,"name":"Preseed + default iPXE","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":41,"name":"Preseed + default iPXE Autoinstall","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":4,"name":"Preseed + default PXEGrub2","template_kind_id":3,"template_kind_name":"PXEGrub2","inherited":false},{"id":5,"name":"Preseed + default PXEGrub2 Autoinstall","template_kind_id":3,"template_kind_name":"PXEGrub2","inherited":false},{"id":13,"name":"Preseed + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":14,"name":"Preseed + default PXELinux Autoinstall","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":120,"name":"Preseed + default user data","template_kind_id":8,"template_kind_name":"user_data","inherited":false},{"id":95,"name":"preseed_kernel_options","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":96,"name":"preseed_kernel_options_autoinstall","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":97,"name":"preseed_netplan_generic_interface","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":98,"name":"preseed_netplan_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":99,"name":"preseed_networking_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":100,"name":"puppet.conf","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":102,"name":"puppetlabs_repo","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":101,"name":"puppet_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":103,"name":"pxegrub2_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":6,"name":"PXEGrub2 + default local boot","template_kind_id":3,"template_kind_name":"PXEGrub2","inherited":false},{"id":104,"name":"pxegrub2_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":7,"name":"PXEGrub2 + global default","template_kind_id":3,"template_kind_name":"PXEGrub2","inherited":false},{"id":105,"name":"pxegrub2_mac","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":15,"name":"PXELinux + chain iPXE","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":16,"name":"PXELinux + chain iPXE UNDI","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":106,"name":"pxelinux_chainload","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":17,"name":"PXELinux + default local boot","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":18,"name":"PXELinux + default memdisk","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":107,"name":"pxelinux_discovery","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":19,"name":"PXELinux + global default","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":108,"name":"rancheros_cloudconfig","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":53,"name":"RancherOS + provision","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":20,"name":"RancherOS + PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":109,"name":"redhat_register","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":59,"name":"remote_execution_pull_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":110,"name":"remote_execution_ssh_keys","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":111,"name":"saltstack_minion","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":112,"name":"saltstack_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":113,"name":"schedule_reboot","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":114,"name":"subscription_manager_setup","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":121,"name":"UserData + default","template_kind_id":8,"template_kind_name":"user_data","inherited":false},{"id":122,"name":"UserData + open-vm-tools","template_kind_id":8,"template_kind_name":"user_data","inherited":false},{"id":21,"name":"WAIK + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":32,"name":"Windows + default finish","template_kind_id":6,"template_kind_name":"finish","inherited":false},{"id":42,"name":"Windows + default iPXE","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":43,"name":"Windows + default iPXE httpboot","template_kind_id":4,"template_kind_name":"iPXE","inherited":false},{"id":54,"name":"Windows + default provision","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":22,"name":"Windows + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":123,"name":"Windows + default user data","template_kind_id":8,"template_kind_name":"user_data","inherited":false},{"id":115,"name":"windows_network","template_kind_id":null,"template_kind_name":null,"inherited":false},{"id":61,"name":"Windows + peSetup.cmd","template_kind_id":7,"template_kind_name":"script","inherited":false},{"id":55,"name":"XenServer + default answerfile","template_kind_id":5,"template_kind_name":"provision","inherited":false},{"id":33,"name":"XenServer + default finish","template_kind_id":6,"template_kind_name":"finish","inherited":false},{"id":23,"name":"XenServer + default PXELinux","template_kind_id":2,"template_kind_name":"PXELinux","inherited":false},{"id":116,"name":"yum_proxy","template_kind_id":null,"template_kind_name":null,"inherited":false}],"domains":[],"realms":[],"hostgroups":[],"locations":[{"id":2,"name":"Default Location","title":"Default Location","description":null}],"hosts_count":0,"parameters":[],"deprecations":{"environments":"Environments - got deprecated from this endpoint."},"simple_content_access":true,"owner_details":{"id":"4028fa468bc7e353018bc7fe1f8b0029","key":"Test_Organization","created":"2023-11-13T09:23:22+0000","updated":"2023-11-13T09:24:55+0000","lastRefreshed":null,"virt_who":false,"upstreamConsumer":null},"cdn_configuration":{"url":"https://cdn.redhat.com","username":null,"upstream_organization_label":null,"ssl_ca_credential_id":null,"upstream_content_view_label":null,"upstream_lifecycle_environment_label":null,"type":"redhat_cdn","password_exists":false},"default_content_view_id":5,"composite_content_views_count":null,"content_view_components_count":null,"library_id":3}' + got deprecated from this endpoint."},"manifest_expiring_soon":false,"manifest_expired":false,"simple_content_access":true,"owner_details":{"id":"8a8028b49b14ba72019b19ef221c005a","key":"Test_Organization","created":"2025-12-13T22:57:40+0000","updated":"2025-12-13T22:58:10+0000","lastRefreshed":null,"virt_who":false,"upstreamConsumer":null},"cdn_configuration":{"url":"https://cdn.redhat.com","username":null,"upstream_organization_label":null,"ssl_ca_credential_id":null,"upstream_content_view_label":null,"upstream_lifecycle_environment_label":null,"type":"redhat_cdn","password_exists":false},"default_content_view_id":6,"composite_content_views_count":null,"rolling_content_views_count":null,"content_view_components_count":null,"library_id":4}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '19082' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '19833' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -258,21 +257,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/convert2rhel-17.yml b/tests/test_playbooks/fixtures/convert2rhel-17.yml index fa958350cc..51608b83ac 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-17.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-17.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22convert2rhel_centos7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/activation_keys?search=name%3D%22convert2rhel_centos7%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_centos7\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_centos7\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '175' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '173' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,23 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -179,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1782,"module_streams":0,"errata":{"security":4,"bugfix":4,"enhancement":16,"total":24},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":6},{"name":"convert2rhel_centos8","id":7}]}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Library","label":"Library","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1822,"module_streams":0,"errata":{"security":4,"bugfix":6,"enhancement":26,"total":36},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":7},{"name":"convert2rhel_centos8","id":8}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":4}]}]}]} ' headers: @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1083' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1205' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -205,23 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -237,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22convert2rhel_centos7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22convert2rhel_centos7%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_centos7\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":false,"version_count":1,"latest_version":"1.0","latest_version_id":6,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":false,"filtered":false,"repository_ids":[9],"id":6,"name":"convert2rhel_centos7","label":"convert2rhel_centos7","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:24:46 UTC","updated_at":"2023-11-13 09:24:47 UTC","last_task":{"id":"cde4e2e9-d82a-4eb4-95d5-736bb355f4d7","started_at":"2023-11-13 - 09:24:47 UTC","result":"success","last_sync_words":"less than a minute"},"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[{"id":9,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main","content_type":"yum"}],"versions":[{"id":6,"version":"1.0","published":"2023-11-13 - 09:24:47 UTC","environment_ids":[3],"filters_applied":false}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"2.0","last_published":"2023-11-13 - 09:24:47 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_centos7\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":false,"version_count":1,"latest_version":"1.0","latest_version_id":7,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[4],"repository_ids":[10],"id":7,"name":"convert2rhel_centos7","label":"convert2rhel_centos7","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:00 UTC","updated_at":"2025-12-13 23:00:04 UTC","last_task":{"id":"7b4aa579-2dae-4a35-801f-11e71d87453a","started_at":"2025-12-13 + 23:00:04 UTC","result":"success","last_sync_words":"less than a minute"},"latest_version_environments":[{"id":4,"name":"Library","label":"Library"}],"repositories":[{"id":10,"name":"Convert2RHEL7 + main","label":"Convert2RHEL7_main","content_type":"yum"}],"versions":[{"id":7,"version":"1.0","published":"2025-12-13 + 23:00:04 UTC","description":null,"environment_ids":[4],"filters_applied":false,"published_at_words":"less + than a minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"2.0","last_published":"2025-12-13 + 23:00:04 UTC","environments":[{"id":4,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -255,11 +264,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1478' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1616' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -267,29 +272,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "convert2rhel_centos7", "environment_id": - 3, "content_view_id": 6}' + body: '{"name": "convert2rhel_centos7", "organization_id": 5, "content_view_id": + 7, "environment_id": 4}' headers: Accept: - application/json;version=2 @@ -307,9 +318,9 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":7,"name":"convert2rhel_centos7","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":6,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:24:59 UTC","updated_at":"2023-11-13 09:24:59 UTC","content_view":{"id":6,"name":"convert2rhel_centos7"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":16,"name":"convert2rhel_centos7","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library/convert2rhel_centos7","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:26 UTC","updated_at":"2025-12-13 23:00:26 UTC","content_view_environments":[{"content_view":{"id":7,"name":"convert2rhel_centos7","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":7,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":7},"lifecycle_environment":{"id":4,"name":"Library","lifecycle_environment_library":true},"label":"Library/convert2rhel_centos7"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":7,"content_view":{"id":7,"name":"convert2rhel_centos7"},"environment_id":4,"environment":{"id":4,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -318,11 +329,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '724' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1189' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -330,23 +337,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-18.yml b/tests/test_playbooks/fixtures/convert2rhel-18.yml index e6862727d6..1704685075 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-18.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-18.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22convert2rhel_centos8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/activation_keys?search=name%3D%22convert2rhel_centos8%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_centos8\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_centos8\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '175' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '173' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,23 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -179,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1782,"module_streams":0,"errata":{"security":4,"bugfix":4,"enhancement":16,"total":24},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":6},{"name":"convert2rhel_centos8","id":7}]}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Library","label":"Library","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1822,"module_streams":0,"errata":{"security":4,"bugfix":6,"enhancement":26,"total":36},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":7},{"name":"convert2rhel_centos8","id":8}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":4}]}]}]} ' headers: @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1083' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1205' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -205,23 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -237,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22convert2rhel_centos8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22convert2rhel_centos8%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_centos8\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":false,"version_count":1,"latest_version":"1.0","latest_version_id":7,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":false,"filtered":false,"repository_ids":[10],"id":7,"name":"convert2rhel_centos8","label":"convert2rhel_centos8","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:24:52 UTC","updated_at":"2023-11-13 09:24:53 UTC","last_task":{"id":"d2db03ba-2aac-4798-820f-291d47e10bcc","started_at":"2023-11-13 - 09:24:53 UTC","result":"success","last_sync_words":"less than a minute"},"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[{"id":10,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main","content_type":"yum"}],"versions":[{"id":7,"version":"1.0","published":"2023-11-13 - 09:24:53 UTC","environment_ids":[3],"filters_applied":false}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"2.0","last_published":"2023-11-13 - 09:24:53 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_centos8\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":false,"version_count":1,"latest_version":"1.0","latest_version_id":8,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[4],"repository_ids":[11],"id":8,"name":"convert2rhel_centos8","label":"convert2rhel_centos8","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:12 UTC","updated_at":"2025-12-13 23:00:15 UTC","last_task":{"id":"2bebf917-5481-4c4e-80e5-4ae4472be5e3","started_at":"2025-12-13 + 23:00:15 UTC","result":"success","last_sync_words":"less than a minute"},"latest_version_environments":[{"id":4,"name":"Library","label":"Library"}],"repositories":[{"id":11,"name":"Convert2RHEL8 + main","label":"Convert2RHEL8_main","content_type":"yum"}],"versions":[{"id":8,"version":"1.0","published":"2025-12-13 + 23:00:15 UTC","description":null,"environment_ids":[4],"filters_applied":false,"published_at_words":"less + than a minute"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"2.0","last_published":"2025-12-13 + 23:00:15 UTC","environments":[{"id":4,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -255,11 +264,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1480' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1616' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -267,29 +272,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "convert2rhel_centos8", "environment_id": - 3, "content_view_id": 7}' + body: '{"name": "convert2rhel_centos8", "organization_id": 5, "content_view_id": + 8, "environment_id": 4}' headers: Accept: - application/json;version=2 @@ -307,9 +318,9 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":8,"name":"convert2rhel_centos8","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":7,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:24:59 UTC","updated_at":"2023-11-13 09:25:00 UTC","content_view":{"id":7,"name":"convert2rhel_centos8"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":17,"name":"convert2rhel_centos8","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library/convert2rhel_centos8","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:29 UTC","updated_at":"2025-12-13 23:00:29 UTC","content_view_environments":[{"content_view":{"id":8,"name":"convert2rhel_centos8","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":8,"content_view_version_latest":true,"content_view_default":false,"content_view_environment_id":8},"lifecycle_environment":{"id":4,"name":"Library","lifecycle_environment_library":true},"label":"Library/convert2rhel_centos8"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":8,"content_view":{"id":8,"name":"convert2rhel_centos8"},"environment_id":4,"environment":{"id":4,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -318,11 +329,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '724' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1189' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -330,23 +337,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-19.yml b/tests/test_playbooks/fixtures/convert2rhel-19.yml index 9e23789616..91705c38a5 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-19.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-19.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22convert2rhel_oracle7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/activation_keys?search=name%3D%22convert2rhel_oracle7%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_oracle7\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":2,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_oracle7\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '175' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '173' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,23 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -179,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1782,"module_streams":0,"errata":{"security":4,"bugfix":4,"enhancement":16,"total":24},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":6},{"name":"convert2rhel_centos8","id":7}]}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Library","label":"Library","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1822,"module_streams":0,"errata":{"security":4,"bugfix":6,"enhancement":26,"total":36},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":7},{"name":"convert2rhel_centos8","id":8}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":4}]}]}]} ' headers: @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1083' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1205' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -205,23 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -237,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":5,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":null,"filtered":false,"repository_ids":[],"id":5,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","last_task":null,"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":5,"version":"1.0","published":"2023-11-13 - 09:23:22 UTC","environment_ids":[3],"filters_applied":null}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2023-11-13 - 09:23:22 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":6,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[4],"repository_ids":[],"id":6,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","last_task":null,"latest_version_environments":[{"id":4,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":6,"version":"1.0","published":"2025-12-13 + 22:57:40 UTC","description":null,"environment_ids":[4],"filters_applied":null,"published_at_words":"3 + minutes"}],"components":[],"content_view_components":[],"activation_keys":[],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 22:57:40 UTC","environments":[{"id":4,"label":"Library","name":"Library","activation_keys":[],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -255,11 +264,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1265' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1393' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -267,29 +272,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "convert2rhel_oracle7", "environment_id": - 3, "content_view_id": 5}' + body: '{"name": "convert2rhel_oracle7", "organization_id": 5, "content_view_id": + 6, "environment_id": 4}' headers: Accept: - application/json;version=2 @@ -307,10 +318,11 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":9,"name":"convert2rhel_oracle7","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":5,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:25:00 UTC","updated_at":"2023-11-13 09:25:01 UTC","content_view":{"id":5,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":18,"name":"convert2rhel_oracle7","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:33 UTC","updated_at":"2025-12-13 23:00:33 UTC","content_view_environments":[{"content_view":{"id":6,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":6,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":6},"lifecycle_environment":{"id":4,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":6,"content_view":{"id":6,"name":"Default + Organization View"},"environment_id":4,"environment":{"id":4,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -319,11 +331,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1156' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +339,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-2.yml b/tests/test_playbooks/fixtures/convert2rhel-2.yml index c4eed6bb62..a7da9b7c1b 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-2.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-2.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Convert2RHEL8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Convert2RHEL8%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL8\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":1,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL8\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '168' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '166' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,28 +147,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Convert2RHEL8"}' + body: '{"organization_id": 5, "name": "Convert2RHEL8"}' headers: Accept: - application/json;version=2 @@ -186,9 +192,9 @@ interactions: uri: https://foreman.example.org/katello/api/products response: body: - string: ' {"sync_state_aggregated":null,"redhat":false,"id":6,"cp_id":"139454427959","name":"Convert2RHEL8","label":"Convert2RHEL8","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":0,"created_at":"2023-11-13 - 09:23:26 UTC","updated_at":"2023-11-13 09:23:26 UTC","product_content":[],"available_content":[],"repositories":[],"provider":{"name":"Anonymous"},"sync_status":{"id":null,"product_id":null,"progress":null,"sync_id":null,"state":null,"raw_state":null,"start_time":null,"finish_time":null,"duration":null,"display_size":null,"size":null,"is_running":null,"error_details":null},"permissions":{"view_products":true,"edit_products":true,"destroy_products":true,"sync_products":true},"published_content_view_ids":[],"has_last_affected_repo_in_filter":false,"active_task_count":0} + string: ' {"sync_state_aggregated":null,"redhat":false,"id":7,"cp_id":"600225996063","name":"Convert2RHEL8","label":"Convert2RHEL8","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":0,"created_at":"2025-12-13 + 22:57:53 UTC","updated_at":"2025-12-13 22:57:53 UTC","product_content":[],"available_content":[],"repositories":[],"provider":{"name":"Anonymous"},"sync_status":{"id":null,"product_id":null,"progress":null,"sync_id":null,"state":null,"raw_state":null,"start_time":null,"finish_time":null,"duration":null,"display_size":null,"size":null,"is_running":null,"error_details":null},"permissions":{"view_products":true,"edit_products":true,"destroy_products":true,"sync_products":true},"published_content_view_ids":[],"has_last_affected_repo_in_filter":false,"active_task_count":0} ' headers: @@ -198,10 +204,6 @@ interactions: - Keep-Alive Content-Length: - '1083' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -209,23 +211,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-20.yml b/tests/test_playbooks/fixtures/convert2rhel-20.yml index acbc258b5c..6e98beb09e 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-20.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-20.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22convert2rhel_oracle8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/activation_keys?search=name%3D%22convert2rhel_oracle8%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_oracle8\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":3,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_oracle8\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '175' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '173' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,23 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -179,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1782,"module_streams":0,"errata":{"security":4,"bugfix":4,"enhancement":16,"total":24},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":6},{"name":"convert2rhel_centos8","id":7}]}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Library","label":"Library","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1822,"module_streams":0,"errata":{"security":4,"bugfix":6,"enhancement":26,"total":36},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":7},{"name":"convert2rhel_centos8","id":8}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":4}]}]}]} ' headers: @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1083' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1205' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -205,23 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -237,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":5,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":null,"filtered":false,"repository_ids":[],"id":5,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","last_task":null,"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":5,"version":"1.0","published":"2023-11-13 - 09:23:22 UTC","environment_ids":[3],"filters_applied":null}],"components":[],"content_view_components":[],"activation_keys":[{"id":9,"name":"convert2rhel_oracle7"}],"hosts":[],"next_version":"1.0","last_published":"2023-11-13 - 09:23:22 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[9],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":6,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[4],"repository_ids":[],"id":6,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","last_task":null,"latest_version_environments":[{"id":4,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":6,"version":"1.0","published":"2025-12-13 + 22:57:40 UTC","description":null,"environment_ids":[4],"filters_applied":null,"published_at_words":"3 + minutes"}],"components":[],"content_view_components":[],"activation_keys":[{"id":18,"name":"convert2rhel_oracle7"}],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 22:57:40 UTC","environments":[{"id":4,"label":"Library","name":"Library","activation_keys":[18],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -255,11 +264,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1304' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1434' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -267,29 +272,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "convert2rhel_oracle8", "environment_id": - 3, "content_view_id": 5}' + body: '{"name": "convert2rhel_oracle8", "organization_id": 5, "content_view_id": + 6, "environment_id": 4}' headers: Accept: - application/json;version=2 @@ -307,10 +318,11 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":10,"name":"convert2rhel_oracle8","description":null,"unlimited_hosts":true,"auto_attach":true,"content_view_id":5,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:25:01 UTC","updated_at":"2023-11-13 09:25:01 UTC","content_view":{"id":5,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":19,"name":"convert2rhel_oracle8","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:36 UTC","updated_at":"2025-12-13 23:00:36 UTC","content_view_environments":[{"content_view":{"id":6,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":6,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":6},"lifecycle_environment":{"id":4,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":6,"content_view":{"id":6,"name":"Default + Organization View"},"environment_id":4,"environment":{"id":4,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -319,11 +331,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '730' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1156' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +339,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-21.yml b/tests/test_playbooks/fixtures/convert2rhel-21.yml index 1b0ed22339..cb953b722a 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-21.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-21.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22convert2rhel_rhel7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/activation_keys?search=name%3D%22convert2rhel_rhel7%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_rhel7\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":4,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_rhel7\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '173' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '171' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,23 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -179,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1782,"module_streams":0,"errata":{"security":4,"bugfix":4,"enhancement":16,"total":24},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":6},{"name":"convert2rhel_centos8","id":7}]}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Library","label":"Library","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1822,"module_streams":0,"errata":{"security":4,"bugfix":6,"enhancement":26,"total":36},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":7},{"name":"convert2rhel_centos8","id":8}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":4}]}]}]} ' headers: @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1083' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1205' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -205,23 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -237,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":5,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":null,"filtered":false,"repository_ids":[],"id":5,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","last_task":null,"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":5,"version":"1.0","published":"2023-11-13 - 09:23:22 UTC","environment_ids":[3],"filters_applied":null}],"components":[],"content_view_components":[],"activation_keys":[{"id":9,"name":"convert2rhel_oracle7"},{"id":10,"name":"convert2rhel_oracle8"}],"hosts":[],"next_version":"1.0","last_published":"2023-11-13 - 09:23:22 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[9,10],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":6,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[4],"repository_ids":[],"id":6,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","last_task":null,"latest_version_environments":[{"id":4,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":6,"version":"1.0","published":"2025-12-13 + 22:57:40 UTC","description":null,"environment_ids":[4],"filters_applied":null,"published_at_words":"3 + minutes"}],"components":[],"content_view_components":[],"activation_keys":[{"id":18,"name":"convert2rhel_oracle7"},{"id":19,"name":"convert2rhel_oracle8"}],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 22:57:40 UTC","environments":[{"id":4,"label":"Library","name":"Library","activation_keys":[18,19],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -255,11 +264,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1347' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1477' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -267,29 +272,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "convert2rhel_rhel7", "environment_id": - 3, "content_view_id": 5, "auto_attach": false}' + body: '{"name": "convert2rhel_rhel7", "organization_id": 5, "content_view_id": + 6, "environment_id": 4}' headers: Accept: - application/json;version=2 @@ -298,7 +309,7 @@ interactions: Connection: - keep-alive Content-Length: - - '117' + - '95' Content-Type: - application/json User-Agent: @@ -307,10 +318,11 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":11,"name":"convert2rhel_rhel7","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_id":5,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:25:02 UTC","updated_at":"2023-11-13 09:25:02 UTC","content_view":{"id":5,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":20,"name":"convert2rhel_rhel7","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:41 UTC","updated_at":"2025-12-13 23:00:41 UTC","content_view_environments":[{"content_view":{"id":6,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":6,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":6},"lifecycle_environment":{"id":4,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":6,"content_view":{"id":6,"name":"Default + Organization View"},"environment_id":4,"environment":{"id":4,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -319,11 +331,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1154' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +339,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-22.yml b/tests/test_playbooks/fixtures/convert2rhel-22.yml index 78b30d3f0d..75e7789df5 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-22.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-22.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/activation_keys?search=name%3D%22convert2rhel_rhel8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/activation_keys?search=name%3D%22convert2rhel_rhel8%22&per_page=4294967296 response: body: - string: '{"total":5,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"convert2rhel_rhel8\"","sort":{"by":"name","order":"asc"},"results":[]} + string: '{"total":5,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"convert2rhel_rhel8\"","sort":{"by":"name","order":"asc"},"results":[]} ' headers: @@ -135,11 +139,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '173' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '171' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -147,23 +147,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -179,12 +185,12 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/environments?search=name%3D%22Library%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/environments?search=name%3D%22Library%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":3,"name":"Library","label":"Library","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1782,"module_streams":0,"errata":{"security":4,"bugfix":4,"enhancement":16,"total":24},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":6},{"name":"convert2rhel_centos8","id":7}]}]} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Library\"","sort":{"by":"name","order":"asc"},"results":[{"library":true,"registry_name_pattern":null,"registry_unauthenticated_pull":false,"id":4,"name":"Library","label":"Library","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","prior":null,"successor":null,"counts":{"content_hosts":0,"content_views":2,"packages":1822,"module_streams":0,"errata":{"security":4,"bugfix":6,"enhancement":26,"total":36},"yum_repositories":4,"docker_repositories":0,"ostree_repositories":0,"products":4,"debs":0,"deb_repositories":0},"permissions":{"create_lifecycle_environments":true,"view_lifecycle_environments":true,"edit_lifecycle_environments":true,"destroy_lifecycle_environments":false,"promote_or_remove_content_views_to_environments":true},"content_views":[{"name":"convert2rhel_centos7","id":7},{"name":"convert2rhel_centos8","id":8}],"capsules":[{"id":1,"name":"foreman.example.org","lifecycle_environments":[{"id":1},{"id":4}]}]}]} ' headers: @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1083' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1205' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -205,23 +207,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -237,16 +245,17 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/content_views?search=name%3D%22Default+Organization+View%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Default - Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"component_ids":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":5,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"needs_publish":null,"filtered":false,"repository_ids":[],"id":5,"name":"Default - Organization View","label":"Default_Organization_View","description":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:22 UTC","updated_at":"2023-11-13 09:23:22 UTC","last_task":null,"latest_version_environments":[{"id":3,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":5,"version":"1.0","published":"2023-11-13 - 09:23:22 UTC","environment_ids":[3],"filters_applied":null}],"components":[],"content_view_components":[],"activation_keys":[{"id":9,"name":"convert2rhel_oracle7"},{"id":10,"name":"convert2rhel_oracle8"},{"id":11,"name":"convert2rhel_rhel7"}],"hosts":[],"next_version":"1.0","last_published":"2023-11-13 - 09:23:22 UTC","environments":[{"id":3,"label":"Library","name":"Library","activation_keys":[9,10,11],"hosts":[],"permissions":{"readable":true}}]}]} + string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Default + Organization View\"","sort":{"by":"name","order":"asc"},"results":[{"composite":false,"rolling":false,"component_ids":[],"duplicate_repositories_to_publish":[],"default":true,"version_count":1,"latest_version":"1.0","latest_version_id":6,"auto_publish":false,"solve_dependencies":false,"import_only":false,"generated_for":"none","related_cv_count":0,"related_composite_cvs":[],"filtered":false,"needs_publish":false,"environment_ids":[4],"repository_ids":[],"id":6,"name":"Default + Organization View","label":"Default_Organization_View","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:40 UTC","updated_at":"2025-12-13 22:57:40 UTC","last_task":null,"latest_version_environments":[{"id":4,"name":"Library","label":"Library"}],"repositories":[],"versions":[{"id":6,"version":"1.0","published":"2025-12-13 + 22:57:40 UTC","description":null,"environment_ids":[4],"filters_applied":null,"published_at_words":"3 + minutes"}],"components":[],"content_view_components":[],"activation_keys":[{"id":18,"name":"convert2rhel_oracle7"},{"id":19,"name":"convert2rhel_oracle8"},{"id":20,"name":"convert2rhel_rhel7"}],"hosts":[],"next_version":"1.0","last_published":"2025-12-13 + 22:57:40 UTC","environments":[{"id":4,"label":"Library","name":"Library","activation_keys":[18,19,20],"hosts":[],"permissions":{"readable":true}}]}]} ' headers: @@ -255,11 +264,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1518' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -267,29 +272,35 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "convert2rhel_rhel8", "environment_id": - 3, "content_view_id": 5, "auto_attach": false}' + body: '{"name": "convert2rhel_rhel8", "organization_id": 5, "content_view_id": + 6, "environment_id": 4}' headers: Accept: - application/json;version=2 @@ -298,7 +309,7 @@ interactions: Connection: - keep-alive Content-Length: - - '117' + - '95' Content-Type: - application/json User-Agent: @@ -307,10 +318,11 @@ interactions: uri: https://foreman.example.org/katello/api/activation_keys response: body: - string: ' {"service_level":null,"content_overrides":[],"id":12,"name":"convert2rhel_rhel8","description":null,"unlimited_hosts":true,"auto_attach":false,"content_view_id":5,"environment_id":3,"usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:25:03 UTC","updated_at":"2023-11-13 09:25:03 UTC","content_view":{"id":5,"name":"Default - Organization View"},"environment":{"name":"Library","id":3},"products":[],"host_collections":[],"purpose_addons":[],"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} + string: ' {"service_level":null,"content_overrides":[],"id":21,"name":"convert2rhel_rhel8","description":null,"unlimited_hosts":true,"content_view_environment_labels":"Library","usage_count":0,"user_id":4,"max_hosts":null,"release_version":null,"purpose_usage":null,"purpose_role":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 23:00:44 UTC","updated_at":"2025-12-13 23:00:44 UTC","content_view_environments":[{"content_view":{"id":6,"name":"Default + Organization View","composite":false,"rolling":false,"content_view_version":"1.0","content_view_version_id":6,"content_view_version_latest":true,"content_view_default":true,"content_view_environment_id":6},"lifecycle_environment":{"id":4,"name":"Library","lifecycle_environment_library":true},"label":"Library"}],"products":[],"host_collections":[],"multi_content_view_environment":false,"content_view_id":6,"content_view":{"id":6,"name":"Default + Organization View"},"environment_id":4,"environment":{"id":4,"name":"Library"},"permissions":{"view_activation_keys":true,"edit_activation_keys":true,"destroy_activation_keys":true}} ' headers: @@ -319,11 +331,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '729' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1154' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -331,23 +339,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-23.yml b/tests/test_playbooks/fixtures/convert2rhel-23.yml index 108232943c..e45089a8ce 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-23.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-23.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -78,10 +80,6 @@ interactions: - Keep-Alive Content-Length: - '186' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,21 +89,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -126,8 +130,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -136,10 +140,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -149,21 +149,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -184,8 +190,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -194,10 +200,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -207,28 +209,34 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: body: '{"hostgroup": {"name": "CentOS 7 converting", "group_parameters_attributes": [{"name": "kt_activation_keys", "parameter_type": "string", "value": "convert2rhel_centos7"}], - "organization_ids": [4]}}' + "organization_ids": [5]}}' headers: Accept: - application/json;version=2 @@ -246,12 +254,12 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2023-11-13 - 09:25:04 UTC","updated_at":"2023-11-13 09:25:04 UTC","id":5,"name":"CentOS - 7 converting","title":"CentOS 7 converting","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2023-11-13 - 09:25:04 UTC","updated_at":"2023-11-13 09:25:04 UTC","id":10,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2025-12-13 + 23:00:47 UTC","updated_at":"2025-12-13 23:00:47 UTC","id":5,"name":"CentOS + 7 converting","title":"CentOS 7 converting","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2025-12-13 + 23:00:47 UTC","updated_at":"2025-12-13 23:00:47 UTC","id":8,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host group","hidden_value?":false,"value":"convert2rhel_centos7"}],"template_combinations":[],"locations":[{"id":2,"name":"Default - Location","title":"Default Location","description":null}],"organizations":[{"id":4,"name":"Test + Location","title":"Default Location","description":null}],"organizations":[{"id":5,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: @@ -259,11 +267,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1703' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1702' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -273,21 +277,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-24.yml b/tests/test_playbooks/fixtures/convert2rhel-24.yml index 2aeb11b631..9582b869ed 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-24.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-24.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -78,10 +80,6 @@ interactions: - Keep-Alive Content-Length: - '186' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -91,21 +89,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -126,8 +130,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -136,10 +140,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -149,21 +149,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -184,8 +190,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -194,10 +200,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -207,28 +209,34 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: body: '{"hostgroup": {"name": "CentOS 8 converting", "group_parameters_attributes": [{"name": "kt_activation_keys", "parameter_type": "string", "value": "convert2rhel_centos8"}], - "organization_ids": [4]}}' + "organization_ids": [5]}}' headers: Accept: - application/json;version=2 @@ -246,12 +254,12 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2023-11-13 - 09:25:05 UTC","updated_at":"2023-11-13 09:25:05 UTC","id":6,"name":"CentOS - 8 converting","title":"CentOS 8 converting","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2023-11-13 - 09:25:05 UTC","updated_at":"2023-11-13 09:25:05 UTC","id":11,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2025-12-13 + 23:00:50 UTC","updated_at":"2025-12-13 23:00:50 UTC","id":6,"name":"CentOS + 8 converting","title":"CentOS 8 converting","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2025-12-13 + 23:00:50 UTC","updated_at":"2025-12-13 23:00:50 UTC","id":9,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host group","hidden_value?":false,"value":"convert2rhel_centos8"}],"template_combinations":[],"locations":[{"id":2,"name":"Default - Location","title":"Default Location","description":null}],"organizations":[{"id":4,"name":"Test + Location","title":"Default Location","description":null}],"organizations":[{"id":5,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: @@ -259,11 +267,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1703' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1702' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -273,21 +277,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-25.yml b/tests/test_playbooks/fixtures/convert2rhel-25.yml index cdbde9ef10..1357749356 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-25.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-25.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -79,10 +81,6 @@ interactions: - Keep-Alive Content-Length: - '192' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -92,21 +90,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -127,8 +131,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -137,10 +141,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -150,21 +150,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,8 +191,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -195,10 +201,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -208,28 +210,34 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: body: '{"hostgroup": {"name": "Oracle Linux 7 converting", "group_parameters_attributes": [{"name": "kt_activation_keys", "parameter_type": "string", "value": "convert2rhel_oracle7"}], - "organization_ids": [4]}}' + "organization_ids": [5]}}' headers: Accept: - application/json;version=2 @@ -247,12 +255,12 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2023-11-13 - 09:25:05 UTC","updated_at":"2023-11-13 09:25:05 UTC","id":7,"name":"Oracle - Linux 7 converting","title":"Oracle Linux 7 converting","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2023-11-13 - 09:25:05 UTC","updated_at":"2023-11-13 09:25:05 UTC","id":12,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2025-12-13 + 23:00:52 UTC","updated_at":"2025-12-13 23:00:52 UTC","id":7,"name":"Oracle + Linux 7 converting","title":"Oracle Linux 7 converting","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2025-12-13 + 23:00:52 UTC","updated_at":"2025-12-13 23:00:52 UTC","id":10,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host group","hidden_value?":false,"value":"convert2rhel_oracle7"}],"template_combinations":[],"locations":[{"id":2,"name":"Default - Location","title":"Default Location","description":null}],"organizations":[{"id":4,"name":"Test + Location","title":"Default Location","description":null}],"organizations":[{"id":5,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: @@ -261,10 +269,6 @@ interactions: - Keep-Alive Content-Length: - '1715' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -274,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-26.yml b/tests/test_playbooks/fixtures/convert2rhel-26.yml index 5328d996b9..515b3e5df3 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-26.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-26.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -79,10 +81,6 @@ interactions: - Keep-Alive Content-Length: - '192' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -92,21 +90,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -127,8 +131,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -137,10 +141,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -150,21 +150,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -185,8 +191,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -195,10 +201,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -208,28 +210,34 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: body: '{"hostgroup": {"name": "Oracle Linux 8 converting", "group_parameters_attributes": [{"name": "kt_activation_keys", "parameter_type": "string", "value": "convert2rhel_oracle8"}], - "organization_ids": [4]}}' + "organization_ids": [5]}}' headers: Accept: - application/json;version=2 @@ -247,12 +255,12 @@ interactions: uri: https://foreman.example.org/api/hostgroups response: body: - string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2023-11-13 - 09:25:06 UTC","updated_at":"2023-11-13 09:25:06 UTC","id":8,"name":"Oracle - Linux 8 converting","title":"Oracle Linux 8 converting","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2023-11-13 - 09:25:06 UTC","updated_at":"2023-11-13 09:25:06 UTC","id":13,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host + string: '{"subnet_id":null,"subnet_name":null,"operatingsystem_id":null,"operatingsystem_name":null,"domain_id":null,"domain_name":null,"compute_profile_id":null,"compute_profile_name":null,"ancestry":null,"parent_id":null,"parent_name":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"pxe_loader":null,"subnet6_id":null,"subnet6_name":null,"compute_resource_id":null,"compute_resource_name":null,"architecture_id":null,"architecture_name":null,"realm_id":null,"realm_name":null,"created_at":"2025-12-13 + 23:00:55 UTC","updated_at":"2025-12-13 23:00:55 UTC","id":8,"name":"Oracle + Linux 8 converting","title":"Oracle Linux 8 converting","description":null,"puppet_proxy_id":null,"puppet_proxy_name":null,"puppet_ca_proxy_id":null,"puppet_ca_proxy_name":null,"puppet_proxy":null,"puppet_ca_proxy":null,"inherited_compute_profile_id":null,"inherited_domain_id":null,"inherited_puppet_proxy_id":null,"inherited_puppet_ca_proxy_id":null,"inherited_compute_resource_id":null,"inherited_operatingsystem_id":null,"inherited_architecture_id":null,"inherited_medium_id":null,"inherited_ptable_id":null,"inherited_subnet_id":null,"inherited_subnet6_id":null,"inherited_realm_id":null,"inherited_pxe_loader":null,"parameters":[{"priority":60,"created_at":"2025-12-13 + 23:00:55 UTC","updated_at":"2025-12-13 23:00:55 UTC","id":11,"name":"kt_activation_keys","parameter_type":"string","associated_type":"host group","hidden_value?":false,"value":"convert2rhel_oracle8"}],"template_combinations":[],"locations":[{"id":2,"name":"Default - Location","title":"Default Location","description":null}],"organizations":[{"id":4,"name":"Test + Location","title":"Default Location","description":null}],"organizations":[{"id":5,"name":"Test Organization","title":"Test Organization","description":"A test organization"}]}' headers: Cache-Control: @@ -261,10 +269,6 @@ interactions: - Keep-Alive Content-Length: - '1715' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -274,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-3.yml b/tests/test_playbooks/fixtures/convert2rhel-3.yml index 5f85d5d3b5..72e84162b9 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-3.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-3.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,11 +127,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Convert2RHEL8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Convert2RHEL8%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL8\"","sort":{"by":"name","order":"asc"},"results":[{"id":6,"cp_id":"139454427959","name":"Convert2RHEL8","label":"Convert2RHEL8","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":0}]} + string: '{"total":2,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL8\"","sort":{"by":"name","order":"asc"},"results":[{"id":7,"cp_id":"600225996063","name":"Convert2RHEL8","label":"Convert2RHEL8","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":0}]} ' headers: @@ -136,11 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '605' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '603' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,23 +148,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -180,10 +186,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/6/repositories?search=name%3D%22Convert2RHEL8+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/7/repositories?search=name%3D%22Convert2RHEL8+main%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL8 + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL8 main\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":1} ' @@ -193,11 +199,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '198' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '196' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -207,26 +209,32 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"name": "Convert2RHEL8 main", "product_id": 6, "content_type": "yum", + body: '{"name": "Convert2RHEL8 main", "product_id": 7, "content_type": "yum", "url": "https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel8/8/x86_64/os/", "download_policy": "immediate", "verify_ssl_on_sync": true}' headers: @@ -246,12 +254,12 @@ interactions: uri: https://foreman.example.org/katello/api/repositories response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main","promoted":false,"content_view_version_id":5,"library_instance_id":null,"last_contents_changed":"2023-11-13 - 09:23:28 UTC","organization_id":4,"organization":{"name":"Test Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:27 UTC","updated_at":"2023-11-13 09:23:28 UTC","backend_identifier":"efcacfee-d580-4ee2-ba9d-6e814db96635","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main/","version_href":"/pulp/api/v3/repositories/rpm/rpm/cd1634f4-f76f-4748-90ca-4cda8c82524a/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/a2ec2855-7266-4aeb-b92a-59c3ff60617e/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":10,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel8/8/x86_64/os/","arch":"noarch","os_versions":[],"content_id":"1699867408251","generic_remote_options":null,"major":null,"minor":null,"product":{"id":6,"cp_id":"139454427959","name":"Convert2RHEL8","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL8_Convert2RHEL8_main","last_sync_words":null,"environment":{"id":3,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + string: ' {"relative_path":"Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main","promoted":false,"content_view_version_id":6,"library_instance_id":null,"last_contents_changed":"2025-12-13 + 22:57:57 UTC","organization_id":5,"organization":{"name":"Test Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:57:56 UTC","updated_at":"2025-12-13 22:57:57 UTC","backend_identifier":"84ac7715-0446-430c-9a8c-7aca2e8fffe3","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main/","full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-613d-72a7-ae06-23dcf7e4b2e5/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-603a-757f-af6e-e421522523c7/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":11,"name":"Convert2RHEL8 + main","label":"Convert2RHEL8_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel8/8/x86_64/os/","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666677224","generic_remote_options":null,"major":null,"minor":null,"product":{"id":7,"cp_id":"600225996063","name":"Convert2RHEL8","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL8_Convert2RHEL8_main","last_sync_words":null,"flatpak_dependencies":false,"environment":{"id":4,"registry_unauthenticated_pull":false},"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_dependencies":true,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"allow_updates":true,"is_container_push":false,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -260,11 +268,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '2836' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '2936' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -274,21 +278,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-4.yml b/tests/test_playbooks/fixtures/convert2rhel-4.yml index 418d176859..49cfe01703 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-4.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-4.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Oracle+Linux+7+Convert2RHEL%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Oracle+Linux+7+Convert2RHEL%22&per_page=4294967296 response: body: - string: '{"total":2,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle + string: '{"total":2,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle Linux 7 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '182' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '180' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,28 +148,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Oracle Linux 7 Convert2RHEL"}' + body: '{"organization_id": 5, "name": "Oracle Linux 7 Convert2RHEL"}' headers: Accept: - application/json;version=2 @@ -187,10 +193,10 @@ interactions: uri: https://foreman.example.org/katello/api/products response: body: - string: ' {"sync_state_aggregated":null,"redhat":false,"id":7,"cp_id":"521078275134","name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":0,"created_at":"2023-11-13 - 09:23:29 UTC","updated_at":"2023-11-13 09:23:29 UTC","product_content":[],"available_content":[],"repositories":[],"provider":{"name":"Anonymous"},"sync_status":{"id":null,"product_id":null,"progress":null,"sync_id":null,"state":null,"raw_state":null,"start_time":null,"finish_time":null,"duration":null,"display_size":null,"size":null,"is_running":null,"error_details":null},"permissions":{"view_products":true,"edit_products":true,"destroy_products":true,"sync_products":true},"published_content_view_ids":[],"has_last_affected_repo_in_filter":false,"active_task_count":0} + string: ' {"sync_state_aggregated":null,"redhat":false,"id":8,"cp_id":"300996341100","name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":0,"created_at":"2025-12-13 + 22:58:00 UTC","updated_at":"2025-12-13 22:58:00 UTC","product_content":[],"available_content":[],"repositories":[],"provider":{"name":"Anonymous"},"sync_status":{"id":null,"product_id":null,"progress":null,"sync_id":null,"state":null,"raw_state":null,"start_time":null,"finish_time":null,"duration":null,"display_size":null,"size":null,"is_running":null,"error_details":null},"permissions":{"view_products":true,"edit_products":true,"destroy_products":true,"sync_products":true},"published_content_view_ids":[],"has_last_affected_repo_in_filter":false,"active_task_count":0} ' headers: @@ -200,10 +206,6 @@ interactions: - Keep-Alive Content-Length: - '1111' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -211,23 +213,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-5.yml b/tests/test_playbooks/fixtures/convert2rhel-5.yml index c5f9bdcd88..57b72ed21e 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-5.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-5.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,13 +127,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Oracle+Linux+7+Convert2RHEL%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Oracle+Linux+7+Convert2RHEL%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle - Linux 7 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[{"id":7,"cp_id":"521078275134","name":"Oracle - Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":0}]} + string: '{"total":3,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle + Linux 7 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[{"id":8,"cp_id":"300996341100","name":"Oracle + Linux 7 Convert2RHEL","label":"Oracle_Linux_7_Convert2RHEL","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":0}]} ' headers: @@ -138,11 +142,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '647' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '645' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -150,23 +150,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -182,10 +188,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/7/repositories?search=name%3D%22Oracle+Linux+7+Convert2RHEL+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/8/repositories?search=name%3D%22Oracle+Linux+7+Convert2RHEL+main%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle Linux 7 Convert2RHEL main\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":2} ' @@ -195,11 +201,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '212' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '210' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -209,26 +211,32 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"name": "Oracle Linux 7 Convert2RHEL main", "product_id": 7, "content_type": + body: '{"name": "Oracle Linux 7 Convert2RHEL main", "product_id": 8, "content_type": "yum", "url": "https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi/server/7/7Server/x86_64/os", "download_policy": "immediate", "verify_ssl_on_sync": true}' headers: @@ -248,13 +256,13 @@ interactions: uri: https://foreman.example.org/katello/api/repositories response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Oracle_Linux_7_Convert2RHEL/Oracle_Linux_7_Convert2RHEL_main","promoted":false,"content_view_version_id":5,"library_instance_id":null,"last_contents_changed":"2023-11-13 - 09:23:30 UTC","organization_id":4,"organization":{"name":"Test Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:30 UTC","updated_at":"2023-11-13 09:23:31 UTC","backend_identifier":"d6aba245-2ef6-4acb-a6b9-dbc72aa036e7","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Oracle_Linux_7_Convert2RHEL/Oracle_Linux_7_Convert2RHEL_main/","version_href":"/pulp/api/v3/repositories/rpm/rpm/4c024768-b01e-40d3-99be-42578160b23d/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/6c55319c-9e62-4548-9484-c74c343b720c/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":11,"name":"Oracle - Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi/server/7/7Server/x86_64/os","arch":"noarch","os_versions":[],"content_id":"1699867410895","generic_remote_options":null,"major":null,"minor":null,"product":{"id":7,"cp_id":"521078275134","name":"Oracle - Linux 7 Convert2RHEL","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Oracle_Linux_7_Convert2RHEL_Oracle_Linux_7_Convert2RHEL_main","last_sync_words":null,"environment":{"id":3,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + string: ' {"relative_path":"Test_Organization/Library/custom/Oracle_Linux_7_Convert2RHEL/Oracle_Linux_7_Convert2RHEL_main","promoted":false,"content_view_version_id":6,"library_instance_id":null,"last_contents_changed":"2025-12-13 + 22:58:03 UTC","organization_id":5,"organization":{"name":"Test Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:58:03 UTC","updated_at":"2025-12-13 22:58:03 UTC","backend_identifier":"76212e8b-1f15-4468-b7bc-b255f3079cc9","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Oracle_Linux_7_Convert2RHEL/Oracle_Linux_7_Convert2RHEL_main/","full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-7a55-70e0-9fe2-5dbc69e66ed9/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-7963-795e-b441-bbbb859e2e60/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":12,"name":"Oracle + Linux 7 Convert2RHEL main","label":"Oracle_Linux_7_Convert2RHEL_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi/server/7/7Server/x86_64/os","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666683649","generic_remote_options":null,"major":null,"minor":null,"product":{"id":8,"cp_id":"300996341100","name":"Oracle + Linux 7 Convert2RHEL","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Oracle_Linux_7_Convert2RHEL_Oracle_Linux_7_Convert2RHEL_main","last_sync_words":null,"flatpak_dependencies":false,"environment":{"id":4,"registry_unauthenticated_pull":false},"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_dependencies":true,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"allow_updates":true,"is_container_push":false,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -263,11 +271,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '2961' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '3061' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -277,21 +281,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-6.yml b/tests/test_playbooks/fixtures/convert2rhel-6.yml index a97a931153..0fbf6f464f 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-6.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-6.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,10 +127,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Oracle+Linux+8+Convert2RHEL%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Oracle+Linux+8+Convert2RHEL%22&per_page=4294967296 response: body: - string: '{"total":3,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle + string: '{"total":3,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle Linux 8 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[]} ' @@ -136,11 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '182' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '180' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -148,28 +148,34 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"organization_id": 4, "name": "Oracle Linux 8 Convert2RHEL"}' + body: '{"organization_id": 5, "name": "Oracle Linux 8 Convert2RHEL"}' headers: Accept: - application/json;version=2 @@ -187,10 +193,10 @@ interactions: uri: https://foreman.example.org/katello/api/products response: body: - string: ' {"sync_state_aggregated":null,"redhat":false,"id":8,"cp_id":"533490883786","name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":0,"created_at":"2023-11-13 - 09:23:31 UTC","updated_at":"2023-11-13 09:23:31 UTC","product_content":[],"available_content":[],"repositories":[],"provider":{"name":"Anonymous"},"sync_status":{"id":null,"product_id":null,"progress":null,"sync_id":null,"state":null,"raw_state":null,"start_time":null,"finish_time":null,"duration":null,"display_size":null,"size":null,"is_running":null,"error_details":null},"permissions":{"view_products":true,"edit_products":true,"destroy_products":true,"sync_products":true},"published_content_view_ids":[],"has_last_affected_repo_in_filter":false,"active_task_count":0} + string: ' {"sync_state_aggregated":null,"redhat":false,"id":9,"cp_id":"380210074378","name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":0,"created_at":"2025-12-13 + 22:58:06 UTC","updated_at":"2025-12-13 22:58:06 UTC","product_content":[],"available_content":[],"repositories":[],"provider":{"name":"Anonymous"},"sync_status":{"id":null,"product_id":null,"progress":null,"sync_id":null,"state":null,"raw_state":null,"start_time":null,"finish_time":null,"duration":null,"display_size":null,"size":null,"is_running":null,"error_details":null},"permissions":{"view_products":true,"edit_products":true,"destroy_products":true,"sync_products":true},"published_content_view_ids":[],"has_last_affected_repo_in_filter":false,"active_task_count":0} ' headers: @@ -200,10 +206,6 @@ interactions: - Keep-Alive Content-Length: - '1111' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -211,23 +213,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-7.yml b/tests/test_playbooks/fixtures/convert2rhel-7.yml index b72b9a8f75..648468994f 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-7.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-7.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,13 +127,13 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Oracle+Linux+8+Convert2RHEL%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Oracle+Linux+8+Convert2RHEL%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle - Linux 8 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[{"id":8,"cp_id":"533490883786","name":"Oracle - Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":0}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle + Linux 8 Convert2RHEL\"","sort":{"by":"name","order":"asc"},"results":[{"id":9,"cp_id":"380210074378","name":"Oracle + Linux 8 Convert2RHEL","label":"Oracle_Linux_8_Convert2RHEL","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":0}]} ' headers: @@ -138,11 +142,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '647' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '645' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -150,23 +150,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -182,10 +188,10 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/8/repositories?search=name%3D%22Oracle+Linux+8+Convert2RHEL+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/9/repositories?search=name%3D%22Oracle+Linux+8+Convert2RHEL+main%22&per_page=4294967296 response: body: - string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Oracle + string: '{"total":0,"subtotal":0,"selectable":0,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Oracle Linux 8 Convert2RHEL main\"","sort":{"by":"name","order":"asc"},"results":[],"org_repository_count":3} ' @@ -195,11 +201,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '212' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '210' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -209,26 +211,32 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK - request: - body: '{"name": "Oracle Linux 8 Convert2RHEL main", "product_id": 8, "content_type": + body: '{"name": "Oracle Linux 8 Convert2RHEL main", "product_id": 9, "content_type": "yum", "url": "https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/", "download_policy": "immediate", "verify_ssl_on_sync": true}' headers: @@ -248,13 +256,13 @@ interactions: uri: https://foreman.example.org/katello/api/repositories response: body: - string: ' {"relative_path":"Test_Organization/Library/custom/Oracle_Linux_8_Convert2RHEL/Oracle_Linux_8_Convert2RHEL_main","promoted":false,"content_view_version_id":5,"library_instance_id":null,"last_contents_changed":"2023-11-13 - 09:23:33 UTC","organization_id":4,"organization":{"name":"Test Organization","label":"Test_Organization","id":4},"created_at":"2023-11-13 - 09:23:33 UTC","updated_at":"2023-11-13 09:23:33 UTC","backend_identifier":"578d0b29-4bca-45e8-8213-1ee30b86bea5","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Oracle_Linux_8_Convert2RHEL/Oracle_Linux_8_Convert2RHEL_main/","version_href":"/pulp/api/v3/repositories/rpm/rpm/7ba6e2c9-531a-4021-b2ca-2a7482cc6d4d/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/de92cca5-e59c-4c3c-b6e9-a0468cadf657/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":12,"name":"Oracle - Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/","arch":"noarch","os_versions":[],"content_id":"1699867413416","generic_remote_options":null,"major":null,"minor":null,"product":{"id":8,"cp_id":"533490883786","name":"Oracle - Linux 8 Convert2RHEL","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Oracle_Linux_8_Convert2RHEL_Oracle_Linux_8_Convert2RHEL_main","last_sync_words":null,"environment":{"id":3,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + string: ' {"relative_path":"Test_Organization/Library/custom/Oracle_Linux_8_Convert2RHEL/Oracle_Linux_8_Convert2RHEL_main","promoted":false,"content_view_version_id":6,"library_instance_id":null,"last_contents_changed":"2025-12-13 + 22:58:09 UTC","organization_id":5,"organization":{"name":"Test Organization","label":"Test_Organization","id":5},"created_at":"2025-12-13 + 22:58:09 UTC","updated_at":"2025-12-13 22:58:10 UTC","backend_identifier":"fb4f782f-1194-4c4e-a8fd-d569029ed8f2","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Oracle_Linux_8_Convert2RHEL/Oracle_Linux_8_Convert2RHEL_main/","full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-9351-70c2-97ba-762f34c75323/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-9260-7433-9296-a9a932105ad5/","publication_href":null,"content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":13,"name":"Oracle + Linux 8 Convert2RHEL main","label":"Oracle_Linux_8_Convert2RHEL_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/baseos/os/","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666690062","generic_remote_options":null,"major":null,"minor":null,"product":{"id":9,"cp_id":"380210074378","name":"Oracle + Linux 8 Convert2RHEL","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Oracle_Linux_8_Convert2RHEL_Oracle_Linux_8_Convert2RHEL_main","last_sync_words":null,"flatpak_dependencies":false,"environment":{"id":4,"registry_unauthenticated_pull":false},"include_tags":null,"exclude_tags":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":"immediate","ansible_collection_requirements":null,"ansible_collection_auth_url":null,"ansible_collection_auth_token":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_dependencies":true,"upstream_username":null,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"retain_package_versions_count":null,"metadata_expire":null,"allow_updates":true,"is_container_push":false,"ignorable_content":null,"http_proxy":{"id":null,"name":null,"policy":"global_default_http_proxy"},"ssl_ca_cert":{"id":null,"name":null},"ssl_client_cert":{"id":null,"name":null},"ssl_client_key":{"id":null,"name":null},"gpg_key":{"id":null,"name":null},"permissions":{"deletable":true,"deletable_across_cv":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: @@ -263,11 +271,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '2955' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '3055' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -277,21 +281,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 201 message: Created diff --git a/tests/test_playbooks/fixtures/convert2rhel-8.yml b/tests/test_playbooks/fixtures/convert2rhel-8.yml index 6a4cccbb1d..97cd8310bd 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-8.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-8.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,12 +127,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Convert2RHEL7%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Convert2RHEL7%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL7\"","sort":{"by":"name","order":"asc"},"results":[{"id":5,"cp_id":"176163814735","name":"Convert2RHEL7","label":"Convert2RHEL7","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-11-13 - 09:23:26 UTC","last_sync_words":"less than a minute","organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":1}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL7\"","sort":{"by":"name","order":"asc"},"results":[{"id":6,"cp_id":"184790177306","name":"Convert2RHEL7","label":"Convert2RHEL7","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":1}]} ' headers: @@ -137,11 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '642' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '603' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -149,23 +148,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -181,14 +186,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/5/repositories?search=name%3D%22Convert2RHEL7+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/6/repositories?search=name%3D%22Convert2RHEL7+main%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL7 - main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"42ac9443-2167-4189-b4da-bbfcf402b74a","relative_path":"Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/b5fce5ea-3912-45b8-966e-fb9f15e774e2/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/a363bf7a-e6cf-44fb-a11c-b50602ce53f7/","publication_href":"/pulp/api/v3/publications/rpm/rpm/68a25894-5d1c-4d96-bf9f-316e42123d15/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":9,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel/server/7/7Server/x86_64/os/","arch":"noarch","os_versions":[],"content_id":"1699867405581","generic_remote_options":null,"major":null,"minor":null,"product":{"id":5,"cp_id":"176163814735","name":"Convert2RHEL7","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL7_Convert2RHEL7_main","last_sync_words":null}],"org_repository_count":4} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL7 + main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"09c7cb58-b07f-4338-9ba7-7f2e1561d2b8","relative_path":"Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Convert2RHEL7/Convert2RHEL7_main/","library_instance_id":null,"full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-4765-7ccc-8023-5090af77d70d/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-465e-7033-a168-d93a2ed7e5ff/","publication_href":"/pulp/api/v3/publications/rpm/rpm/019b19ef-49b9-7b73-a387-6080bd355ad5/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":10,"name":"Convert2RHEL7 + main","label":"Convert2RHEL7_main","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel/server/7/7Server/x86_64/os/","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666670615","generic_remote_options":null,"major":null,"minor":null,"product":{"id":6,"cp_id":"184790177306","name":"Convert2RHEL7","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL7_Convert2RHEL7_main","last_sync_words":null,"flatpak_dependencies":false}],"org_repository_count":4} ' headers: @@ -197,11 +203,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1734' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1917' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -211,21 +213,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -245,18 +253,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/repositories/9/sync + uri: https://foreman.example.org/katello/api/repositories/10/sync response: body: - string: ' {"id":"b159576b-062a-43a2-a6bb-82d5ef2859e6","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: ' {"id":"bf30c16c-4d3f-43de-8e0f-2d45954d4707","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Convert2RHEL7 main''; product ''Convert2RHEL7''; organization - ''Test Organization''","username":"admin","started_at":"2023-11-13 09:23:34 - UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"repository":{"id":9,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main"},"product":{"id":5,"name":"Convert2RHEL7","label":"Convert2RHEL7","cp_id":"176163814735"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":9,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"4e54ffcd-7e77-4da1-9125-92b7932358d6","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"4e54ffcd-7e77-4da1-9125-92b7932358d6","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"0c5c040f-25f0-4442-bf2a-e57a6a50d787","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository - ''Convert2RHEL7 main''","link":null}],["product",{"text":"product ''Convert2RHEL7''","link":"/products/5/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:34 UTC","available_actions":{"cancellable":false,"resumable":false}} + ''Test Organization''","username":"admin","started_at":"2025-12-13 22:58:13 + UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"repository":{"id":10,"name":"Convert2RHEL7 + main","label":"Convert2RHEL7_main"},"product":{"id":6,"name":"Convert2RHEL7","label":"Convert2RHEL7","cp_id":"184790177306"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":10,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"fdd4045c-c6b1-458a-af67-7588f90b4473","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"fdd4045c-c6b1-458a-af67-7588f90b4473","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"3b7917d5-8071-46d8-8e0c-23099ca8bcd4","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Convert2RHEL7 main''","link":null}],["product",{"text":"product ''Convert2RHEL7''","link":"/products/6/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:58:13 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -264,10 +272,6 @@ interactions: - no-cache Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -277,23 +281,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted @@ -309,31 +319,29 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/b159576b-062a-43a2-a6bb-82d5ef2859e6 + uri: https://foreman.example.org/foreman_tasks/api/tasks/bf30c16c-4d3f-43de-8e0f-2d45954d4707 response: body: - string: '{"id":"b159576b-062a-43a2-a6bb-82d5ef2859e6","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"bf30c16c-4d3f-43de-8e0f-2d45954d4707","label":"Actions::Katello::Repository::Sync","pending":false,"action":"Synchronize repository ''Convert2RHEL7 main''; product ''Convert2RHEL7''; organization - ''Test Organization''","username":"admin","started_at":"2023-11-13 09:23:34 - UTC","ended_at":null,"duration":"4.221829","state":"running","result":"pending","progress":0.07,"input":{"repository":{"id":9,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main"},"product":{"id":5,"name":"Convert2RHEL7","label":"Convert2RHEL7","cp_id":"176163814735"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":9,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"4e54ffcd-7e77-4da1-9125-92b7932358d6","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"4e54ffcd-7e77-4da1-9125-92b7932358d6","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"0c5c040f-25f0-4442-bf2a-e57a6a50d787","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository - ''Convert2RHEL7 main''","link":null}],["product",{"text":"product ''Convert2RHEL7''","link":"/products/5/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Waiting - to start.\n--------------------------------\nAssociating Content: 0/0\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:34 UTC","available_actions":{"cancellable":true,"resumable":false}}' + ''Test Organization''","username":"admin","started_at":"2025-12-13 22:58:13 + UTC","ended_at":"2025-12-13 22:58:16 UTC","duration":"3.293837","state":"stopped","result":"success","progress":1.0,"input":{"repository":{"id":10,"name":"Convert2RHEL7 + main","label":"Convert2RHEL7_main"},"product":{"id":6,"name":"Convert2RHEL7","label":"Convert2RHEL7","cp_id":"184790177306"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":10,"sync_result":{"publication_provided":false,"contents_changed":true},"skip_metadata_check":false,"validate_contents":false,"contents_changed":true,"current_request_id":"3b7917d5-8071-46d8-8e0c-23099ca8bcd4","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Convert2RHEL7 main''","link":null}],["product",{"text":"product ''Convert2RHEL7''","link":"/products/6/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Added Rpms: + 18, Errata: 18\nTotal steps: 78/78\n--------------------------------\nAssociating + Content: 36/36\nDownloading Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed + Advisories: 18/18\nParsed Comps: 0/0\nParsed Packages: 18/18\nSkipping Packages: + 0/0\nUn-Associating Content: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:58:13 UTC","available_actions":{"cancellable":false,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '1837' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1754' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -343,87 +351,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Frame-Options: - - sameorigin - X-Permitted-Cross-Domain-Policies: - - none - X-XSS-Protection: - - 1; mode=block - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/b159576b-062a-43a2-a6bb-82d5ef2859e6 - response: - body: - string: '{"id":"b159576b-062a-43a2-a6bb-82d5ef2859e6","label":"Actions::Katello::Repository::Sync","pending":false,"action":"Synchronize - repository ''Convert2RHEL7 main''; product ''Convert2RHEL7''; organization - ''Test Organization''","username":"admin","started_at":"2023-11-13 09:23:34 - UTC","ended_at":"2023-11-13 09:23:42 UTC","duration":"7.666517","state":"stopped","result":"success","progress":1.0,"input":{"repository":{"id":9,"name":"Convert2RHEL7 - main","label":"Convert2RHEL7_main"},"product":{"id":5,"name":"Convert2RHEL7","label":"Convert2RHEL7","cp_id":"176163814735"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":9,"sync_result":{"publication_provided":false,"contents_changed":true},"skip_metadata_check":false,"validate_contents":false,"contents_changed":true,"current_request_id":"0c5c040f-25f0-4442-bf2a-e57a6a50d787","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository - ''Convert2RHEL7 main''","link":null}],["product",{"text":"product ''Convert2RHEL7''","link":"/products/5/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Added Rpms: - 12, Errata: 12\nTotal steps: 54/54\n--------------------------------\nAssociating - Content: 24/24\nDownloading Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed - Advisories: 12/12\nParsed Comps: 0/0\nParsed Packages: 12/12\nSkipping Packages: - 0/0\nUn-Associating Content: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:34 UTC","available_actions":{"cancellable":false,"resumable":false}}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1752' - Content-Security-Policy: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.7.1 - Keep-Alive: - - timeout=15, max=94 - Strict-Transport-Security: + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/fixtures/convert2rhel-9.yml b/tests/test_playbooks/fixtures/convert2rhel-9.yml index 0b41a2e98f..7a3a804a63 100644 --- a/tests/test_playbooks/fixtures/convert2rhel-9.yml +++ b/tests/test_playbooks/fixtures/convert2rhel-9.yml @@ -14,18 +14,14 @@ interactions: uri: https://foreman.example.org/api/status response: body: - string: '{"result":"ok","status":200,"version":"3.7.1","api_version":2}' + string: '{"result":"ok","status":200,"version":"3.18.0-develop","api_version":2}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '102' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '71' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -35,21 +31,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=100 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -70,8 +72,8 @@ interactions: body: string: "{\n \"total\": 2,\n \"subtotal\": 1,\n \"page\": 1,\n \"per_page\": 4294967296,\n \"search\": \"name=\\\"Test Organization\\\"\",\n \"sort\": - {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2023-11-13 - 09:23:21 UTC\",\"updated_at\":\"2023-11-13 09:23:23 UTC\",\"id\":4,\"name\":\"Test + {\n \"by\": null,\n \"order\": null\n },\n \"results\": [{\"label\":\"Test_Organization\",\"created_at\":\"2025-12-13 + 22:57:39 UTC\",\"updated_at\":\"2025-12-13 22:57:43 UTC\",\"id\":5,\"name\":\"Test Organization\",\"title\":\"Test Organization\",\"description\":\"A test organization\"}]\n}\n" headers: Cache-Control: @@ -80,10 +82,6 @@ interactions: - Keep-Alive Content-Length: - '388' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -93,21 +91,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=99 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -123,12 +127,11 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/organizations/4/products?search=name%3D%22Convert2RHEL8%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/organizations/5/products?search=name%3D%22Convert2RHEL8%22&per_page=4294967296 response: body: - string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL8\"","sort":{"by":"name","order":"asc"},"results":[{"id":6,"cp_id":"139454427959","name":"Convert2RHEL8","label":"Convert2RHEL8","description":null,"provider_id":5,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":"2023-11-13 - 09:23:29 UTC","last_sync_words":"less than a minute","organization_id":4,"organization":{"name":"Test - Organization","label":"Test_Organization","id":4},"sync_plan":null,"repository_count":1}]} + string: '{"total":4,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL8\"","sort":{"by":"name","order":"asc"},"results":[{"id":7,"cp_id":"600225996063","name":"Convert2RHEL8","label":"Convert2RHEL8","description":null,"provider_id":7,"sync_plan_id":null,"sync_summary":{},"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"sync_state":null,"last_sync":null,"last_sync_words":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"sync_plan":null,"repository_count":1}]} ' headers: @@ -137,11 +140,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '642' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '603' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -149,23 +148,29 @@ interactions: Foreman_current_location: - ; ANY Foreman_current_organization: - - 4; Test Organization + - 5; Test Organization Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=98 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -181,14 +186,15 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/katello/api/products/6/repositories?search=name%3D%22Convert2RHEL8+main%22&per_page=4294967296 + uri: https://foreman.example.org/katello/api/products/7/repositories?search=name%3D%22Convert2RHEL8+main%22&per_page=4294967296 response: body: - string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":"4294967296","error":null,"search":"name=\"Convert2RHEL8 - main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"efcacfee-d580-4ee2-ba9d-6e814db96635","relative_path":"Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main","container_repository_name":null,"full_path":"https://centos8-stream-katello-4-9.tanso.example.com/pulp/content/Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main/","library_instance_id":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/cd1634f4-f76f-4748-90ca-4cda8c82524a/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/a2ec2855-7266-4aeb-b92a-59c3ff60617e/","publication_href":"/pulp/api/v3/publications/rpm/rpm/0a2462ba-013a-4d7e-a90a-a02e9a44ed1b/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":10,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main","description":null,"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":5,"name":"Default - Organization View"},"content_view_version":{"id":5,"name":"Default Organization - View 1.0","content_view_id":5},"kt_environment":{"id":3,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel8/8/x86_64/os/","arch":"noarch","os_versions":[],"content_id":"1699867408251","generic_remote_options":null,"major":null,"minor":null,"product":{"id":6,"cp_id":"139454427959","name":"Convert2RHEL8","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL8_Convert2RHEL8_main","last_sync_words":null}],"org_repository_count":4} + string: '{"total":1,"subtotal":1,"selectable":1,"page":1,"per_page":4294967296,"error":null,"search":"name=\"Convert2RHEL8 + main\"","sort":{"by":"name","order":"asc"},"results":[{"backend_identifier":"84ac7715-0446-430c-9a8c-7aca2e8fffe3","relative_path":"Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main","container_repository_name":null,"full_path":"https://foreman.example.org/pulp/content/Test_Organization/Library/custom/Convert2RHEL8/Convert2RHEL8_main/","library_instance_id":null,"full_gpg_key_path":null,"version_href":"/pulp/api/v3/repositories/rpm/rpm/019b19ef-613d-72a7-ae06-23dcf7e4b2e5/versions/0/","remote_href":"/pulp/api/v3/remotes/rpm/rpm/019b19ef-603a-757f-af6e-e421522523c7/","publication_href":"/pulp/api/v3/publications/rpm/rpm/019b19ef-637c-7451-baae-5f0b23e0fe8c/","content_counts":{"rpm":0,"erratum":0,"package_group":0,"srpm":0,"module_stream":0},"mirroring_policy":"mirror_content_only","id":11,"name":"Convert2RHEL8 + main","label":"Convert2RHEL8_main","description":null,"organization_id":5,"organization":{"name":"Test + Organization","label":"Test_Organization","id":5},"content_view_versions":[],"filters":[],"last_sync":null,"content_view":{"id":6,"name":"Default + Organization View"},"content_view_version":{"id":6,"name":"Default Organization + View 1.0","content_view_id":6},"kt_environment":{"id":4,"name":"Library"},"content_type":"yum","url":"https://cdn-public.redhat.com/content/public/addon/dist/convert2rhel8/8/x86_64/os/","docker_upstream_name":null,"arch":"noarch","os_versions":[],"content_id":"1765666677224","generic_remote_options":null,"major":null,"minor":null,"product":{"id":7,"cp_id":"600225996063","name":"Convert2RHEL8","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Convert2RHEL8_Convert2RHEL8_main","last_sync_words":null,"flatpak_dependencies":false}],"org_repository_count":4} ' headers: @@ -197,11 +203,7 @@ interactions: Connection: - Keep-Alive Content-Length: - - '1721' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1903' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -211,21 +213,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=97 - Strict-Transport-Security: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK @@ -245,18 +253,18 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: POST - uri: https://foreman.example.org/katello/api/repositories/10/sync + uri: https://foreman.example.org/katello/api/repositories/11/sync response: body: - string: ' {"id":"a2bd6ed7-6d60-4e31-b32d-0c93503870b5","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: ' {"id":"816c6cd2-ff31-45da-b849-6736080d0d9b","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize repository ''Convert2RHEL8 main''; product ''Convert2RHEL8''; organization - ''Test Organization''","username":"admin","started_at":"2023-11-13 09:23:43 - UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"repository":{"id":10,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main"},"product":{"id":6,"name":"Convert2RHEL8","label":"Convert2RHEL8","cp_id":"139454427959"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":10,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b8246982-4c62-422d-b0dc-ea22e45781c9","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b8246982-4c62-422d-b0dc-ea22e45781c9","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"9cbc8b7e-f081-4526-8735-728f42afd852","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository - ''Convert2RHEL8 main''","link":null}],["product",{"text":"product ''Convert2RHEL8''","link":"/products/6/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:43 UTC","available_actions":{"cancellable":false,"resumable":false}} + ''Test Organization''","username":"admin","started_at":"2025-12-13 22:58:20 + UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"repository":{"id":11,"name":"Convert2RHEL8 + main","label":"Convert2RHEL8_main"},"product":{"id":7,"name":"Convert2RHEL8","label":"Convert2RHEL8","cp_id":"600225996063"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"e5197bf5-1e15-4078-aa39-1a41f8f37244","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"e5197bf5-1e15-4078-aa39-1a41f8f37244","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"3d585220-bb84-4bd6-900b-815acb3427d2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Convert2RHEL8 main''","link":null}],["product",{"text":"product ''Convert2RHEL8''","link":"/products/7/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:58:20 UTC","available_actions":{"cancellable":false,"resumable":false}} ' headers: @@ -264,10 +272,6 @@ interactions: - no-cache Connection: - Keep-Alive - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -277,23 +281,29 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=96 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains + Referrer-Policy: + - strict-origin-when-cross-origin Transfer-Encoding: - chunked - X-Content-Type-Options: + content-security-policy: + - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; + img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; + style-src ''unsafe-inline'' ''self''' + strict-transport-security: + - max-age=631139040; includeSubdomains + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 202 message: Accepted @@ -309,31 +319,29 @@ interactions: User-Agent: - apypie (https://github.com/Apipie/apypie) method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/a2bd6ed7-6d60-4e31-b32d-0c93503870b5 + uri: https://foreman.example.org/foreman_tasks/api/tasks/816c6cd2-ff31-45da-b849-6736080d0d9b response: body: - string: '{"id":"a2bd6ed7-6d60-4e31-b32d-0c93503870b5","label":"Actions::Katello::Repository::Sync","pending":true,"action":"Synchronize + string: '{"id":"816c6cd2-ff31-45da-b849-6736080d0d9b","label":"Actions::Katello::Repository::Sync","pending":false,"action":"Synchronize repository ''Convert2RHEL8 main''; product ''Convert2RHEL8''; organization - ''Test Organization''","username":"admin","started_at":"2023-11-13 09:23:43 - UTC","ended_at":null,"duration":"4.23079","state":"running","result":"pending","progress":0.07,"input":{"repository":{"id":10,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main"},"product":{"id":6,"name":"Convert2RHEL8","label":"Convert2RHEL8","cp_id":"139454427959"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":10,"sync_result":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b8246982-4c62-422d-b0dc-ea22e45781c9","step_id":19,"action_id":2,"subkeys":[]},"skip_metadata_check":false,"validate_contents":false,"contents_changed":{"class":"Dynflow::ExecutionPlan::OutputReference","execution_plan_id":"b8246982-4c62-422d-b0dc-ea22e45781c9","step_id":19,"action_id":2,"subkeys":["contents_changed"]},"current_request_id":"9cbc8b7e-f081-4526-8735-728f42afd852","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository - ''Convert2RHEL8 main''","link":null}],["product",{"text":"product ''Convert2RHEL8''","link":"/products/6/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Waiting - to start.\n--------------------------------\nAssociating Content: 0/0\nDownloading - Artifacts: 0/0\nDownloading Metadata Files: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:43 UTC","available_actions":{"cancellable":true,"resumable":false}}' + ''Test Organization''","username":"admin","started_at":"2025-12-13 22:58:20 + UTC","ended_at":"2025-12-13 22:58:23 UTC","duration":"3.261638","state":"stopped","result":"success","progress":1.0,"input":{"repository":{"id":11,"name":"Convert2RHEL8 + main","label":"Convert2RHEL8_main"},"product":{"id":7,"name":"Convert2RHEL8","label":"Convert2RHEL8","cp_id":"600225996063"},"provider":{"id":7,"name":"Anonymous"},"organization":{"id":5,"name":"Test + Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":11,"sync_result":{"publication_provided":false,"contents_changed":true},"skip_metadata_check":false,"validate_contents":false,"contents_changed":true,"current_request_id":"3d585220-bb84-4bd6-900b-815acb3427d2","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository + ''Convert2RHEL8 main''","link":null}],["product",{"text":"product ''Convert2RHEL8''","link":"/products/7/"}],["organization",{"text":"organization + ''Test Organization''","link":"/organizations/5/edit"}]],"output":"Added Rpms: + 18, Errata: 18\nTotal steps: 78/78\n--------------------------------\nAssociating + Content: 36/36\nDownloading Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed + Advisories: 18/18\nParsed Comps: 0/0\nParsed Packages: 18/18\nSkipping Packages: + 0/0\nUn-Associating Content: 0/0","errors":[]},"cli_example":null,"start_at":"2025-12-13 + 22:58:20 UTC","available_actions":{"cancellable":false,"resumable":false}}' headers: Cache-Control: - max-age=0, private, must-revalidate Connection: - Keep-Alive Content-Length: - - '1838' - Content-Security-Policy: - - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; - img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; - style-src ''unsafe-inline'' ''self''' + - '1754' Content-Type: - application/json; charset=utf-8 Foreman_api_version: @@ -343,87 +351,27 @@ interactions: Foreman_current_organization: - ; ANY Foreman_version: - - 3.7.1 + - 3.18.0-develop Keep-Alive: - timeout=15, max=95 - Strict-Transport-Security: - - max-age=631139040; includeSubdomains - X-Content-Type-Options: - - nosniff - X-Download-Options: - - noopen - X-Frame-Options: - - sameorigin - X-Permitted-Cross-Domain-Policies: - - none - X-XSS-Protection: - - 1; mode=block - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json;version=2 - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - apypie (https://github.com/Apipie/apypie) - method: GET - uri: https://foreman.example.org/foreman_tasks/api/tasks/a2bd6ed7-6d60-4e31-b32d-0c93503870b5 - response: - body: - string: '{"id":"a2bd6ed7-6d60-4e31-b32d-0c93503870b5","label":"Actions::Katello::Repository::Sync","pending":false,"action":"Synchronize - repository ''Convert2RHEL8 main''; product ''Convert2RHEL8''; organization - ''Test Organization''","username":"admin","started_at":"2023-11-13 09:23:43 - UTC","ended_at":"2023-11-13 09:23:50 UTC","duration":"6.505704","state":"stopped","result":"success","progress":1.0,"input":{"repository":{"id":10,"name":"Convert2RHEL8 - main","label":"Convert2RHEL8_main"},"product":{"id":6,"name":"Convert2RHEL8","label":"Convert2RHEL8","cp_id":"139454427959"},"provider":{"id":5,"name":"Anonymous"},"organization":{"id":4,"name":"Test - Organization","label":"Test_Organization"},"services_checked":["pulp3"],"id":10,"sync_result":{"publication_provided":false,"contents_changed":true},"skip_metadata_check":false,"validate_contents":false,"contents_changed":true,"current_request_id":"9cbc8b7e-f081-4526-8735-728f42afd852","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":4},"output":{},"humanized":{"action":"Synchronize","input":[["repository",{"text":"repository - ''Convert2RHEL8 main''","link":null}],["product",{"text":"product ''Convert2RHEL8''","link":"/products/6/"}],["organization",{"text":"organization - ''Test Organization''","link":"/organizations/4/edit"}]],"output":"Added Rpms: - 12, Errata: 12\nTotal steps: 54/54\n--------------------------------\nAssociating - Content: 24/24\nDownloading Artifacts: 0/0\nDownloading Metadata Files: 6/6\nParsed - Advisories: 12/12\nParsed Comps: 0/0\nParsed Packages: 12/12\nSkipping Packages: - 0/0\nUn-Associating Content: 0/0","errors":[]},"cli_example":null,"start_at":"2023-11-13 - 09:23:43 UTC","available_actions":{"cancellable":false,"resumable":false}}' - headers: - Cache-Control: - - max-age=0, private, must-revalidate - Connection: - - Keep-Alive - Content-Length: - - '1754' - Content-Security-Policy: + Referrer-Policy: + - strict-origin-when-cross-origin + content-security-policy: - 'default-src ''self''; child-src ''self''; connect-src ''self'' ws: wss:; img-src ''self'' data:; script-src ''unsafe-eval'' ''unsafe-inline'' ''self''; style-src ''unsafe-inline'' ''self''' - Content-Type: - - application/json; charset=utf-8 - Foreman_api_version: - - '2' - Foreman_current_location: - - ; ANY - Foreman_current_organization: - - ; ANY - Foreman_version: - - 3.7.1 - Keep-Alive: - - timeout=15, max=94 - Strict-Transport-Security: + strict-transport-security: - max-age=631139040; includeSubdomains - X-Content-Type-Options: + x-content-type-options: - nosniff - X-Download-Options: + x-download-options: - noopen - X-Frame-Options: + x-frame-options: - sameorigin - X-Permitted-Cross-Domain-Policies: + x-permitted-cross-domain-policies: - none - X-XSS-Protection: - - 1; mode=block + x-xss-protection: + - '0' status: code: 200 message: OK diff --git a/tests/test_playbooks/tasks/activation_key.yml b/tests/test_playbooks/tasks/activation_key.yml index 44895c3da8..41e64c6a98 100644 --- a/tests/test_playbooks/tasks/activation_key.yml +++ b/tests/test_playbooks/tasks/activation_key.yml @@ -16,7 +16,6 @@ content_view: "{{ activation_key_content_view | default(omit) }}" content_view_environments: "{{ activation_key_content_view_environments | default(omit) }}" host_collections: "{{ activation_key_host_collections | default(omit) }}" - auto_attach: "{{ activation_key_auto_attach | default(omit) }}" release_version: "{{ activation_key_release_version | default(omit) }}" service_level: "{{ activation_key_service_level | default(omit) }}" max_hosts: "{{ activation_key_max_hosts | default(omit) }}"