Project

Profile

Help

Story #3401

Updated by jortel@redhat.com over 5 years ago

*Manifest(Content)*    models a docker manifest: should contain the following fields: 

 * 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 is used to model 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: Choice for the _ManifestBlob_: 

 * 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) 

 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