Change manifest creation to take in the map of blobs that form the manifest

We need to lookup the blobs *specific to the images in that manifest*, so we now pass them in from the locations in which we know that information
This commit is contained in:
Joseph Schorr 2018-08-07 16:28:50 -04:00
parent e3da522d26
commit 56222f95dc
8 changed files with 89 additions and 43 deletions

View file

@ -1407,14 +1407,12 @@ class ManifestBlob(BaseModel):
repository = ForeignKeyField(Repository, index=True)
manifest = ForeignKeyField(Manifest)
blob = ForeignKeyField(ImageStorage)
blob_index = IntegerField() # 0-indexed location of the blob in the manifest.
class Meta:
database = db
read_slaves = (read_slave,)
indexes = (
(('manifest', 'blob'), True),
(('manifest', 'blob_index'), True),
)