Fix conversion of schema 2 manifests to schema 1 manifests
Also adds a number of conversion tests and clarify the interfaces a bit more
This commit is contained in:
parent
bd79eaa38f
commit
c233760007
11 changed files with 457 additions and 183 deletions
|
@ -51,12 +51,10 @@ class BrokenManifest(ManifestInterface):
|
|||
def layers(self):
|
||||
return []
|
||||
|
||||
@property
|
||||
def legacy_image_ids(self):
|
||||
def get_legacy_image_ids(self, cr):
|
||||
return []
|
||||
|
||||
@property
|
||||
def leaf_layer_v1_image_id(self):
|
||||
def get_leaf_layer_v1_image_id(self, cr):
|
||||
return None
|
||||
|
||||
@property
|
||||
|
@ -79,7 +77,7 @@ class BrokenManifest(ManifestInterface):
|
|||
def generate_legacy_layers(self, images_map, lookup_config_fn):
|
||||
return None
|
||||
|
||||
def get_v1_compatible_manifest(self, namespace_name, repo_name, tag_name, lookup_fn):
|
||||
def get_schema1_manifest(self, namespace_name, repo_name, tag_name, lookup_fn):
|
||||
return self
|
||||
|
||||
@property
|
||||
|
@ -94,6 +92,10 @@ class BrokenManifest(ManifestInterface):
|
|||
def is_manifest_list(self):
|
||||
return False
|
||||
|
||||
@property
|
||||
def has_legacy_image(self):
|
||||
return False
|
||||
|
||||
|
||||
class ManifestBackfillWorker(Worker):
|
||||
def __init__(self):
|
||||
|
|
Reference in a new issue