Compare commits
2 Commits
31254e8174
...
d74c3a2d45
Author | SHA1 | Date |
---|---|---|
Joshua Boniface | d74c3a2d45 | |
Joshua Boniface | f4e946c262 |
|
@ -179,6 +179,10 @@ def upload_ova(zkhandler, pool, name, ova_size):
|
||||||
}
|
}
|
||||||
retcode = 400
|
retcode = 400
|
||||||
return output, retcode
|
return output, retcode
|
||||||
|
else:
|
||||||
|
ova_script = "default_ova"
|
||||||
|
else:
|
||||||
|
ova_script = "ova"
|
||||||
|
|
||||||
ova_archive = None
|
ova_archive = None
|
||||||
|
|
||||||
|
@ -414,7 +418,7 @@ def upload_ova(zkhandler, pool, name, ova_size):
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
userdata=None,
|
userdata=None,
|
||||||
script="default_ova",
|
script=ova_script,
|
||||||
ova=name,
|
ova=name,
|
||||||
arguments=None,
|
arguments=None,
|
||||||
)
|
)
|
||||||
|
|
|
@ -121,6 +121,9 @@ def format_bytes_tohuman(databytes):
|
||||||
|
|
||||||
|
|
||||||
def format_bytes_fromhuman(datahuman):
|
def format_bytes_fromhuman(datahuman):
|
||||||
|
if not isinstance(datahuman, str):
|
||||||
|
datahuman = str(datahuman)
|
||||||
|
|
||||||
if not re.search(r"[A-Za-z]+", datahuman):
|
if not re.search(r"[A-Za-z]+", datahuman):
|
||||||
dataunit = "B"
|
dataunit = "B"
|
||||||
datasize = float(datahuman)
|
datasize = float(datahuman)
|
||||||
|
|
Loading…
Reference in New Issue