-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from dkliban/docker-push
Adds REST APIs needed to perform docker/podman push
- Loading branch information
Showing
11 changed files
with
590 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added REST APIs for handling docker/podman push. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed 500 error when pulling by tag. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Generated by Django 2.2.12 on 2020-05-19 20:57 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import pulp_container.app.models | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0031_import_export_validate_params'), | ||
('container', '0003_oci_mediatype'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Upload', | ||
fields=[ | ||
('pulp_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), | ||
('pulp_created', models.DateTimeField(auto_now_add=True)), | ||
('pulp_last_updated', models.DateTimeField(auto_now=True, null=True)), | ||
('offset', models.BigIntegerField(default=0)), | ||
('file', models.FileField(max_length=255, null=True, upload_to=pulp_container.app.models.generate_filename)), | ||
('size', models.IntegerField(null=True)), | ||
('md5', models.CharField(max_length=32, null=True)), | ||
('sha1', models.CharField(max_length=40, null=True)), | ||
('sha224', models.CharField(max_length=56, null=True)), | ||
('sha256', models.CharField(max_length=64, null=True)), | ||
('sha384', models.CharField(max_length=96, null=True)), | ||
('sha512', models.CharField(max_length=128, null=True)), | ||
('repository', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='uploads', to='core.Repository')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from django.conf.urls import url, include | ||
from rest_framework.routers import Route, SimpleRouter | ||
from pulp_container.app.viewsets import ( | ||
Blobs, | ||
BlobUploads, | ||
Manifests, | ||
VersionView | ||
) | ||
|
||
router = SimpleRouter(trailing_slash=False) | ||
|
||
head_route = Route( | ||
url=r'^{prefix}/{lookup}{trailing_slash}$', | ||
mapping={'head': 'head'}, | ||
name='{basename}-detail', | ||
detail=True, | ||
initkwargs={'suffix': 'Instance'} | ||
) | ||
|
||
router.routes.append(head_route) | ||
router.register(r'^v2/(?P<path>.+)/blobs/uploads\/?', BlobUploads, basename='docker-upload') | ||
router.register(r'^v2/(?P<path>.+)/blobs', Blobs, basename='blobs') | ||
router.register(r'^v2/(?P<path>.+)/manifests', Manifests, basename='manifests') | ||
|
||
urlpatterns = [ | ||
url(r'^v2/$', VersionView.as_view()), | ||
url(r'', include(router.urls)) | ||
] |
Oops, something went wrong.