pulp-ansible 0.28.2__py3-none-any.whl → 0.29.0__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/migrations/0057_collectionversion_sha256_migrate.py +2 -2
- pulp_ansible/app/migrations/0062_pivot_collectionversion_tags.py +2 -2
- pulp_ansible/app/tasks/collections.py +20 -14
- pulp_ansible/app/tasks/git.py +11 -1
- pulp_ansible/app/tasks/roles.py +10 -1
- pulp_ansible/tests/functional/api/test_export_import.py +0 -1
- {pulp_ansible-0.28.2.dist-info → pulp_ansible-0.29.0.dist-info}/METADATA +3 -3
- {pulp_ansible-0.28.2.dist-info → pulp_ansible-0.29.0.dist-info}/RECORD +13 -13
- {pulp_ansible-0.28.2.dist-info → pulp_ansible-0.29.0.dist-info}/WHEEL +1 -1
- {pulp_ansible-0.28.2.dist-info → pulp_ansible-0.29.0.dist-info}/entry_points.txt +0 -0
- {pulp_ansible-0.28.2.dist-info → pulp_ansible-0.29.0.dist-info}/licenses/LICENSE +0 -0
- {pulp_ansible-0.28.2.dist-info → pulp_ansible-0.29.0.dist-info}/top_level.txt +0 -0
pulp_ansible/app/__init__.py
CHANGED
|
@@ -16,11 +16,11 @@ def add_sha256_to_current_models(apps, schema_editor):
|
|
|
16
16
|
|
|
17
17
|
for collection_version in (
|
|
18
18
|
CollectionVersion.objects.prefetch_related(
|
|
19
|
-
"
|
|
19
|
+
"contentartifact_set", "contentartifact_set__artifact"
|
|
20
20
|
)
|
|
21
21
|
.filter(sha256="")
|
|
22
22
|
.only("pk", "sha256")
|
|
23
|
-
.iterator()
|
|
23
|
+
.iterator(chunk_size=2000)
|
|
24
24
|
):
|
|
25
25
|
content_artifact = collection_version.contentartifact_set.get()
|
|
26
26
|
if content_artifact.artifact:
|
|
@@ -8,7 +8,7 @@ from pulpcore.plugin.migrations import RequireVersion
|
|
|
8
8
|
def migrate_missing_tags_up(apps, schema):
|
|
9
9
|
CollectionVersion = apps.get_model("ansible", "CollectionVersion")
|
|
10
10
|
cv_to_update = []
|
|
11
|
-
for cv in CollectionVersion.objects.filter(new_tags=None).
|
|
11
|
+
for cv in CollectionVersion.objects.filter(new_tags=None).prefetch_related("tags"):
|
|
12
12
|
cv.new_tags = [t.name for t in cv.tags.all()]
|
|
13
13
|
cv_to_update.append(cv)
|
|
14
14
|
if len(cv_to_update) >= 100:
|
|
@@ -23,7 +23,7 @@ def migrate_missing_tags_down(apps, schema):
|
|
|
23
23
|
# Also it's not optimized.
|
|
24
24
|
Tag = apps.get_model("ansible", "Tag")
|
|
25
25
|
CollectionVersion = apps.get_model("ansible", "CollectionVersion")
|
|
26
|
-
for cv in CollectionVersion.objects.filter(new_tags__len__gt=0)
|
|
26
|
+
for cv in CollectionVersion.objects.filter(new_tags__len__gt=0):
|
|
27
27
|
for tag_name in cv.new_tags:
|
|
28
28
|
tag, created = Tag.objects.get_or_create(name=tag_name)
|
|
29
29
|
cv.tags.add(tag)
|
|
@@ -77,6 +77,13 @@ from pulp_ansible.app.tasks.utils import (
|
|
|
77
77
|
parse_metadata,
|
|
78
78
|
)
|
|
79
79
|
|
|
80
|
+
|
|
81
|
+
try:
|
|
82
|
+
from pulpcore.plugin.serializers import RepositoryVersionSerializer
|
|
83
|
+
except ImportError:
|
|
84
|
+
RepositoryVersionSerializer = None
|
|
85
|
+
|
|
86
|
+
|
|
80
87
|
log = logging.getLogger(__name__)
|
|
81
88
|
|
|
82
89
|
aget_url = sync_to_async(get_url)
|
|
@@ -215,26 +222,25 @@ def sync(remote_pk, repository_pk, mirror, optimize):
|
|
|
215
222
|
remote = CollectionRemote.objects.get(pk=remote_pk)
|
|
216
223
|
repository = AnsibleRepository.objects.get(pk=repository_pk)
|
|
217
224
|
|
|
218
|
-
is_repo_remote =
|
|
219
|
-
if repository.remote:
|
|
220
|
-
is_repo_remote = remote.pk == repository.remote.pk
|
|
225
|
+
is_repo_remote = repository.remote is not None and remote.pk == repository.remote.pk
|
|
221
226
|
|
|
222
227
|
if not remote.url:
|
|
223
228
|
raise ValueError(_("A CollectionRemote must have a 'url' specified to synchronize."))
|
|
224
229
|
|
|
225
230
|
first_stage = CollectionSyncFirstStage(remote, repository, is_repo_remote, optimize)
|
|
226
|
-
if first_stage.should_sync
|
|
231
|
+
if first_stage.should_sync:
|
|
232
|
+
d_version = AnsibleDeclarativeVersion(first_stage, repository, mirror=mirror)
|
|
233
|
+
repository_version = d_version.create()
|
|
234
|
+
|
|
235
|
+
if repository_version is not None:
|
|
236
|
+
repository.last_synced_metadata_time = first_stage.last_synced_metadata_time
|
|
237
|
+
repository.save(update_fields=["last_synced_metadata_time"])
|
|
238
|
+
if RepositoryVersionSerializer is not None:
|
|
239
|
+
return RepositoryVersionSerializer(
|
|
240
|
+
instance=repository_version, context={"request": None}
|
|
241
|
+
).data
|
|
242
|
+
else:
|
|
227
243
|
log.debug(_("no-op: remote wasn't updated since last sync."))
|
|
228
|
-
return
|
|
229
|
-
|
|
230
|
-
d_version = AnsibleDeclarativeVersion(first_stage, repository, mirror=mirror)
|
|
231
|
-
repo_version = d_version.create()
|
|
232
|
-
|
|
233
|
-
if not repo_version:
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
repository.last_synced_metadata_time = first_stage.last_synced_metadata_time
|
|
237
|
-
repository.save(update_fields=["last_synced_metadata_time"])
|
|
238
244
|
|
|
239
245
|
|
|
240
246
|
def import_collection(
|
pulp_ansible/app/tasks/git.py
CHANGED
|
@@ -18,6 +18,12 @@ from pulp_ansible.app.tasks.collections import (
|
|
|
18
18
|
AnsibleContentSaver,
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
+
try:
|
|
22
|
+
from pulpcore.plugin.serializers import RepositoryVersionSerializer
|
|
23
|
+
except ImportError:
|
|
24
|
+
RepositoryVersionSerializer = None
|
|
25
|
+
|
|
26
|
+
|
|
21
27
|
log = logging.getLogger(__name__)
|
|
22
28
|
|
|
23
29
|
|
|
@@ -47,7 +53,11 @@ def synchronize(remote_pk, repository_pk, mirror=False):
|
|
|
47
53
|
)
|
|
48
54
|
first_stage = GitFirstStage(remote)
|
|
49
55
|
d_version = GitDeclarativeVersion(first_stage, repository, mirror=mirror)
|
|
50
|
-
|
|
56
|
+
repository_version = d_version.create()
|
|
57
|
+
if RepositoryVersionSerializer is not None and repository_version:
|
|
58
|
+
return RepositoryVersionSerializer(
|
|
59
|
+
instance=repository_version, context={"request": None}
|
|
60
|
+
).data
|
|
51
61
|
|
|
52
62
|
|
|
53
63
|
class GitDeclarativeVersion(DeclarativeVersion):
|
pulp_ansible/app/tasks/roles.py
CHANGED
|
@@ -16,6 +16,11 @@ from pulp_ansible.app.constants import PAGE_SIZE
|
|
|
16
16
|
from pulp_ansible.app.models import AnsibleRepository, RoleRemote, Role
|
|
17
17
|
from pulp_ansible.app.tasks.utils import get_api_version, get_page_url, parse_metadata
|
|
18
18
|
|
|
19
|
+
try:
|
|
20
|
+
from pulpcore.plugin.serializers import RepositoryVersionSerializer
|
|
21
|
+
except ImportError:
|
|
22
|
+
RepositoryVersionSerializer = None
|
|
23
|
+
|
|
19
24
|
|
|
20
25
|
log = logging.getLogger(__name__)
|
|
21
26
|
|
|
@@ -50,7 +55,11 @@ def synchronize(remote_pk, repository_pk, mirror=False):
|
|
|
50
55
|
)
|
|
51
56
|
first_stage = RoleFirstStage(remote)
|
|
52
57
|
d_version = DeclarativeVersion(first_stage, repository, mirror=mirror)
|
|
53
|
-
|
|
58
|
+
repository_version = d_version.create()
|
|
59
|
+
if RepositoryVersionSerializer is not None and repository_version:
|
|
60
|
+
return RepositoryVersionSerializer(
|
|
61
|
+
instance=repository_version, context={"request": None}
|
|
62
|
+
).data
|
|
54
63
|
|
|
55
64
|
|
|
56
65
|
class RoleFirstStage(Stage):
|
|
@@ -18,7 +18,6 @@ from pulp_ansible.tests.functional.constants import ANSIBLE_FIXTURE_URL
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
pytestmark = [
|
|
21
|
-
pytest.mark.skipif(settings.DOMAIN_ENABLED, reason="Domains do not support export."),
|
|
22
21
|
pytest.mark.skipif(
|
|
23
22
|
"/tmp" not in settings.ALLOWED_EXPORT_PATHS,
|
|
24
23
|
reason="Cannot run export-tests unless /tmp is in ALLOWED_EXPORT_PATHS "
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pulp-ansible
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.29.0
|
|
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
|
|
@@ -20,8 +20,8 @@ License-File: LICENSE
|
|
|
20
20
|
Requires-Dist: galaxy_importer<0.5,>=0.4.27
|
|
21
21
|
Requires-Dist: GitPython<3.2,>=3.1.24
|
|
22
22
|
Requires-Dist: jsonschema<4.26,>=4.9
|
|
23
|
-
Requires-Dist: Pillow<
|
|
24
|
-
Requires-Dist: pulpcore<3.
|
|
23
|
+
Requires-Dist: Pillow<12.2,>=10.3
|
|
24
|
+
Requires-Dist: pulpcore<3.115,>=3.63.0
|
|
25
25
|
Requires-Dist: PyYAML<7.0,>=6.0.2
|
|
26
26
|
Requires-Dist: semantic_version<2.11,>=2.9
|
|
27
27
|
Dynamic: license-file
|
|
@@ -1,6 +1,6 @@
|
|
|
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=xw4jPTbBAoiC7aKH-BnvyGco4cjpfyM-1km2T9WXaYg,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
|
|
@@ -84,12 +84,12 @@ pulp_ansible/app/migrations/0053_collectiondownloadcount.py,sha256=XK3FJf2P9XX7i
|
|
|
84
84
|
pulp_ansible/app/migrations/0054_split_collection_version_numbers.py,sha256=QdJkJ48A_ZcgD2WyyRrAdPMmQe8OWkEgs4FtMFa-rDg,2369
|
|
85
85
|
pulp_ansible/app/migrations/0055_alter_collectionversion_version_alter_role_version.py,sha256=g_4p81Owqi6sY0-KAv_mSPya1MNlj8pbJkMpHZ4hLpc,904
|
|
86
86
|
pulp_ansible/app/migrations/0056_collectionversion_sha256.py,sha256=6gLDAEcULJag1_L3jpbmrA42EeP5wsWhlq0VALK_Lpg,487
|
|
87
|
-
pulp_ansible/app/migrations/0057_collectionversion_sha256_migrate.py,sha256=
|
|
87
|
+
pulp_ansible/app/migrations/0057_collectionversion_sha256_migrate.py,sha256=MoMVQ2wnSmJqu826yqCKf3VGXmJCCiAXbUluWO8wMAY,2414
|
|
88
88
|
pulp_ansible/app/migrations/0058_fix_0056_regression.py,sha256=VTmiG_VlpC6wXb4R28TDC4rbd1KLTuPItgzcrq0R28w,1021
|
|
89
89
|
pulp_ansible/app/migrations/0059_collectionversion_unique_sha256.py,sha256=_4MAElCkv5OUjv7v9eL43h9PhtLl85vOfMiTZKEGD-Q,1291
|
|
90
90
|
pulp_ansible/app/migrations/0060_remove_collectionversion_unique_is_highest_and_more.py,sha256=GDaBq6YPznAxjObBmP3YRHsdUtUjTAHpnShpkICe9J8,586
|
|
91
91
|
pulp_ansible/app/migrations/0061_collectionversion_new_tags.py,sha256=Hkf5oaJU7N-LQGi7IFXIx_SSx-FatS1kKYOfFEMCzlc,655
|
|
92
|
-
pulp_ansible/app/migrations/0062_pivot_collectionversion_tags.py,sha256=
|
|
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
95
|
pulp_ansible/app/migrations/0065_collectionversion_ansible_col_namespa_ea6f75_idx.py,sha256=MCqN5w59xqke3z7Kq7elvG_JWFvE5GP5K2whyECxpoQ,483
|
|
@@ -97,13 +97,13 @@ pulp_ansible/app/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
|
97
97
|
pulp_ansible/app/schema/__init__.py,sha256=eGi2QVJ0kJgXwiDNjQsvqWDSr3EA8TFqFZATTY8xwT8,207
|
|
98
98
|
pulp_ansible/app/schema/copy_config.json,sha256=AJz8riON7_rh-L7jM5iev2Imc5UKjlNvGfwF7KrFH7Y,568
|
|
99
99
|
pulp_ansible/app/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
|
-
pulp_ansible/app/tasks/collections.py,sha256=
|
|
100
|
+
pulp_ansible/app/tasks/collections.py,sha256=NrYz79x_woRJOXzpEnNj8xPngLNkPykUIO9RMbbVKxQ,51048
|
|
101
101
|
pulp_ansible/app/tasks/collectionversion_index.py,sha256=_cnQeWRpFXrreTJM9aaEc2HuknTksZa0lLZ7XUfmQ_c,9401
|
|
102
102
|
pulp_ansible/app/tasks/copy.py,sha256=dO_DnLT5hck6GpZomEHurrDHJM0Wkh2B0_wgHHOtbuY,5563
|
|
103
103
|
pulp_ansible/app/tasks/deletion.py,sha256=f-VNTMzDMQiJpCLN34fY5gwhAGlh3RACj4VWc_tOaP0,3579
|
|
104
|
-
pulp_ansible/app/tasks/git.py,sha256=
|
|
104
|
+
pulp_ansible/app/tasks/git.py,sha256=GjkEWH-SnBHHTWOhZjRVIMDG8KhrGBJ1E41ba74Ngpo,3340
|
|
105
105
|
pulp_ansible/app/tasks/mark.py,sha256=yO1a_jPAC-Um5ZsTr0J6HGR1lBm0XcGV5SOu2iEsvJw,2292
|
|
106
|
-
pulp_ansible/app/tasks/roles.py,sha256=
|
|
106
|
+
pulp_ansible/app/tasks/roles.py,sha256=ohieaXY4DRyw5mzYyem8s42P53fgc165uz5g3SUiY90,5854
|
|
107
107
|
pulp_ansible/app/tasks/signature.py,sha256=JxMNcOS24Mug8RL1eNlObsZZi4plDJDwac32aSobzhk,7497
|
|
108
108
|
pulp_ansible/app/tasks/test_tasks.py,sha256=GkUH7MwwsT-rTtEbvv7UjQyvT7ZrWehb2sO1xgUqGVc,6978
|
|
109
109
|
pulp_ansible/app/tasks/upload.py,sha256=X6lnQoKVlyOlb_hDMkOBc4oqxVqLeTtA-Q0mxrfxC9A,2972
|
|
@@ -117,7 +117,7 @@ pulp_ansible/tests/functional/constants.py,sha256=FFcqEvmHWruxdogf4uCFG2EjukLbzT
|
|
|
117
117
|
pulp_ansible/tests/functional/utils.py,sha256=R-AtOclbV7WVmq4XhPdmWi7mgy3wmw_DK76uOCP_0KI,945
|
|
118
118
|
pulp_ansible/tests/functional/api/__init__.py,sha256=Ta9oLgSwgsaC_7uiGBrJqduMwckzRv-W_Rfcl9UOZNY,65
|
|
119
119
|
pulp_ansible/tests/functional/api/test_domain.py,sha256=a6MfKkk-9u77iViGX9F-lgkogyy56jAvZlygbYRknUM,2368
|
|
120
|
-
pulp_ansible/tests/functional/api/test_export_import.py,sha256=
|
|
120
|
+
pulp_ansible/tests/functional/api/test_export_import.py,sha256=kow9_CxMEpVgAetb69gFhgQlYgWO6PzJhwJdvloXjIs,7972
|
|
121
121
|
pulp_ansible/tests/functional/api/test_rbac.py,sha256=amzg4CK_JXhKe_cK5KBNQRdnNGNT7AG1_PPj9cC83cg,19362
|
|
122
122
|
pulp_ansible/tests/functional/api/collection/__init__.py,sha256=pSlDs09OjDZCGKAf_SttWeyiCUXT-Fady4ywZ9sppQo,74
|
|
123
123
|
pulp_ansible/tests/functional/api/collection/test_copy_and_move.py,sha256=Oih3fMcLIh9ZRspO-Wz3BQ0GhomRXRhzVv-8bqchj20,10094
|
|
@@ -167,9 +167,9 @@ pulp_ansible/tests/unit/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
|
167
167
|
pulp_ansible/tests/unit/migrations/conftest.py,sha256=61n56aJuwEuAcUS27xnmnEDx6Ie7M5zxh851doWm7Ok,438
|
|
168
168
|
pulp_ansible/tests/unit/migrations/test_0057_collection_version_sha256_migrate.py,sha256=NmU-frZNO1qHvhdxfw-bwPTEkqN4Wdc3dEs9dWME47o,2174
|
|
169
169
|
pulp_ansible/tests/unit/migrations/test_x_repo_search_migration.py,sha256=IrC_V_Gss4nqhkdL-60upcEzGcz8IsiI2d-MfUtFY-g,657
|
|
170
|
-
pulp_ansible-0.
|
|
171
|
-
pulp_ansible-0.
|
|
172
|
-
pulp_ansible-0.
|
|
173
|
-
pulp_ansible-0.
|
|
174
|
-
pulp_ansible-0.
|
|
175
|
-
pulp_ansible-0.
|
|
170
|
+
pulp_ansible-0.29.0.dist-info/licenses/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
|
|
171
|
+
pulp_ansible-0.29.0.dist-info/METADATA,sha256=ur14hgLaB6xqC_-G_9Syt4hm_nVeIqryglCGy4XhFRE,3125
|
|
172
|
+
pulp_ansible-0.29.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
173
|
+
pulp_ansible-0.29.0.dist-info/entry_points.txt,sha256=6PFqCdT7Yn7U5MlioYRsyyWbJDcZI2aAJuzc7yXHqGk,119
|
|
174
|
+
pulp_ansible-0.29.0.dist-info/top_level.txt,sha256=5Rrg5DSM_F9wH8vu8Fxjb5EmroC-I8RVKp05fhXH6kQ,13
|
|
175
|
+
pulp_ansible-0.29.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|