Skip to content

Commit

Permalink
Add donwload cuncurrency for repository (#1272)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9124db3)
  • Loading branch information
dosas authored and web-flow committed Feb 24, 2025
1 parent b58a3a4 commit b5ffa61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nailgun/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
5 changes: 4 additions & 1 deletion tests/test_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'}),
Expand Down

0 comments on commit b5ffa61

Please sign in to comment.