Project

Profile

Help

Story #3401

Updated by jortel@redhat.com about 6 years ago

*Manifest(Content)*    models a docker manifest: 

 * digest: CharField(255, db_index=True, unique=True) 
 * schema_version: IntegerField() 
 * config_blob: ForeignKey to Blob 
 * media_type: ChoiceField() 

 media_type choices: 
   - application/vnd.docker.distribution.manifest.v1+json 
   - application/vnd.docker.distribution.manifest.v2+json 

 --- 

 *ManifestBlob(Content)* models the relationship between Manifests and Blobs.    Each blob is stored as an _Artifact_ and is related by _ContentArtifact_.  

 * manifest: ForeignKey(Manifest, related_name='blobs', on_delete=CASCADE) 
 * media_type: ChoiceField()  
 * size: IntegerField() 

 media_type choices: 

 * application/vnd.docker.container.image.v1+json - Container config json represented as a blob 
 * application/vnd.docker.image.rootfs.diff.tar.gzip - Regular blob 
 * application/vnd.docker.image.rootfs.foreign.diff.tar.gzip - Foreign blob ( we do not intend to store foreign blobs. Docker client during pull will fetch it from the remote location) 

 --- 

 *ManifestList(Content)* models a docker manifest-list.  
 * digest: CharField(max_length=255, db_index=True, unique=True) 
 * schema_version: IntegerField() 
 * manifests: ManyToManyField('Manifest', through='ManifestListManifest') 
 * media_type: ChoiceField() 

 media_type choices: 
 * application/vnd.docker.distribution.manifest.list.v2+json 

 --- 

 *ManifestListManifest* - models the many-to-many relationship between Manifest and ManifestList. 
 * manifest: ForeignKey(Manifest, related_name='manifests', on_delete=CASCADE) 
 * manifest_list: ForeignKey(ManifestList, related_name='manifest_lists', on_delete=CASCADE) 
 * media_type: ChoiceField() 
 * size: IntegerField() 
 * platform: ForeignKey(Platform, on_delete=PROTECT) 

 Some fields on this model appears to be redundant to the fields found on the Manifest Model, but they are necessary because the provided json for a ManfiestList is not guaranteed to match the reality of a manifest. 

 media_type choices: 
 * application/vnd.docker.distribution.manifest.v1+json 
 * application/vnd.docker.distribution.manifest.v2+json 

 --- 

 *Platform* models a platform. 
 * architecture: CharField(255) 
 * os: CharField(255) 
 * os_version: charField(255) 
 * os_features: ListField(CharField()) 
 * variant: CharField(255) 
 * features: ListField(CharField())  

 --- 

 This story will be complete when CRUD is possible for Manifests (for this story, the metadata is not expected to be extracted from the file, but provided by the user in the request body.) 

Back