From b5ffa61f6576f4853da4db0492bae99c3714f212 Mon Sep 17 00:00:00 2001 From: dosas Date: Mon, 24 Feb 2025 14:07:37 +0100 Subject: [PATCH] Add donwload cuncurrency for repository (#1272) (cherry picked from commit 9124db3fd422a8af1fffe3644d3776e3ce2d9e56) --- nailgun/entities.py | 2 ++ tests/test_entities.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nailgun/entities.py b/nailgun/entities.py index 8708accc..4292a8a5 100644 --- a/nailgun/entities.py +++ b/nailgun/entities.py @@ -6925,6 +6925,7 @@ def __init__(self, server_config=None, **kwargs): 'deb_releases': entity_fields.StringField(), 'deb_components': entity_fields.StringField(), 'deb_architectures': entity_fields.StringField(), + 'download_concurrency': entity_fields.IntegerField(), } if self._fields['content_type'].choices == 'yum': self._fields['download_policy'].required = True @@ -6995,6 +6996,7 @@ def read(self, entity=None, attrs=None, ignore=None, params=None): ignore.add('organization') ignore.add('upstream_password') ignore.add('mirror_on_sync') + ignore.add('download_concurrency') return super().read(entity, attrs, ignore, params) def create_missing(self): diff --git a/tests/test_entities.py b/tests/test_entities.py index 81048c2b..e0efd6f9 100644 --- a/tests/test_entities.py +++ b/tests/test_entities.py @@ -1284,7 +1284,10 @@ def test_ignore_arg_v1(self): {'discovery', 'remote_execution_proxy', 'subnet_parameters_attributes'}, ), (entities.Subscription, {'organization'}), - (entities.Repository, {'organization', 'upstream_password', 'mirror_on_sync'}), + ( + entities.Repository, + {'organization', 'upstream_password', 'mirror_on_sync', 'download_concurrency'}, + ), (entities.User, {'password'}), (entities.ScapContents, {'scap_file'}), (entities.TailoringFile, {'scap_file'}),