mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
add rtp view for vm list, simplify proxmox and starrs auth, add requirements.txt
This commit is contained in:
parent
bd39b0f0d1
commit
b9e5236f0a
5 changed files with 82 additions and 66 deletions
|
|
@ -1,11 +1,12 @@
|
|||
import psycopg2
|
||||
from flask import current_app as app
|
||||
|
||||
|
||||
def connect_starrs(db, user, host, password):
|
||||
def connect_starrs():
|
||||
try:
|
||||
starrs = psycopg2.connect(
|
||||
"dbname='{}' user='{}' host='{}' password='{}'".format(
|
||||
db, user, host, password))
|
||||
app.config['STARRS_DB_NAME'], app.config['STARRS_DB_USER'], app.config['STARRS_DB_HOST'], app.config['STARRS_DB_PASS']))
|
||||
except:
|
||||
print("Unable to connect to STARRS database.")
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue