mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
skip cpu and mem check for vm creation, verify disk size before attempting to create vm
This commit is contained in:
parent
05e08fb92d
commit
2b155903fd
4 changed files with 66 additions and 82 deletions
4
app.py
4
app.py
|
@ -211,7 +211,6 @@ def create():
|
|||
if request.method == 'GET':
|
||||
usage = get_user_usage(proxmox, 'proxstar')
|
||||
limits = get_user_usage_limits(user)
|
||||
full_limits = check_user_limit(proxmox, user, usage, limits)
|
||||
percents = get_user_usage_percent(proxmox, usage, limits)
|
||||
isos = get_isos(proxmox, app.config['PROXMOX_ISO_STORAGE'])
|
||||
return render_template(
|
||||
|
@ -219,7 +218,6 @@ def create():
|
|||
username='com6056',
|
||||
usage=usage,
|
||||
limits=limits,
|
||||
full_limits=full_limits,
|
||||
percents=percents,
|
||||
isos=isos)
|
||||
elif request.method == 'POST':
|
||||
|
@ -230,7 +228,7 @@ def create():
|
|||
iso = request.form['iso']
|
||||
if iso != 'none':
|
||||
iso = "{}:iso/{}".format(app.config['PROXMOX_ISO_STORAGE'], iso)
|
||||
usage_check = check_user_usage(proxmox, user, cores, memory, disk)
|
||||
usage_check = check_user_usage(proxmox, user, 0, 0, disk)
|
||||
if usage_check:
|
||||
return usage_check
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue