mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
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:
parent
74a0990997
commit
c641ba1d1c
7 changed files with 292 additions and 304 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue