pulp-ansible 0.27.1__py3-none-any.whl → 0.28.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulp_ansible/app/__init__.py +1 -1
- pulp_ansible/app/galaxy/v3/filters.py +1 -3
- pulp_ansible/app/migrations/0065_collectionversion_ansible_col_namespa_ea6f75_idx.py +19 -0
- pulp_ansible/app/models.py +3 -0
- pulp_ansible/app/tasks/collections.py +23 -3
- {pulp_ansible-0.27.1.dist-info → pulp_ansible-0.28.1.dist-info}/METADATA +7 -9
- {pulp_ansible-0.27.1.dist-info → pulp_ansible-0.28.1.dist-info}/RECORD +11 -10
- {pulp_ansible-0.27.1.dist-info → pulp_ansible-0.28.1.dist-info}/WHEEL +0 -0
- {pulp_ansible-0.27.1.dist-info → pulp_ansible-0.28.1.dist-info}/entry_points.txt +0 -0
- {pulp_ansible-0.27.1.dist-info → pulp_ansible-0.28.1.dist-info}/licenses/LICENSE +0 -0
- {pulp_ansible-0.27.1.dist-info → pulp_ansible-0.28.1.dist-info}/top_level.txt +0 -0
pulp_ansible/app/__init__.py
CHANGED
|
@@ -187,6 +187,4 @@ class CollectionVersionSearchFilter(FilterSet):
|
|
|
187
187
|
Returns:
|
|
188
188
|
Queryset of CollectionVersion that matches all tags
|
|
189
189
|
"""
|
|
190
|
-
|
|
191
|
-
qs = qs.filter(collection_version__tags__name=tag)
|
|
192
|
-
return qs
|
|
190
|
+
return qs.filter(collection_version__tags__contains=value.split(","))
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Generated by Django 4.2.22 on 2025-07-09 10:53
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
("ansible", "0064_alter_collection_unique_together_and_more"),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddIndex(
|
|
14
|
+
model_name="collectionversion",
|
|
15
|
+
index=models.Index(
|
|
16
|
+
fields=["namespace", "name", "version"], name="ansible_col_namespa_ea6f75_idx"
|
|
17
|
+
),
|
|
18
|
+
),
|
|
19
|
+
]
|
pulp_ansible/app/models.py
CHANGED
|
@@ -215,6 +215,9 @@ class CollectionVersion(Content):
|
|
|
215
215
|
class Meta:
|
|
216
216
|
default_related_name = "%(app_label)s_%(model_name)s"
|
|
217
217
|
unique_together = ("sha256", "_pulp_domain")
|
|
218
|
+
indexes = [
|
|
219
|
+
models.Index(fields=["namespace", "name", "version"]),
|
|
220
|
+
]
|
|
218
221
|
|
|
219
222
|
|
|
220
223
|
class CollectionVersionMark(Content):
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import functools
|
|
2
3
|
import hashlib
|
|
3
4
|
import json
|
|
4
5
|
import logging
|
|
@@ -13,7 +14,6 @@ import tempfile
|
|
|
13
14
|
import yaml
|
|
14
15
|
from aiohttp.client_exceptions import ClientError, ClientResponseError
|
|
15
16
|
from asgiref.sync import sync_to_async
|
|
16
|
-
from async_lru import alru_cache
|
|
17
17
|
from django.db import transaction
|
|
18
18
|
from django.db.models import Q
|
|
19
19
|
from django.db.utils import IntegrityError
|
|
@@ -82,6 +82,26 @@ log = logging.getLogger(__name__)
|
|
|
82
82
|
aget_url = sync_to_async(get_url)
|
|
83
83
|
|
|
84
84
|
|
|
85
|
+
def async_cache(f):
|
|
86
|
+
# A simple implementation for caching an async function with hashable arguments.
|
|
87
|
+
_cache = {}
|
|
88
|
+
|
|
89
|
+
@functools.wraps(f)
|
|
90
|
+
async def _wrapped_f(*args):
|
|
91
|
+
try:
|
|
92
|
+
return _cache[args]
|
|
93
|
+
except KeyError:
|
|
94
|
+
result = await f(*args)
|
|
95
|
+
_cache[args] = result
|
|
96
|
+
if len(_cache) > 128:
|
|
97
|
+
# This is a bit ad hoc and will give fifo instead of lru behaviour.
|
|
98
|
+
# I doubt it even makes a difference here.
|
|
99
|
+
_cache.pop(next(iter(_cache.keys())))
|
|
100
|
+
return result
|
|
101
|
+
|
|
102
|
+
return _wrapped_f
|
|
103
|
+
|
|
104
|
+
|
|
85
105
|
# semantic_version.SimpleSpec interpretes "*" as ">=0.0.0"
|
|
86
106
|
class AnsibleSpec(SimpleSpec):
|
|
87
107
|
def __init__(self, expression):
|
|
@@ -539,7 +559,7 @@ class CollectionSyncFirstStage(Stage):
|
|
|
539
559
|
self._should_we_sync()
|
|
540
560
|
)
|
|
541
561
|
|
|
542
|
-
@
|
|
562
|
+
@async_cache
|
|
543
563
|
async def _get_root_api(self, root):
|
|
544
564
|
"""
|
|
545
565
|
Returns the root api path and api version.
|
|
@@ -575,7 +595,7 @@ class CollectionSyncFirstStage(Stage):
|
|
|
575
595
|
|
|
576
596
|
return endpoint, api_version
|
|
577
597
|
|
|
578
|
-
@
|
|
598
|
+
@async_cache
|
|
579
599
|
async def _get_paginated_collection_api(self, root):
|
|
580
600
|
"""
|
|
581
601
|
Returns the collection api path and api version.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pulp-ansible
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.28.1
|
|
4
4
|
Summary: Pulp plugin to manage Ansible content, e.g. roles
|
|
5
5
|
Author-email: Pulp Ansible Plugin Project Developers <pulp-dev@redhat.com>
|
|
6
6
|
Project-URL: Homepage, https://pulpproject.org
|
|
@@ -14,17 +14,15 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
14
14
|
Classifier: Framework :: Django
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
|
|
18
|
-
Requires-Python: >=3.9
|
|
17
|
+
Requires-Python: >=3.11
|
|
19
18
|
Description-Content-Type: text/x-rst
|
|
20
19
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist:
|
|
22
|
-
Requires-Dist: galaxy_importer<0.5,>=0.4.5
|
|
20
|
+
Requires-Dist: galaxy_importer<0.5,>=0.4.27
|
|
23
21
|
Requires-Dist: GitPython<3.2,>=3.1.24
|
|
24
|
-
Requires-Dist: jsonschema<4.
|
|
25
|
-
Requires-Dist: Pillow<11.
|
|
26
|
-
Requires-Dist: pulpcore<3.
|
|
27
|
-
Requires-Dist: PyYAML<7.0,>=
|
|
22
|
+
Requires-Dist: jsonschema<4.26,>=4.9
|
|
23
|
+
Requires-Dist: Pillow<11.4,>=10.3
|
|
24
|
+
Requires-Dist: pulpcore<3.100,>=3.63.0
|
|
25
|
+
Requires-Dist: PyYAML<7.0,>=6.0.2
|
|
28
26
|
Requires-Dist: semantic_version<2.11,>=2.9
|
|
29
27
|
Dynamic: license-file
|
|
30
28
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
pulp_ansible/__init__.py,sha256=WXL3JyOZzh4tALN4OBNgqj412O2LXVr8iYSn14Av0_o,67
|
|
2
2
|
pulp_ansible/pytest_plugin.py,sha256=hi9crI7QGghXCItNx27pW6KoXMzZqhAqAUstpJrsmlA,9105
|
|
3
|
-
pulp_ansible/app/__init__.py,sha256=
|
|
3
|
+
pulp_ansible/app/__init__.py,sha256=fWVAEE6eDIn22Kvy7rtYgrIGgNQ3esEpVdawce8Ion4,308
|
|
4
4
|
pulp_ansible/app/constants.py,sha256=cRrWMbJU-v1nCY2CjmGTOFGzz5aggn4ZKIs4-zeYADQ,78
|
|
5
5
|
pulp_ansible/app/downloaders.py,sha256=0xrAXzhTMJ6ywvs6XyYNAKvRzYb_UZR6A5_WgaHvuiE,8331
|
|
6
6
|
pulp_ansible/app/fields.py,sha256=yV3FL-47K-nxbiBxgzWi1hk3tfLsRdgic59LiwT2Fvs,624
|
|
7
7
|
pulp_ansible/app/global_access_conditions.py,sha256=ayV_LbQIa4ReuDYQycdDY7WysfGk-e0gbuDGhAQFWyY,1235
|
|
8
8
|
pulp_ansible/app/logutils.py,sha256=My4XivZMYLKeJqPHFwk3pIZSGlspALhI93vZxwWzlSY,846
|
|
9
9
|
pulp_ansible/app/modelresource.py,sha256=fJ_njrSWdftFQpA54e6mdoIWG_zqBjpp2TkkyU8Y7D4,7181
|
|
10
|
-
pulp_ansible/app/models.py,sha256=
|
|
10
|
+
pulp_ansible/app/models.py,sha256=CrEcVxQUlb6V_d9l7_as7_Gi6TrBuJ_xJLhFCR_5jew,22709
|
|
11
11
|
pulp_ansible/app/serializers.py,sha256=5_NM1tpMLrZ2QsNCWanaHhscGCS_QDLubXCTh5xwm8E,35981
|
|
12
12
|
pulp_ansible/app/settings.py,sha256=ArDsI7VezOpKM9iFqxXb6VmEDOtRUS5lfB_oklkcxds,1244
|
|
13
13
|
pulp_ansible/app/urls.py,sha256=gpMqsYPgHfc_6-EySR9ezUnI1F5yklzOVlSz9nlppmY,8697
|
|
@@ -19,7 +19,7 @@ pulp_ansible/app/galaxy/serializers.py,sha256=47ORFSvPxBBjii5Y2_0EaoNJFMlKVOwFZd
|
|
|
19
19
|
pulp_ansible/app/galaxy/views.py,sha256=imf5_XWbp-8i_9xmw009kk8GaMijq4hkdOxXq-Kh9eo,3639
|
|
20
20
|
pulp_ansible/app/galaxy/v3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
pulp_ansible/app/galaxy/v3/exceptions.py,sha256=uKTj_LteLusc9Wu0iSYO-U8Gq9UK1eVRXaxmQ1no3gA,1800
|
|
22
|
-
pulp_ansible/app/galaxy/v3/filters.py,sha256=
|
|
22
|
+
pulp_ansible/app/galaxy/v3/filters.py,sha256=XW39dC4N531Rlkhof5a-MDqxU2gFAkKWG3eeuIe02FY,8047
|
|
23
23
|
pulp_ansible/app/galaxy/v3/pagination.py,sha256=FhFKtPfljjmKrnB_EWz7FxAhKPX9gkuvbOx-2KU9V4Y,4042
|
|
24
24
|
pulp_ansible/app/galaxy/v3/serializers.py,sha256=VV2p-gLHKy0EnRBsblPga2Lcn9fLp5qp_7rhlaAlDmY,13364
|
|
25
25
|
pulp_ansible/app/galaxy/v3/views.py,sha256=PJyK85cqLPRXVXY8B-shKGIh93mpnWONH1PplAD6MWM,47750
|
|
@@ -92,11 +92,12 @@ pulp_ansible/app/migrations/0061_collectionversion_new_tags.py,sha256=Hkf5oaJU7N
|
|
|
92
92
|
pulp_ansible/app/migrations/0062_pivot_collectionversion_tags.py,sha256=Jn8PElX_f8x_5VYc525Kj-cd-17_GHPdop8-65rYPBk,4875
|
|
93
93
|
pulp_ansible/app/migrations/0063_domain_support.py,sha256=jms2LMvIvF7dXbIIoSH3u5XNMbRn8aK5Kkc3CQznem8,4044
|
|
94
94
|
pulp_ansible/app/migrations/0064_alter_collection_unique_together_and_more.py,sha256=sXzRG3BGVHuDcfuPjHIKIbmDqMgGDs5tCpkmKwY-JL8,2158
|
|
95
|
+
pulp_ansible/app/migrations/0065_collectionversion_ansible_col_namespa_ea6f75_idx.py,sha256=MCqN5w59xqke3z7Kq7elvG_JWFvE5GP5K2whyECxpoQ,483
|
|
95
96
|
pulp_ansible/app/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
97
|
pulp_ansible/app/schema/__init__.py,sha256=eGi2QVJ0kJgXwiDNjQsvqWDSr3EA8TFqFZATTY8xwT8,207
|
|
97
98
|
pulp_ansible/app/schema/copy_config.json,sha256=AJz8riON7_rh-L7jM5iev2Imc5UKjlNvGfwF7KrFH7Y,568
|
|
98
99
|
pulp_ansible/app/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
99
|
-
pulp_ansible/app/tasks/collections.py,sha256=
|
|
100
|
+
pulp_ansible/app/tasks/collections.py,sha256=aP0o-DTzlkHXZMn-uASwHrld6pVBztErTR-ErKeid6g,50672
|
|
100
101
|
pulp_ansible/app/tasks/collectionversion_index.py,sha256=_cnQeWRpFXrreTJM9aaEc2HuknTksZa0lLZ7XUfmQ_c,9401
|
|
101
102
|
pulp_ansible/app/tasks/copy.py,sha256=dO_DnLT5hck6GpZomEHurrDHJM0Wkh2B0_wgHHOtbuY,5563
|
|
102
103
|
pulp_ansible/app/tasks/deletion.py,sha256=f-VNTMzDMQiJpCLN34fY5gwhAGlh3RACj4VWc_tOaP0,3579
|
|
@@ -166,9 +167,9 @@ pulp_ansible/tests/unit/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
|
166
167
|
pulp_ansible/tests/unit/migrations/conftest.py,sha256=61n56aJuwEuAcUS27xnmnEDx6Ie7M5zxh851doWm7Ok,438
|
|
167
168
|
pulp_ansible/tests/unit/migrations/test_0057_collection_version_sha256_migrate.py,sha256=NmU-frZNO1qHvhdxfw-bwPTEkqN4Wdc3dEs9dWME47o,2174
|
|
168
169
|
pulp_ansible/tests/unit/migrations/test_x_repo_search_migration.py,sha256=IrC_V_Gss4nqhkdL-60upcEzGcz8IsiI2d-MfUtFY-g,657
|
|
169
|
-
pulp_ansible-0.
|
|
170
|
-
pulp_ansible-0.
|
|
171
|
-
pulp_ansible-0.
|
|
172
|
-
pulp_ansible-0.
|
|
173
|
-
pulp_ansible-0.
|
|
174
|
-
pulp_ansible-0.
|
|
170
|
+
pulp_ansible-0.28.1.dist-info/licenses/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
|
|
171
|
+
pulp_ansible-0.28.1.dist-info/METADATA,sha256=4D1uj12SJ7hS60hxgGxODb-6_C44NytkLEA7OMgkkoc,3125
|
|
172
|
+
pulp_ansible-0.28.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
173
|
+
pulp_ansible-0.28.1.dist-info/entry_points.txt,sha256=6PFqCdT7Yn7U5MlioYRsyyWbJDcZI2aAJuzc7yXHqGk,119
|
|
174
|
+
pulp_ansible-0.28.1.dist-info/top_level.txt,sha256=5Rrg5DSM_F9wH8vu8Fxjb5EmroC-I8RVKp05fhXH6kQ,13
|
|
175
|
+
pulp_ansible-0.28.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|