From 59599bcd8fe34afb494d1dbaaa4162cb4104bdc5 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 29 Apr 2022 09:47:46 +0200 Subject: [PATCH] repository - add support for ``mirroring_policy`` for Katello 4.4+ Fixes: #1388 --- .../1388-repository-mirroring_policy.yml | 2 ++ plugins/modules/repository.py | 18 ++++++++++++++++-- .../test_playbooks/fixtures/repository-15.yml | 4 ++-- .../test_playbooks/fixtures/repository-16.yml | 2 +- .../test_playbooks/fixtures/repository-17.yml | 2 +- .../fixtures/repository_deb-0.yml | 6 +++--- .../fixtures/repository_deb-1.yml | 2 +- .../fixtures/repository_deb-2.yml | 2 +- .../fixtures/repository_ostree-0.yml | 3 +-- 9 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 changelogs/fragments/1388-repository-mirroring_policy.yml diff --git a/changelogs/fragments/1388-repository-mirroring_policy.yml b/changelogs/fragments/1388-repository-mirroring_policy.yml new file mode 100644 index 0000000000..8fc5be9b78 --- /dev/null +++ b/changelogs/fragments/1388-repository-mirroring_policy.yml @@ -0,0 +1,2 @@ +minor_changes: + - repository - add support for ``mirroring_policy`` for Katello 4.4+ (https://github.com/theforeman/foreman-ansible-modules/issues/1388) diff --git a/plugins/modules/repository.py b/plugins/modules/repository.py index e69987a52b..368b808c26 100644 --- a/plugins/modules/repository.py +++ b/plugins/modules/repository.py @@ -131,9 +131,19 @@ mirror_on_sync: description: - toggle "mirror on sync" where the state of the repository mirrors that of the upstream repository at sync time - default: true + - This is deprecated with Katello 4.3 + - It has been superseeded by I(mirroring_policy=mirror_content_only) type: bool required: false + mirroring_policy: + description: + - Policy to set for mirroring content + - Supported since Katello 4.3 + type: str + choices: + - additive + - mirror_content_only + - mirror_complete verify_ssl_on_sync: description: - verify the upstream certifcates are signed by a trusted CA @@ -302,7 +312,8 @@ def main(): ssl_client_key=dict(type='entity', resource_type='content_credentials', scope=['organization'], no_log=False), download_policy=dict(choices=['background', 'immediate', 'on_demand']), download_concurrency=dict(type='int'), - mirror_on_sync=dict(type='bool', default=True), + mirror_on_sync=dict(type='bool'), + mirroring_policy=dict(type='str', choices=['additive', 'mirror_content_only', 'mirror_complete']), verify_ssl_on_sync=dict(type='bool'), upstream_username=dict(), upstream_password=dict(no_log=True), @@ -321,6 +332,9 @@ def main(): os_versions=dict(type='list', elements='str', choices=['rhel-6', 'rhel-7', 'rhel-8']), arch=dict(), ), + mutually_exclusive=[ + ['mirror_on_sync', 'mirroring_policy'] + ], argument_spec=dict( state=dict(default='present', choices=['present_with_defaults', 'present', 'absent']), ), diff --git a/tests/test_playbooks/fixtures/repository-15.yml b/tests/test_playbooks/fixtures/repository-15.yml index 67ed485aa1..93374f119b 100644 --- a/tests/test_playbooks/fixtures/repository-15.yml +++ b/tests/test_playbooks/fixtures/repository-15.yml @@ -238,7 +238,7 @@ interactions: - request: body: '{"name": "Test Docker Repository", "label": "just_a_test_repo", "product_id": 3, "content_type": "docker", "url": "https://docker.io", "docker_upstream_name": - "busybox", "docker_tags_whitelist": ["latest"], "mirror_on_sync": true}' + "busybox", "docker_tags_whitelist": ["latest"]}' headers: Accept: - application/json;version=2 @@ -262,7 +262,7 @@ interactions: Docker Repository","label":"just_a_test_repo","description":null,"last_sync":null,"content_view":{"id":2,"name":"Default Organization View"},"content_view_version":{"id":2,"name":"Default Organization View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1635329748351","major":null,"minor":null,"product":{"id":3,"cp_id":"542618974491","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"mirror_on_sync":true,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"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,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"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,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: diff --git a/tests/test_playbooks/fixtures/repository-16.yml b/tests/test_playbooks/fixtures/repository-16.yml index 42ecf89bdf..215f27359c 100644 --- a/tests/test_playbooks/fixtures/repository-16.yml +++ b/tests/test_playbooks/fixtures/repository-16.yml @@ -261,7 +261,7 @@ interactions: Docker Repository","label":"just_a_test_repo","description":null,"last_sync":null,"content_view":{"id":2,"name":"Default Organization View"},"content_view_version":{"id":2,"name":"Default Organization View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1635329748351","major":null,"minor":null,"product":{"id":3,"cp_id":"542618974491","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"mirror_on_sync":true,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"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,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false} + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"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,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: diff --git a/tests/test_playbooks/fixtures/repository-17.yml b/tests/test_playbooks/fixtures/repository-17.yml index 9707dd8b05..236859eac1 100644 --- a/tests/test_playbooks/fixtures/repository-17.yml +++ b/tests/test_playbooks/fixtures/repository-17.yml @@ -261,7 +261,7 @@ interactions: Docker Repository","label":"just_a_test_repo","description":null,"last_sync":null,"content_view":{"id":2,"name":"Default Organization View"},"content_view_version":{"id":2,"name":"Default Organization View 1.0","content_view_id":2},"kt_environment":{"id":2,"name":"Library"},"content_type":"docker","url":"https://docker.io","arch":"noarch","os_versions":null,"content_id":"1635329748351","major":null,"minor":null,"product":{"id":3,"cp_id":"542618974491","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"mirror_on_sync":true,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"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,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false} + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":"busybox","docker_tags_whitelist":["latest"],"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"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,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":null,"deb_components":null,"deb_architectures":null,"http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: diff --git a/tests/test_playbooks/fixtures/repository_deb-0.yml b/tests/test_playbooks/fixtures/repository_deb-0.yml index 29e4766f13..306133406e 100644 --- a/tests/test_playbooks/fixtures/repository_deb-0.yml +++ b/tests/test_playbooks/fixtures/repository_deb-0.yml @@ -238,8 +238,8 @@ interactions: message: OK - request: body: '{"name": "Test Debian Repository", "label": "just_a_test_repo3", "product_id": - 1, "content_type": "deb", "url": "https://ftp.debian.org", "mirror_on_sync": - true, "deb_releases": "buster", "deb_architectures": "i386"}' + 1, "content_type": "deb", "url": "https://ftp.debian.org", + "deb_releases": "buster", "deb_architectures": "i386"}' headers: Accept: - application/json;version=2 @@ -263,7 +263,7 @@ interactions: Debian Repository","label":"just_a_test_repo3","description":null,"last_sync":null,"content_view":{"id":4,"name":"Default Organization View"},"content_view_version":{"id":2,"name":"Default Organization View 1.0","content_view_id":4},"kt_environment":{"id":2,"name":"Library"},"content_type":"deb","url":"https://ftp.debian.org","arch":"noarch","content_id":"1605625167528","major":null,"minor":null,"product":{"id":1,"cp_id":"518635537281","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo3","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"puppet_module":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"mirror_on_sync":true,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"ansible_collection_requirements":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":"buster","deb_components":null,"deb_architectures":"i386","http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo3","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"puppet_module":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"ansible_collection_requirements":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":"buster","deb_components":null,"deb_architectures":"i386","http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]} ' headers: diff --git a/tests/test_playbooks/fixtures/repository_deb-1.yml b/tests/test_playbooks/fixtures/repository_deb-1.yml index d6f024c501..5bcd299726 100644 --- a/tests/test_playbooks/fixtures/repository_deb-1.yml +++ b/tests/test_playbooks/fixtures/repository_deb-1.yml @@ -262,7 +262,7 @@ interactions: Debian Repository","label":"just_a_test_repo3","description":null,"last_sync":null,"content_view":{"id":4,"name":"Default Organization View"},"content_view_version":{"id":2,"name":"Default Organization View 1.0","content_view_id":4},"kt_environment":{"id":2,"name":"Library"},"content_type":"deb","url":"https://ftp.debian.org","arch":"noarch","content_id":"1605625167528","major":null,"minor":null,"product":{"id":1,"cp_id":"518635537281","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo3","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"puppet_module":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"mirror_on_sync":true,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"ansible_collection_requirements":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":"buster","deb_components":null,"deb_architectures":"i386","http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false} + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo3","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"puppet_module":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"ansible_collection_requirements":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":"buster","deb_components":null,"deb_architectures":"i386","http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: diff --git a/tests/test_playbooks/fixtures/repository_deb-2.yml b/tests/test_playbooks/fixtures/repository_deb-2.yml index 158e4b4cf3..56c4d27e1f 100644 --- a/tests/test_playbooks/fixtures/repository_deb-2.yml +++ b/tests/test_playbooks/fixtures/repository_deb-2.yml @@ -262,7 +262,7 @@ interactions: Debian Repository","label":"just_a_test_repo3","description":null,"last_sync":null,"content_view":{"id":4,"name":"Default Organization View"},"content_view_version":{"id":2,"name":"Default Organization View 1.0","content_view_id":4},"kt_environment":{"id":2,"name":"Library"},"content_type":"deb","url":"https://ftp.debian.org","arch":"noarch","content_id":"1605625167528","major":null,"minor":null,"product":{"id":1,"cp_id":"518635537281","name":"Test - Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo3","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"puppet_module":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"mirror_on_sync":true,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"ansible_collection_requirements":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":"buster","deb_components":null,"deb_architectures":"i386","http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false} + Product","orphaned":false,"redhat":false,"sync_plan":null},"content_label":"Test_Organization_Test_Product_just_a_test_repo3","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"puppet_module":0,"file":0,"deb":0,"module_stream":0,"ansible_collection":0},"last_sync_words":null,"environment":{"id":2,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"ansible_collection_requirements":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":"buster","deb_components":null,"deb_architectures":"i386","http_proxy_policy":"global_default_http_proxy","http_proxy_id":null,"http_proxy_name":null,"ignorable_content":null,"gpg_key":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},"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false} ' headers: diff --git a/tests/test_playbooks/fixtures/repository_ostree-0.yml b/tests/test_playbooks/fixtures/repository_ostree-0.yml index 1146279f40..6d3e27c9af 100644 --- a/tests/test_playbooks/fixtures/repository_ostree-0.yml +++ b/tests/test_playbooks/fixtures/repository_ostree-0.yml @@ -238,8 +238,7 @@ interactions: message: OK - request: body: '{"name": "Test OStree Repository", "label": "just_a_test_repo_ostree", - "product_id": 4, "content_type": "ostree", "url": "https://fixtures.pulpproject.org/ostree/small/", - "mirror_on_sync": true}' + "product_id": 4, "content_type": "ostree", "url": "https://fixtures.pulpproject.org/ostree/small/"}' headers: Accept: - application/json;version=2