diff --git a/proxstar/__init__.py b/proxstar/__init__.py index a6c3ae6..5482952 100644 --- a/proxstar/__init__.py +++ b/proxstar/__init__.py @@ -406,7 +406,7 @@ def delete(vmid): @app.route('/vm//boot_order', methods=['POST']) @auth.oidc_auth -def get_boot_order(vmid): +def set_boot_order(vmid): user = User(session['userinfo']['preferred_username']) connect_proxmox() if user.rtp or int(vmid) in user.allowed_vms: diff --git a/proxstar/tasks.py b/proxstar/tasks.py index b194ff7..af225d1 100644 --- a/proxstar/tasks.py +++ b/proxstar/tasks.py @@ -27,8 +27,8 @@ from proxstar.vnc import send_stop_ssh_tunnel logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO) app = Flask(__name__) -if os.path.exists(os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config.local.py')): - config = os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config.local.py') +if os.path.exists(os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config_local.py')): + config = os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config_local.py') else: config = os.path.join(app.config.get('ROOT_DIR', os.getcwd()), 'config.py') app.config.from_pyfile(config) @@ -90,6 +90,7 @@ def create_vm_task(user, name, cores, memory, disk, iso): register_starrs(starrs, name, app.config['STARRS_USER'], vm.get_mac(), ip) set_job_status(job, 'setting VM expiration') get_vm_expire(db, vmid, app.config['VM_EXPIRE_MONTHS']) + vm.set_boot_order(['Hard Disk', 'CD-ROM', 'Network']) logging.info('[{}] VM successfully provisioned.'.format(name)) set_job_status(job, 'complete')