mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 04:51:51 +00:00
commit
5ca4d710bb
4 changed files with 7 additions and 4 deletions
|
@ -23,7 +23,8 @@ PROXSTAR_REDIRECT_URI=https://proxstar.csh.rit.edu/logout
|
|||
# Proxmox
|
||||
PROXSTAR_PROXMOX_HOSTS= # Host list that Proxstar can use (proxstar01, etc...)
|
||||
PROXSTAR_PROXMOX_USER=api@pve
|
||||
PROXSTAR_PROXMOX_PASS= # Password for proxstar user
|
||||
PROXSTAR_PROXMOX_TOKEN_NAME= # Token name for user
|
||||
PROXSTAR_PROXMOX_TOKEN_VALUE= # Token value for user
|
||||
PROXSTAR_PROXMOX_ISO_STORAGE=nfs-iso
|
||||
PROXSTAR_PROXMOX_VM_STORAGE=ceph
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ OIDC_CLIENT_CONFIG = {
|
|||
# Proxmox
|
||||
PROXMOX_HOSTS = [host.strip() for host in environ.get('PROXSTAR_PROXMOX_HOSTS', '').split(',')]
|
||||
PROXMOX_USER = environ.get('PROXSTAR_PROXMOX_USER', '')
|
||||
PROXMOX_PASS = environ.get('PROXSTAR_PROXMOX_PASS', '')
|
||||
PROXMOX_TOKEN_NAME = environ.get('PROXSTAR_PROXMOX_TOKEN_NAME', '')
|
||||
PROXMOX_TOKEN_VALUE = environ.get('PROXSTAR_PROXMOX_TOKEN_VALUE', '')
|
||||
PROXMOX_ISO_STORAGE = environ.get('PROXSTAR_PROXMOX_ISO_STORAGE', 'nfs-iso')
|
||||
PROXMOX_VM_STORAGE = environ.get('PROXSTAR_PROXMOX_VM_STORAGE', 'ceph')
|
||||
# STARRS
|
||||
|
|
|
@ -12,7 +12,8 @@ def connect_proxmox():
|
|||
proxmox = ProxmoxAPI(
|
||||
host,
|
||||
user=app.config['PROXMOX_USER'],
|
||||
password=app.config['PROXMOX_PASS'],
|
||||
token_name=app.config['PROXMOX_TOKEN_NAME'],
|
||||
token_value=app.config['PROXMOX_TOKEN_VALUE'],
|
||||
verify_ssl=False,
|
||||
)
|
||||
proxmox.version.get()
|
||||
|
|
|
@ -75,7 +75,7 @@ def delete_vnc_target(node=None, port=None, token=None):
|
|||
|
||||
def open_vnc_session(vmid, node, proxmox):
|
||||
"""Pings the Proxmox API to request a VNC Proxy connection. Authenticates
|
||||
against the API using a Uname/Pass, gets a few tokens back, then uses those
|
||||
against the API using a Uname/Token, gets a few tokens back, then uses those
|
||||
tokens to open the VNC Proxy. Use these to connect to the VM's host with
|
||||
websockify proxy.
|
||||
Returns: Ticket to use as the noVNC password, and a port.
|
||||
|
|
Loading…
Reference in a new issue