make VIRTUALIZATION_MODEL configurable

This commit is contained in:
forest 2020-05-19 22:46:11 -05:00
parent 17c559123c
commit 5b5c752e1a

View File

@ -68,7 +68,12 @@ stripe.api_key = app.config['STRIPE_SECRET_KEY']
stripe.api_version = app.config['STRIPE_API_VERSION'] stripe.api_version = app.config['STRIPE_API_VERSION']
app.config['FLASK_MAIL_INSTANCE'] = Mail(app) app.config['FLASK_MAIL_INSTANCE'] = Mail(app)
app.config['VIRTUALIZATION_MODEL'] = virt_model.MockVirtualization()
if app.config['VIRTUALIZATION_MODEL'] == "shell_scripts":
app.config['VIRTUALIZATION_MODEL'] = virt_model.ShellScriptVirtualization()
else:
app.config['VIRTUALIZATION_MODEL'] = virt_model.MockVirtualization()
app.config['BTCPAY_CLIENT'] = btcpay.Client(api_uri=app.config['BTCPAY_URL'], pem=app.config['BTCPAY_PRIVATE_KEY']) app.config['BTCPAY_CLIENT'] = btcpay.Client(api_uri=app.config['BTCPAY_URL'], pem=app.config['BTCPAY_PRIVATE_KEY'])
from capsulflask import db from capsulflask import db