Remove an extraneous slash in image file path computations. Add a script that will audit and fix image ancestry.

This commit is contained in:
jakedt 2014-02-21 12:05:03 -05:00
parent f339160ab9
commit 177a21e996
2 changed files with 145 additions and 7 deletions

View file

@ -38,33 +38,33 @@ class Storage(object):
def image_json_path(self, namespace, repository, image_id, storage_uuid):
base_path = self.image_path(namespace, repository, image_id, storage_uuid)
return '{0}/json'.format(base_path)
return '{0}json'.format(base_path)
def image_mark_path(self, namespace, repository, image_id, storage_uuid):
base_path = self.image_path(namespace, repository, image_id, storage_uuid)
return '{0}/_inprogress'.format(base_path)
return '{0}_inprogress'.format(base_path)
def image_checksum_path(self, namespace, repository, image_id, storage_uuid):
base_path = self.image_path(namespace, repository, image_id, storage_uuid)
return '{0}/_checksum'.format(base_path)
return '{0}_checksum'.format(base_path)
def image_layer_path(self, namespace, repository, image_id, storage_uuid):
base_path = self.image_path(namespace, repository, image_id, storage_uuid)
return '{0}/layer'.format(base_path)
return '{0}layer'.format(base_path)
def image_ancestry_path(self, namespace, repository, image_id, storage_uuid):
base_path = self.image_path(namespace, repository, image_id, storage_uuid)
return '{0}/ancestry'.format(base_path)
return '{0}ancestry'.format(base_path)
def image_file_trie_path(self, namespace, repository, image_id,
storage_uuid):
base_path = self.image_path(namespace, repository, image_id, storage_uuid)
return '{0}/files.trie'.format(base_path)
return '{0}files.trie'.format(base_path)
def image_file_diffs_path(self, namespace, repository, image_id,
storage_uuid):
base_path = self.image_path(namespace, repository, image_id, storage_uuid)
return '{0}/diffs.json'.format(base_path)
return '{0}diffs.json'.format(base_path)
def get_direct_download_url(self, path, expires_in=60):
return None