mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +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
|
# Proxmox
|
||||||
PROXSTAR_PROXMOX_HOSTS= # Host list that Proxstar can use (proxstar01, etc...)
|
PROXSTAR_PROXMOX_HOSTS= # Host list that Proxstar can use (proxstar01, etc...)
|
||||||
PROXSTAR_PROXMOX_USER=api@pve
|
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_ISO_STORAGE=nfs-iso
|
||||||
PROXSTAR_PROXMOX_VM_STORAGE=ceph
|
PROXSTAR_PROXMOX_VM_STORAGE=ceph
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,8 @@ OIDC_CLIENT_CONFIG = {
|
||||||
# Proxmox
|
# Proxmox
|
||||||
PROXMOX_HOSTS = [host.strip() for host in environ.get('PROXSTAR_PROXMOX_HOSTS', '').split(',')]
|
PROXMOX_HOSTS = [host.strip() for host in environ.get('PROXSTAR_PROXMOX_HOSTS', '').split(',')]
|
||||||
PROXMOX_USER = environ.get('PROXSTAR_PROXMOX_USER', '')
|
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_ISO_STORAGE = environ.get('PROXSTAR_PROXMOX_ISO_STORAGE', 'nfs-iso')
|
||||||
PROXMOX_VM_STORAGE = environ.get('PROXSTAR_PROXMOX_VM_STORAGE', 'ceph')
|
PROXMOX_VM_STORAGE = environ.get('PROXSTAR_PROXMOX_VM_STORAGE', 'ceph')
|
||||||
# STARRS
|
# STARRS
|
||||||
|
|
|
@ -12,7 +12,8 @@ def connect_proxmox():
|
||||||
proxmox = ProxmoxAPI(
|
proxmox = ProxmoxAPI(
|
||||||
host,
|
host,
|
||||||
user=app.config['PROXMOX_USER'],
|
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,
|
verify_ssl=False,
|
||||||
)
|
)
|
||||||
proxmox.version.get()
|
proxmox.version.get()
|
||||||
|
|
|
@ -75,7 +75,7 @@ def delete_vnc_target(node=None, port=None, token=None):
|
||||||
|
|
||||||
def open_vnc_session(vmid, node, proxmox):
|
def open_vnc_session(vmid, node, proxmox):
|
||||||
"""Pings the Proxmox API to request a VNC Proxy connection. Authenticates
|
"""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
|
tokens to open the VNC Proxy. Use these to connect to the VM's host with
|
||||||
websockify proxy.
|
websockify proxy.
|
||||||
Returns: Ticket to use as the noVNC password, and a port.
|
Returns: Ticket to use as the noVNC password, and a port.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue