Skip to content

Commit

Permalink
Issue #137: create f() build_blob_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois-Werbrouck committed Oct 11, 2024
1 parent be4a8f8 commit ddf3b07
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion datastore/blob/azure_storage_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async def generate_hash(image):
print(error.__str__())
raise Exception("Unhandeled Datastore.blob.azure_storage Error")

async def build_container_name(name:str,tier:str="user"):
def build_container_name(name:str,tier:str="user"):
"""
This function builds the container name based on the tier and the name.
We include a tier to better structure the container names in the future. Other tiers could be 'dev' or 'test-user'
Expand All @@ -62,6 +62,16 @@ async def build_container_name(name:str,tier:str="user"):

return "{}-{}".format(tier, name)

def build_blob_name(folder_name, image_uuid):
"""
This function builds the blob name based on the folder name and the image uuid
Parameters:
- folder_name (str): the name of the folder or the path to the folder
- image_uuid (str): the uuid of the image
"""
return "{}/{}".format(folder_name, image_uuid)

async def mount_container(
connection_string,
container_uuid,
Expand Down

0 comments on commit ddf3b07

Please sign in to comment.