mirror of https://git.48k.eu/ogclient
live: accept image name with extensions
Accept image names with .img extension in image_restore(), image_create() and cache_fetch(). Keep the code working with the actual behaviour of processing the filename without extension. Preparatory patch to migrate to image names with extensions for a more explicit control over cache files.ogkiosk
parent
0ca16bc46c
commit
109e712fb5
|
@ -571,7 +571,7 @@ class OgLiveOperations:
|
|||
def image_restore(self, request, ogRest):
|
||||
disk = int(request.getDisk())
|
||||
partition = int(request.getPartition())
|
||||
name = request.getName()
|
||||
name = request.getName().removesuffix('.img')
|
||||
repo = request.getRepo()
|
||||
ctype = request.getType()
|
||||
profile = request.getProfile()
|
||||
|
@ -608,7 +608,7 @@ class OgLiveOperations:
|
|||
def image_create(self, request, ogRest):
|
||||
disk = int(request.getDisk())
|
||||
partition = int(request.getPartition())
|
||||
name = request.getName()
|
||||
name = request.getName().removesuffix('.img')
|
||||
repo = request.getRepo()
|
||||
backup = request.getBackup()
|
||||
image_path = f'/opt/opengnsys/images/{name}.img'
|
||||
|
@ -785,7 +785,7 @@ class OgLiveOperations:
|
|||
return result
|
||||
|
||||
def cache_fetch(self, request, ogRest):
|
||||
image = request.getImages()
|
||||
image = request.getImages().removesuffix('.img')
|
||||
repo = request.getRepo()
|
||||
ctype = request.getType()
|
||||
|
||||
|
|
Loading…
Reference in New Issue