pulpcore 3.84.0__py3-none-any.whl → 3.85.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.
Potentially problematic release.
This version of pulpcore might be problematic. Click here for more details.
- pulp_certguard/app/__init__.py +1 -1
- pulp_certguard/app/models.py +7 -26
- pulp_certguard/app/serializers.py +0 -2
- pulp_certguard/rhsm/__init__.py +4 -0
- pulp_certguard/rhsm/rhsm_check_path.py +198 -0
- pulp_certguard/tests/unit/certdata.py +249 -0
- pulp_certguard/tests/unit/test_rhsm_check_path.py +213 -0
- pulp_file/app/__init__.py +1 -1
- pulp_file/app/migrations/0001_initial_squashed_0016_add_domain.py +0 -20
- pulp_file/app/migrations/0017_alter_filealternatecontentsource_alternatecontentsource_ptr_and_more.py +1 -1
- pulpcore/app/apps.py +2 -12
- pulpcore/app/entrypoint.py +22 -22
- pulpcore/app/migrations/0001_squashed_0090_char_to_text_field.py +0 -95
- pulpcore/app/migrations/0091_systemid.py +1 -1
- pulp_file/app/migrations/0006_delete_filefilesystemexporter.py → pulpcore/app/migrations/0136_delete_basedistribution.py +3 -3
- pulpcore/app/migrations/0137_appstatus.py +33 -0
- pulpcore/app/migrations/0138_vulnerabilityreport.py +33 -0
- pulpcore/app/models/__init__.py +4 -1
- pulpcore/app/models/publication.py +0 -41
- pulpcore/app/models/status.py +145 -0
- pulpcore/app/models/task.py +1 -0
- pulpcore/app/models/vulnerability_report.py +34 -0
- pulpcore/app/serializers/__init__.py +1 -0
- pulpcore/app/serializers/content.py +13 -1
- pulpcore/app/serializers/repository.py +8 -1
- pulpcore/app/serializers/vulnerability_report.py +27 -0
- pulpcore/app/settings.py +14 -47
- pulpcore/app/tasks/__init__.py +2 -0
- pulpcore/app/tasks/vulnerability_report.py +159 -0
- pulpcore/app/viewsets/__init__.py +1 -0
- pulpcore/app/viewsets/vulnerability_report.py +20 -0
- pulpcore/constants.py +4 -0
- pulpcore/content/__init__.py +23 -22
- pulpcore/content/handler.py +5 -2
- pulpcore/migrations.py +38 -11
- pulpcore/openapi/__init__.py +8 -0
- pulpcore/plugin/models/__init__.py +2 -0
- pulpcore/plugin/serializers/__init__.py +2 -0
- pulpcore/plugin/tasking.py +2 -0
- pulpcore/plugin/viewsets/__init__.py +2 -0
- pulpcore/pytest_plugin.py +21 -21
- pulpcore/tasking/worker.py +38 -35
- pulpcore/tests/functional/api/test_auth.py +18 -3
- pulpcore/tests/functional/api/test_openapi_schema.py +32 -15
- pulpcore/tests/functional/api/using_plugin/test_checkpoint.py +23 -1
- pulpcore/tests/functional/api/using_plugin/test_proxy.py +1 -1
- pulpcore/tests/unit/content/test_heartbeat.py +11 -8
- pulpcore/tests/unit/test_vulnerability_report.py +74 -0
- {pulpcore-3.84.0.dist-info → pulpcore-3.85.0.dist-info}/METADATA +12 -17
- {pulpcore-3.84.0.dist-info → pulpcore-3.85.0.dist-info}/RECORD +54 -152
- pulp_certguard/app/utils.py +0 -28
- pulp_certguard/tests/unit/test_models.py +0 -9
- pulp_file/app/migrations/0001_initial.py +0 -59
- pulp_file/app/migrations/0002_file_related_names.py +0 -55
- pulp_file/app/migrations/0003_auto_20191014_1721.py +0 -18
- pulp_file/app/migrations/0004_filefilesystemexporter.py +0 -21
- pulp_file/app/migrations/0005_filerepository.py +0 -24
- pulp_file/app/migrations/0007_filefilesystemexporter.py +0 -25
- pulp_file/app/migrations/0008_add_manifest_field.py +0 -19
- pulp_file/app/migrations/0009_move_data_to_new_master_distribution_model.py +0 -77
- pulp_file/app/migrations/0010_auto_publish.py +0 -23
- pulp_file/app/migrations/0011_fix_auto_publish.py +0 -36
- pulp_file/app/migrations/0012_delete_filefilesystemexporter.py +0 -28
- pulp_file/app/migrations/0013_file_acs.py +0 -24
- pulp_file/app/migrations/0014_new_rbac_permissions.py +0 -33
- pulp_file/app/migrations/0015_allow_null_manifest.py +0 -23
- pulp_file/app/migrations/0016_add_domain.py +0 -25
- pulpcore/app/migrations/0001_initial.py +0 -451
- pulpcore/app/migrations/0002_increase_artifact_size_field.py +0 -18
- pulpcore/app/migrations/0003_remove_upload_completed.py +0 -17
- pulpcore/app/migrations/0004_add_duplicated_reserved_resources.py +0 -45
- pulpcore/app/migrations/0005_progressreport_code.py +0 -19
- pulpcore/app/migrations/0006_repository_plugin_managed.py +0 -18
- pulpcore/app/migrations/0007_delete_progress_proxies.py +0 -19
- pulpcore/app/migrations/0008_published_metadata_as_content.py +0 -44
- pulpcore/app/migrations/0009_remove_task_non_fatal_errors.py +0 -17
- pulpcore/app/migrations/0010_pulp_fields.py +0 -570
- pulpcore/app/migrations/0011_relative_path.py +0 -28
- pulpcore/app/migrations/0012_auto_20191104_2000.py +0 -31
- pulpcore/app/migrations/0013_repository_pulp_type.py +0 -18
- pulpcore/app/migrations/0014_remove_repository_plugin_managed.py +0 -17
- pulpcore/app/migrations/0015_auto_20191112_1426.py +0 -33
- pulpcore/app/migrations/0016_charfield_to_textfield.py +0 -68
- pulpcore/app/migrations/0017_remove_task_parent.py +0 -17
- pulpcore/app/migrations/0018_auto_20191127_2350.py +0 -20
- pulpcore/app/migrations/0019_add_signing_service_model.py +0 -27
- pulpcore/app/migrations/0020_change_publishedartifact_constraints.py +0 -17
- pulpcore/app/migrations/0021_add_signing_service_foreign_key.py +0 -24
- pulpcore/app/migrations/0022_rename_last_version.py +0 -27
- pulpcore/app/migrations/0023_change_exporter_models.py +0 -82
- pulpcore/app/migrations/0024_use_local_storage_for_uploads.py +0 -19
- pulpcore/app/migrations/0025_task_parent_task.py +0 -19
- pulpcore/app/migrations/0026_task_group.py +0 -32
- pulpcore/app/migrations/0027_export_backend.py +0 -31
- pulpcore/app/migrations/0028_import_importer_pulpimporter_pulpimporterrepository.py +0 -85
- pulpcore/app/migrations/0029_export_delete.py +0 -19
- pulpcore/app/migrations/0030_taskgroup_all_tasks_dispatched.py +0 -24
- pulpcore/app/migrations/0031_import_export_validate_params.py +0 -19
- pulpcore/app/migrations/0032_export_to_chunks.py +0 -27
- pulpcore/app/migrations/0033_increase_remote_artifact_size_field.py +0 -18
- pulpcore/app/migrations/0034_groupprogressreport.py +0 -32
- pulpcore/app/migrations/0035_content_upstream_id.py +0 -18
- pulpcore/app/migrations/0036_unprotect_last_export.py +0 -19
- pulpcore/app/migrations/0037_pulptemporaryfile.py +0 -28
- pulpcore/app/migrations/0038_repository_remote.py +0 -19
- pulpcore/app/migrations/0039_change_download_concurrency.py +0 -25
- pulpcore/app/migrations/0040_set_admin_is_staff.py +0 -28
- pulpcore/app/migrations/0041_accesspolicy.py +0 -29
- pulpcore/app/migrations/0042_rbac_for_tasks.py +0 -56
- pulpcore/app/migrations/0043_toc_attribute.py +0 -19
- pulpcore/app/migrations/0044_temp_file_artifact_field.py +0 -20
- pulpcore/app/migrations/0045_accesspolicy_permissions_allow_null.py +0 -19
- pulpcore/app/migrations/0046_task__resource_job_id.py +0 -35
- pulpcore/app/migrations/0047_improve_orphan_cleanup.py +0 -59
- pulpcore/app/migrations/0048_fips_checksums.py +0 -38
- pulpcore/app/migrations/0049_add_file_field_to_uploadchunk.py +0 -24
- pulpcore/app/migrations/0050_namespace_access_policies.py +0 -28
- pulpcore/app/migrations/0051_timeoutfields.py +0 -34
- pulpcore/app/migrations/0052_tasking_logging_cid.py +0 -18
- pulpcore/app/migrations/0053_remote_headers.py +0 -19
- pulpcore/app/migrations/0054_add_public_key.py +0 -104
- pulpcore/app/migrations/0055_label.py +0 -31
- pulpcore/app/migrations/0056_remote_rate_limit.py +0 -18
- pulpcore/app/migrations/0057_add_label_indexes.py +0 -23
- pulpcore/app/migrations/0058_accesspolicy_customized.py +0 -18
- pulpcore/app/migrations/0059_proxy_creds.py +0 -23
- pulpcore/app/migrations/0060_data_migration_proxy_creds.py +0 -45
- pulpcore/app/migrations/0061_call_handle_artifact_checksums_command.py +0 -87
- pulpcore/app/migrations/0062_add_new_distribution_mastermodel.py +0 -36
- pulpcore/app/migrations/0063_repository_retained_versions.py +0 -18
- pulpcore/app/migrations/0064_add_new_style_task_columns.py +0 -109
- pulpcore/app/migrations/0064_repository_user_hidden.py +0 -18
- pulpcore/app/migrations/0065_merge_20210615_1211.py +0 -14
- pulpcore/app/migrations/0066_download_concurrency_and_retry_changes.py +0 -24
- pulpcore/app/migrations/0067_add_protect_to_task_reservation.py +0 -19
- pulpcore/app/migrations/0068_add_timestamp_of_interest.py +0 -23
- pulpcore/app/migrations/0069_update_json_fields.py +0 -63
- pulpcore/app/migrations/0070_rename_retained_versions.py +0 -18
- pulpcore/app/migrations/0071_filesystemexport_filesystemexporter.py +0 -35
- pulpcore/app/migrations/0072_add_method_to_filesystem_exporter.py +0 -18
- pulpcore/app/migrations/0073_encrypt_remote_fields.py +0 -139
- pulpcore/app/migrations/0074_acs.py +0 -47
- pulpcore/app/migrations/0075_rbaccontentguard.py +0 -25
- pulpcore/app/migrations/0076_remove_reserved_resource.py +0 -39
- pulpcore/app/migrations/0077_move_remote_url_credentials.py +0 -41
- pulpcore/app/migrations/0078_grouprole_role_userrole.py +0 -70
- pulpcore/app/migrations/0079_rename_permissions_assignment_accesspolicy_creation_hooks.py +0 -18
- pulpcore/app/migrations/0080_proxy_group_model.py +0 -37
- pulpcore/app/migrations/0081_reapplabel_group_permissions.py +0 -59
- pulpcore/app/migrations/0082_add_manage_roles_permissions.py +0 -17
- pulpcore/app/migrations/0083_alter_group_options.py +0 -17
- pulpcore/app/migrations/0084_alter_rbaccontentguard_options.py +0 -17
- pulpcore/app/migrations/0085_contentredirectcontentguard.py +0 -26
- pulpcore/app/migrations/0086_task_json_fields.py +0 -77
- pulpcore/app/migrations/0087_taskschedule.py +0 -34
- pulpcore/app/migrations/0088_accesspolicy_queryset_scoping.py +0 -18
- pulpcore/app/migrations/0089_alter_contentredirectcontentguard_options.py +0 -17
- pulpcore/app/migrations/0090_char_to_text_field.py +0 -79
- pulpcore/tests/unit/migration/test_0077_move_remote_url_credentials.py +0 -35
- {pulpcore-3.84.0.dist-info → pulpcore-3.85.0.dist-info}/WHEEL +0 -0
- {pulpcore-3.84.0.dist-info → pulpcore-3.85.0.dist-info}/entry_points.txt +0 -0
- {pulpcore-3.84.0.dist-info → pulpcore-3.85.0.dist-info}/licenses/LICENSE +0 -0
- {pulpcore-3.84.0.dist-info → pulpcore-3.85.0.dist-info}/top_level.txt +0 -0
pulp_certguard/app/utils.py
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
from gettext import gettext as _
|
|
2
|
-
|
|
3
|
-
from django.core.exceptions import ImproperlyConfigured
|
|
4
|
-
|
|
5
|
-
try:
|
|
6
|
-
import rhsm # rhsm is an optional dependency
|
|
7
|
-
except ImportError as e:
|
|
8
|
-
rhsm = None
|
|
9
|
-
rhsm_import_error = str(e)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def get_rhsm():
|
|
13
|
-
"""
|
|
14
|
-
Returns the `rhsm` module or raises an exception if `rhsm` is not installed.
|
|
15
|
-
|
|
16
|
-
`rhsm` is an optional dependency so you can call this function to get `rhsm` or have an
|
|
17
|
-
`ImproperlyConfigured` error for the user.
|
|
18
|
-
|
|
19
|
-
Returns:
|
|
20
|
-
The `rhsm` Python module.
|
|
21
|
-
|
|
22
|
-
Raises:
|
|
23
|
-
`ImproperlyConfigured` exception explaining `rhsm` is not installed.
|
|
24
|
-
"""
|
|
25
|
-
if rhsm is None:
|
|
26
|
-
error_msg = _("RHSMCertGuard requires the Python package 'rhsm' to be installed ({}).")
|
|
27
|
-
raise ImproperlyConfigured(error_msg.format(rhsm_import_error))
|
|
28
|
-
return rhsm
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Generated by Django 4.2.15 on 2024-10-22 12:40
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
import django.db.models.deletion
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Migration(migrations.Migration):
|
|
8
|
-
|
|
9
|
-
initial = True
|
|
10
|
-
|
|
11
|
-
dependencies = [
|
|
12
|
-
('core', '0091_systemid'),
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
operations = [
|
|
16
|
-
migrations.CreateModel(
|
|
17
|
-
name='FilePublication',
|
|
18
|
-
fields=[
|
|
19
|
-
('publication_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.publication')),
|
|
20
|
-
],
|
|
21
|
-
options={
|
|
22
|
-
'abstract': False,
|
|
23
|
-
},
|
|
24
|
-
bases=('core.publication',),
|
|
25
|
-
),
|
|
26
|
-
migrations.CreateModel(
|
|
27
|
-
name='FileRemote',
|
|
28
|
-
fields=[
|
|
29
|
-
('remote_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.remote')),
|
|
30
|
-
],
|
|
31
|
-
options={
|
|
32
|
-
'abstract': False,
|
|
33
|
-
},
|
|
34
|
-
bases=('core.remote',),
|
|
35
|
-
),
|
|
36
|
-
migrations.CreateModel(
|
|
37
|
-
name='FileDistribution',
|
|
38
|
-
fields=[
|
|
39
|
-
('basedistribution_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.basedistribution')),
|
|
40
|
-
('publication', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.publication')),
|
|
41
|
-
],
|
|
42
|
-
options={
|
|
43
|
-
'abstract': False,
|
|
44
|
-
},
|
|
45
|
-
bases=('core.basedistribution',),
|
|
46
|
-
),
|
|
47
|
-
migrations.CreateModel(
|
|
48
|
-
name='FileContent',
|
|
49
|
-
fields=[
|
|
50
|
-
('content_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.content')),
|
|
51
|
-
('relative_path', models.CharField(max_length=255)),
|
|
52
|
-
('digest', models.CharField(max_length=64)),
|
|
53
|
-
],
|
|
54
|
-
options={
|
|
55
|
-
'unique_together': {('relative_path', 'digest')},
|
|
56
|
-
},
|
|
57
|
-
bases=('core.content',),
|
|
58
|
-
),
|
|
59
|
-
]
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Generated by Django 2.2.4 on 2019-08-09 17:03
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
import django.db.models.deletion
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Migration(migrations.Migration):
|
|
8
|
-
|
|
9
|
-
dependencies = [
|
|
10
|
-
('file', '0001_initial'),
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
operations = [
|
|
14
|
-
migrations.AlterModelOptions(
|
|
15
|
-
name='filecontent',
|
|
16
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s'},
|
|
17
|
-
),
|
|
18
|
-
migrations.AlterModelOptions(
|
|
19
|
-
name='filedistribution',
|
|
20
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s'},
|
|
21
|
-
),
|
|
22
|
-
migrations.AlterModelOptions(
|
|
23
|
-
name='filepublication',
|
|
24
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s'},
|
|
25
|
-
),
|
|
26
|
-
migrations.AlterModelOptions(
|
|
27
|
-
name='fileremote',
|
|
28
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s'},
|
|
29
|
-
),
|
|
30
|
-
migrations.AlterField(
|
|
31
|
-
model_name='filecontent',
|
|
32
|
-
name='content_ptr',
|
|
33
|
-
field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='file_filecontent', serialize=False, to='core.Content'),
|
|
34
|
-
),
|
|
35
|
-
migrations.AlterField(
|
|
36
|
-
model_name='filedistribution',
|
|
37
|
-
name='basedistribution_ptr',
|
|
38
|
-
field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='file_filedistribution', serialize=False, to='core.BaseDistribution'),
|
|
39
|
-
),
|
|
40
|
-
migrations.AlterField(
|
|
41
|
-
model_name='filedistribution',
|
|
42
|
-
name='publication',
|
|
43
|
-
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='file_filedistribution', to='core.Publication'),
|
|
44
|
-
),
|
|
45
|
-
migrations.AlterField(
|
|
46
|
-
model_name='filepublication',
|
|
47
|
-
name='publication_ptr',
|
|
48
|
-
field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='file_filepublication', serialize=False, to='core.Publication'),
|
|
49
|
-
),
|
|
50
|
-
migrations.AlterField(
|
|
51
|
-
model_name='fileremote',
|
|
52
|
-
name='remote_ptr',
|
|
53
|
-
field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='file_fileremote', serialize=False, to='core.Remote'),
|
|
54
|
-
),
|
|
55
|
-
]
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Generated by Django 2.2.6 on 2019-10-14 17:21
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Migration(migrations.Migration):
|
|
7
|
-
|
|
8
|
-
dependencies = [
|
|
9
|
-
('file', '0002_file_related_names'),
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
operations = [
|
|
13
|
-
migrations.AlterField(
|
|
14
|
-
model_name='filecontent',
|
|
15
|
-
name='relative_path',
|
|
16
|
-
field=models.TextField(),
|
|
17
|
-
),
|
|
18
|
-
]
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Generated by Django 4.2.15 on 2024-10-22 12:40
|
|
2
|
-
|
|
3
|
-
from django.db import migrations
|
|
4
|
-
|
|
5
|
-
# Note: This migration was throwing exceptions so all of the fields/etc were removed.
|
|
6
|
-
# The table gets deleted later in 0006_delete_filefilesystemexporter.py.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Migration(migrations.Migration):
|
|
10
|
-
|
|
11
|
-
dependencies = [
|
|
12
|
-
('file', '0003_auto_20191014_1721'),
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
operations = [
|
|
16
|
-
migrations.CreateModel(
|
|
17
|
-
name='FileFileSystemExporter',
|
|
18
|
-
fields=[
|
|
19
|
-
],
|
|
20
|
-
),
|
|
21
|
-
]
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Generated by Django 4.2.15 on 2024-10-22 12:40
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
import django.db.models.deletion
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Migration(migrations.Migration):
|
|
8
|
-
|
|
9
|
-
dependencies = [
|
|
10
|
-
('file', '0004_filefilesystemexporter'),
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
operations = [
|
|
14
|
-
migrations.CreateModel(
|
|
15
|
-
name='FileRepository',
|
|
16
|
-
fields=[
|
|
17
|
-
('repository_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='file_filerepository', serialize=False, to='core.repository')),
|
|
18
|
-
],
|
|
19
|
-
options={
|
|
20
|
-
'default_related_name': '%(app_label)s_%(model_name)s',
|
|
21
|
-
},
|
|
22
|
-
bases=('core.repository',),
|
|
23
|
-
),
|
|
24
|
-
]
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Generated by Django 4.2.15 on 2024-10-22 12:40
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
import django.db.models.deletion
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Migration(migrations.Migration):
|
|
8
|
-
|
|
9
|
-
dependencies = [
|
|
10
|
-
('file', '0006_delete_filefilesystemexporter'),
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
operations = [
|
|
14
|
-
migrations.CreateModel(
|
|
15
|
-
name='FileFileSystemExporter',
|
|
16
|
-
fields=[
|
|
17
|
-
('exporter_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='file_filefilesystemexporter', serialize=False, to='core.exporter')),
|
|
18
|
-
('path', models.TextField()),
|
|
19
|
-
],
|
|
20
|
-
options={
|
|
21
|
-
'default_related_name': '%(app_label)s_%(model_name)s',
|
|
22
|
-
},
|
|
23
|
-
bases=('core.exporter',),
|
|
24
|
-
),
|
|
25
|
-
]
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Generated by Django 2.2.17 on 2020-12-05 18:33
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Migration(migrations.Migration):
|
|
7
|
-
|
|
8
|
-
dependencies = [
|
|
9
|
-
('file', '0007_filefilesystemexporter'),
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
operations = [
|
|
13
|
-
migrations.AddField(
|
|
14
|
-
model_name='filepublication',
|
|
15
|
-
name='manifest',
|
|
16
|
-
field=models.TextField(default='PULP_MANIFEST'),
|
|
17
|
-
preserve_default=False,
|
|
18
|
-
),
|
|
19
|
-
]
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Generated by Django 4.2.15 on 2024-10-22 12:40
|
|
2
|
-
|
|
3
|
-
from django.db import connection, migrations, models, transaction
|
|
4
|
-
import django.db.models.deletion
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def migrate_data_from_old_model_to_new_model_up(apps, schema_editor):
|
|
8
|
-
""" Move objects from FileDistribution to NewFileDistribution."""
|
|
9
|
-
FileDistribution = apps.get_model('file', 'FileDistribution')
|
|
10
|
-
NewFileDistribution = apps.get_model('file', 'NewFileDistribution')
|
|
11
|
-
for file_distribution in FileDistribution.objects.all():
|
|
12
|
-
with transaction.atomic():
|
|
13
|
-
NewFileDistribution(
|
|
14
|
-
pulp_id=file_distribution.pulp_id,
|
|
15
|
-
pulp_created=file_distribution.pulp_created,
|
|
16
|
-
pulp_last_updated=file_distribution.pulp_last_updated,
|
|
17
|
-
pulp_type=file_distribution.pulp_type,
|
|
18
|
-
name=file_distribution.name,
|
|
19
|
-
base_path=file_distribution.base_path,
|
|
20
|
-
content_guard=file_distribution.content_guard,
|
|
21
|
-
remote=file_distribution.remote,
|
|
22
|
-
publication=file_distribution.publication
|
|
23
|
-
).save()
|
|
24
|
-
file_distribution.delete()
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def migrate_data_from_old_model_to_new_model_down(apps, schema_editor):
|
|
28
|
-
""" Move objects from NewFileDistribution to FileDistribution."""
|
|
29
|
-
FileDistribution = apps.get_model('file', 'FileDistribution')
|
|
30
|
-
NewFileDistribution = apps.get_model('file', 'NewFileDistribution')
|
|
31
|
-
for file_distribution in NewFileDistribution.objects.all():
|
|
32
|
-
with transaction.atomic():
|
|
33
|
-
FileDistribution(
|
|
34
|
-
pulp_id=file_distribution.pulp_id,
|
|
35
|
-
pulp_created=file_distribution.pulp_created,
|
|
36
|
-
pulp_last_updated=file_distribution.pulp_last_updated,
|
|
37
|
-
pulp_type=file_distribution.pulp_type,
|
|
38
|
-
name=file_distribution.name,
|
|
39
|
-
base_path=file_distribution.base_path,
|
|
40
|
-
content_guard=file_distribution.content_guard,
|
|
41
|
-
remote=file_distribution.remote,
|
|
42
|
-
publication=file_distribution.publication
|
|
43
|
-
).save()
|
|
44
|
-
file_distribution.delete()
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
class Migration(migrations.Migration):
|
|
48
|
-
atomic = False
|
|
49
|
-
|
|
50
|
-
dependencies = [
|
|
51
|
-
('file', '0008_add_manifest_field'),
|
|
52
|
-
]
|
|
53
|
-
|
|
54
|
-
operations = [
|
|
55
|
-
migrations.CreateModel(
|
|
56
|
-
name='NewFileDistribution',
|
|
57
|
-
fields=[
|
|
58
|
-
('distribution_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='file_filedistribution', serialize=False, to='core.distribution')),
|
|
59
|
-
],
|
|
60
|
-
options={
|
|
61
|
-
'default_related_name': '%(app_label)s_%(model_name)s',
|
|
62
|
-
},
|
|
63
|
-
bases=('core.distribution',),
|
|
64
|
-
),
|
|
65
|
-
migrations.RunPython(
|
|
66
|
-
code=migrate_data_from_old_model_to_new_model_up,
|
|
67
|
-
reverse_code=migrate_data_from_old_model_to_new_model_down,
|
|
68
|
-
elidable=True,
|
|
69
|
-
),
|
|
70
|
-
migrations.DeleteModel(
|
|
71
|
-
name='FileDistribution',
|
|
72
|
-
),
|
|
73
|
-
migrations.RenameModel(
|
|
74
|
-
old_name='NewFileDistribution',
|
|
75
|
-
new_name='FileDistribution',
|
|
76
|
-
),
|
|
77
|
-
]
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Generated by Django 2.2.19 on 2021-04-02 01:59
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Migration(migrations.Migration):
|
|
7
|
-
|
|
8
|
-
dependencies = [
|
|
9
|
-
('file', '0009_move_data_to_new_master_distribution_model'),
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
operations = [
|
|
13
|
-
migrations.AddField(
|
|
14
|
-
model_name='filerepository',
|
|
15
|
-
name='autopublish',
|
|
16
|
-
field=models.BooleanField(default=False),
|
|
17
|
-
),
|
|
18
|
-
migrations.AddField(
|
|
19
|
-
model_name='filerepository',
|
|
20
|
-
name='manifest',
|
|
21
|
-
field=models.TextField(default='PULP_MANIFEST'),
|
|
22
|
-
),
|
|
23
|
-
]
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
from django.db import migrations, transaction
|
|
2
|
-
from django.core.exceptions import ObjectDoesNotExist
|
|
3
|
-
|
|
4
|
-
def remove_publications_from_auto_distributed(apps, schema_editor):
|
|
5
|
-
with transaction.atomic():
|
|
6
|
-
FileDistribution = apps.get_model("file", "FileDistribution")
|
|
7
|
-
distributions = FileDistribution.objects.filter(repository__isnull=False, publication__isnull=False)
|
|
8
|
-
distributions.update(publication=None)
|
|
9
|
-
|
|
10
|
-
def add_publications_to_auto_distributed(apps, schema_editor):
|
|
11
|
-
with transaction.atomic():
|
|
12
|
-
FileDistribution = apps.get_model("file", "FileDistribution")
|
|
13
|
-
distributions = list(FileDistribution.objects.filter(repository__isnull=False).select_related("repository"))
|
|
14
|
-
for distribution in distributions:
|
|
15
|
-
repo_version = distribution.repository.latest_version()
|
|
16
|
-
try:
|
|
17
|
-
publication = repo_version.publication_set.earliest("pulp_created")
|
|
18
|
-
except ObjectDoesNotExist:
|
|
19
|
-
publication = None
|
|
20
|
-
distribution.publication = publication
|
|
21
|
-
FileDistribution.objects.bulk_update(distributions, ['publication'])
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class Migration(migrations.Migration):
|
|
25
|
-
|
|
26
|
-
dependencies = [
|
|
27
|
-
('file', '0010_auto_publish'),
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
operations = [
|
|
31
|
-
migrations.RunPython(
|
|
32
|
-
remove_publications_from_auto_distributed,
|
|
33
|
-
reverse_code=add_publications_to_auto_distributed,
|
|
34
|
-
elidable=True,
|
|
35
|
-
)
|
|
36
|
-
]
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Generated by Django 2.2.23 on 2021-06-03 20:05
|
|
2
|
-
|
|
3
|
-
from django.db import migrations
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def delete_fs_exporters(apps, schema_editor):
|
|
7
|
-
"""Remove all FileFilesystemExporters to clean up exporter tables."""
|
|
8
|
-
FileFilesystemExporter = apps.get_model('file', 'FileFilesystemExporter')
|
|
9
|
-
FileFilesystemExporter.objects.all().delete()
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Migration(migrations.Migration):
|
|
13
|
-
atomic = False
|
|
14
|
-
|
|
15
|
-
dependencies = [
|
|
16
|
-
('file', '0011_fix_auto_publish'),
|
|
17
|
-
]
|
|
18
|
-
|
|
19
|
-
operations = [
|
|
20
|
-
migrations.RunPython(
|
|
21
|
-
code=delete_fs_exporters,
|
|
22
|
-
reverse_code=migrations.RunPython.noop,
|
|
23
|
-
elidable=True,
|
|
24
|
-
),
|
|
25
|
-
migrations.DeleteModel(
|
|
26
|
-
name='FileFileSystemExporter',
|
|
27
|
-
),
|
|
28
|
-
]
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Generated by Django 4.2.15 on 2024-10-22 12:40
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
import django.db.models.deletion
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Migration(migrations.Migration):
|
|
8
|
-
|
|
9
|
-
dependencies = [
|
|
10
|
-
('file', '0012_delete_filefilesystemexporter'),
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
operations = [
|
|
14
|
-
migrations.CreateModel(
|
|
15
|
-
name='FileAlternateContentSource',
|
|
16
|
-
fields=[
|
|
17
|
-
('alternatecontentsource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='file_filealternatecontentsource', serialize=False, to='core.alternatecontentsource')),
|
|
18
|
-
],
|
|
19
|
-
options={
|
|
20
|
-
'default_related_name': '%(app_label)s_%(model_name)s',
|
|
21
|
-
},
|
|
22
|
-
bases=('core.alternatecontentsource',),
|
|
23
|
-
),
|
|
24
|
-
]
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Generated by Django 3.2.11 on 2022-03-29 20:54
|
|
2
|
-
|
|
3
|
-
from django.db import migrations
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Migration(migrations.Migration):
|
|
7
|
-
|
|
8
|
-
dependencies = [
|
|
9
|
-
('file', '0013_file_acs'),
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
operations = [
|
|
13
|
-
migrations.AlterModelOptions(
|
|
14
|
-
name='filealternatecontentsource',
|
|
15
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s', 'permissions': [('refresh_filealternatecontentsource', 'Can refresh ACS metadata'), ('manage_roles_filealternatecontentsource', 'Can manage roles on file ACS')]},
|
|
16
|
-
),
|
|
17
|
-
migrations.AlterModelOptions(
|
|
18
|
-
name='filedistribution',
|
|
19
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s', 'permissions': [('manage_roles_filedistribution', 'Can manage roles on file distributions')]},
|
|
20
|
-
),
|
|
21
|
-
migrations.AlterModelOptions(
|
|
22
|
-
name='filepublication',
|
|
23
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s', 'permissions': [('manage_roles_filepublication', 'Can manage roles on file publications')]},
|
|
24
|
-
),
|
|
25
|
-
migrations.AlterModelOptions(
|
|
26
|
-
name='fileremote',
|
|
27
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s', 'permissions': [('manage_roles_fileremote', 'Can manage roles on file remotes')]},
|
|
28
|
-
),
|
|
29
|
-
migrations.AlterModelOptions(
|
|
30
|
-
name='filerepository',
|
|
31
|
-
options={'default_related_name': '%(app_label)s_%(model_name)s', 'permissions': [('sync_filerepository', 'Can start a sync task'), ('modify_filerepository', 'Can modify content of the repository'), ('manage_roles_filerepository', 'Can manage roles on file repositories'), ('repair_filerepository', 'Can repair repository versions')]},
|
|
32
|
-
),
|
|
33
|
-
]
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Generated by Django 3.2.14 on 2022-10-04 15:59
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Migration(migrations.Migration):
|
|
7
|
-
|
|
8
|
-
dependencies = [
|
|
9
|
-
('file', '0014_new_rbac_permissions'),
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
operations = [
|
|
13
|
-
migrations.AlterField(
|
|
14
|
-
model_name='filepublication',
|
|
15
|
-
name='manifest',
|
|
16
|
-
field=models.TextField(null=True),
|
|
17
|
-
),
|
|
18
|
-
migrations.AlterField(
|
|
19
|
-
model_name='filerepository',
|
|
20
|
-
name='manifest',
|
|
21
|
-
field=models.TextField(default='PULP_MANIFEST', null=True),
|
|
22
|
-
),
|
|
23
|
-
]
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Generated by Django 3.2.15 on 2022-09-15 02:20
|
|
2
|
-
|
|
3
|
-
from django.db import migrations, models
|
|
4
|
-
import django.db.models.deletion
|
|
5
|
-
import pulpcore.app.util
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class Migration(migrations.Migration):
|
|
9
|
-
|
|
10
|
-
dependencies = [
|
|
11
|
-
('core', '0102_add_domain_relations'),
|
|
12
|
-
('file', '0015_allow_null_manifest'),
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
operations = [
|
|
16
|
-
migrations.AddField(
|
|
17
|
-
model_name='filecontent',
|
|
18
|
-
name='_pulp_domain',
|
|
19
|
-
field=models.ForeignKey(default=pulpcore.app.util.get_domain_pk, on_delete=django.db.models.deletion.PROTECT, related_name='file_filecontent', to='core.domain'),
|
|
20
|
-
),
|
|
21
|
-
migrations.AlterUniqueTogether(
|
|
22
|
-
name='filecontent',
|
|
23
|
-
unique_together={('relative_path', 'digest', '_pulp_domain')},
|
|
24
|
-
),
|
|
25
|
-
]
|