Update Postgres container w/ required starrs pkgs

Streamline creation of database

The user no longer has to configure the database by themself.
This commit is contained in:
Will Nilges 2021-10-05 00:47:26 -04:00
parent 74a0990997
commit c641ba1d1c
7 changed files with 292 additions and 304 deletions

View file

@ -158,7 +158,7 @@ def list_vms(user_view=None):
user = User(session['userinfo']['preferred_username'])
rtp_view = False
connect_proxmox()
if eval(app.config['FORCE_STANDARD_USER']):
if app.config['FORCE_STANDARD_USER']:
user.rtp = False
if user_view and not user.rtp:
abort(403)

View file

@ -60,7 +60,7 @@ def get_vm_node(proxmox, vmid):
def get_isos(proxmox, storage):
isos = []
first_node = app.config['PROXMOX_HOSTS'][0].split('.')[0] # Get the name of the first node.
first_node = app.config['PROXMOX_HOSTS'][0].split('.')[0] # Get the name of the first node.
for iso in proxmox.nodes(first_node).storage(storage).content.get():
isos.append(iso['volid'].split('/')[1])
return isos

View file

@ -84,7 +84,7 @@ def create_vm_task(user, name, cores, memory, disk, iso):
delete_vm_task(vmid)
return
vm = VM(vmid)
if (eval(app.config['USE_STARRS'])):
if app.config['USE_STARRS']:
logging.info('[{}] Registering in STARRS.'.format(name))
set_job_status(job, 'registering in STARRS')
ip = get_next_ip(starrs, app.config['STARRS_IP_RANGE'])