mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 13:01:51 +00:00
Linting
This commit is contained in:
parent
ade55e3d1f
commit
29aaf85738
3 changed files with 3 additions and 5 deletions
|
@ -2,6 +2,7 @@ import os
|
|||
import subprocess
|
||||
|
||||
from flask import Flask
|
||||
|
||||
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")
|
||||
|
|
|
@ -335,9 +335,7 @@ def vm_console(vmid):
|
|||
if user.rtp or int(vmid) in user.allowed_vms:
|
||||
# import pdb; pdb.set_trace()
|
||||
vm = VM(vmid)
|
||||
vnc_ticket, vnc_port = open_vnc_session(
|
||||
vmid, vm.node, proxmox
|
||||
)
|
||||
vnc_ticket, vnc_port = open_vnc_session(vmid, vm.node, proxmox)
|
||||
node = f'{vm.node}.csh.rit.edu'
|
||||
token = add_vnc_target(node, vnc_port)
|
||||
redis_conn.set(f'vnc_token|{vmid}', str(token)) # Store the VNC token in Redis.
|
||||
|
|
|
@ -3,7 +3,6 @@ import subprocess
|
|||
import time
|
||||
import urllib.parse
|
||||
|
||||
import requests
|
||||
from flask import current_app as app
|
||||
|
||||
from proxstar import logging
|
||||
|
@ -85,4 +84,4 @@ def open_vnc_session(vmid, node, proxmox):
|
|||
params = {'websocket': '1', 'generate-password': '0'}
|
||||
vncproxy_response_data = proxmox.nodes(node).qemu(str(vmid)).vncproxy.post(**params)
|
||||
|
||||
return urllib.parse.quote_plus(vncproxy_response_data['ticket']) vncproxy_response_data['port']
|
||||
return urllib.parse.quote_plus(vncproxy_response_data['ticket']), vncproxy_response_data['port']
|
||||
|
|
Loading…
Reference in a new issue