diff --git a/ereuse_devicehub/config.py b/ereuse_devicehub/config.py index 5a37ace0..58176223 100644 --- a/ereuse_devicehub/config.py +++ b/ereuse_devicehub/config.py @@ -44,6 +44,8 @@ class DevicehubConfig(Config): host=DB_HOST, db=DB_DATABASE, ) # type: str + SCHEMA = config('SCHEMA', 'dbtest') + HOST = config('HOST', 'localhost') MIN_WORKBENCH = StrictVersion('11.0a1') # type: StrictVersion """The minimum version of ereuse.org workbench that this devicehub accepts. we recommend not changing this value. diff --git a/ereuse_devicehub/resources/documents/documents.py b/ereuse_devicehub/resources/documents/documents.py index 3b72d85d..d32749f5 100644 --- a/ereuse_devicehub/resources/documents/documents.py +++ b/ereuse_devicehub/resources/documents/documents.py @@ -323,8 +323,8 @@ class WbConfDocumentView(DeviceView): return jsonify('') data = {'token': self.get_token(), - 'host': app.config['DB_HOST'], - 'inventory': app.config['DB_SCHEMA'] + 'host': app.config['HOST'], + 'inventory': app.config['SCHEMA'] } data['erase'] = False # data['erase'] = True if wbtype == 'usodywipe' else False diff --git a/ereuse_devicehub/resources/documents/templates/documents/wbSettings.ini b/ereuse_devicehub/resources/documents/templates/documents/wbSettings.ini index c7156a65..8d1933bc 100644 --- a/ereuse_devicehub/resources/documents/templates/documents/wbSettings.ini +++ b/ereuse_devicehub/resources/documents/templates/documents/wbSettings.ini @@ -1,17 +1,19 @@ [settings] -DH_TOKEN="{{token}}" +DH_TOKEN = {{token}} -DH_HOST="{{host}}" -DH_DATABASE="{{inventory}}" -DEVICEHUB_URL=https://${DB_HOST}/${DB_DATABASE}/ +DH_HOST = {{host}} +DH_DATABASE = {{inventory}} +DEVICEHUB_URL = https://${DB_HOST}/${DB_DATABASE}/ -WB_BENCHMARK = False -WB_STRESS_TEST = 0 -WB_SMART_TEST = "" -WB_ERASE = {{erase}} +WB_BENCHMARK = True +WB_STRESS_TEST = 1 +WB_SMART_TEST = short + +WB_ERASE = WB_ERASE_STEPS = 1 WB_ERASE_LEADING_ZEROS = False -WB_DEBUG = True +WB_DEBUG = False +