Refactor security worker
This commit is contained in:
parent
206ffc65af
commit
605ed1fc77
6 changed files with 184 additions and 182 deletions
|
@ -225,3 +225,13 @@ def lookup_repo_storages_by_content_checksum(repo, checksums):
|
|||
.select()
|
||||
.join(Image)
|
||||
.where(Image.repository == repo, ImageStorage.content_checksum << checksums))
|
||||
|
||||
def get_storage_locations(uuid):
|
||||
query = (ImageStoragePlacement
|
||||
.select()
|
||||
.join(ImageStorageLocation)
|
||||
.switch(ImageStoragePlacement)
|
||||
.join(ImageStorage, JOIN_LEFT_OUTER)
|
||||
.where(ImageStorage.uuid == uuid))
|
||||
|
||||
return [location.location.name for location in query]
|
||||
|
|
Reference in a new issue