add rtp view for vm list, simplify proxmox and starrs auth, add requirements.txt

This commit is contained in:
Jordan Rodgers 2017-12-12 16:48:16 -05:00
parent bd39b0f0d1
commit b9e5236f0a
5 changed files with 82 additions and 66 deletions

View file

@ -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