diff --git a/.gitattributes b/.gitattributes index 1eb243dfdfd6a88c27bd422f27922c76979431c2..9e2b923e74de3630ddae4a37a5bbe6f828b885d8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4980,6 +4980,7 @@ SAS/TriggerServices/bin/triggercancellationservice.ini -text SAS/TriggerServices/bin/triggerrestinterface -text SAS/TriggerServices/bin/triggerservice -text SAS/TriggerServices/bin/triggerservice.ini -text +SAS/TriggerServices/config/dbcredentials_trigger_restinterface.ini -text SAS/TriggerServices/django_rest/CMakeLists.txt -text SAS/TriggerServices/django_rest/db.sqlite3 -text SAS/TriggerServices/django_rest/manage.py -text diff --git a/SAS/TriggerServices/config/dbcredentials_trigger_restinterface.ini b/SAS/TriggerServices/config/dbcredentials_trigger_restinterface.ini new file mode 100644 index 0000000000000000000000000000000000000000..7db6c53863cbcd248656e8804a7179588a8043c8 --- /dev/null +++ b/SAS/TriggerServices/config/dbcredentials_trigger_restinterface.ini @@ -0,0 +1,7 @@ +[database:trigger_restinterface] +type = mysql +host = mysql1.control.lofar +user = <redacted> +password = <redacted> +database = lofar_trigger_rest +port = 3306 diff --git a/SAS/TriggerServices/django_rest/restinterface/settings.py b/SAS/TriggerServices/django_rest/restinterface/settings.py index abd72b9b1d740a12d79e058ff558f5e4f6edf1b9..428cd551c6facb85e003e88eb19262fe60c1ae46 100644 --- a/SAS/TriggerServices/django_rest/restinterface/settings.py +++ b/SAS/TriggerServices/django_rest/restinterface/settings.py @@ -23,7 +23,7 @@ logger.setLevel(logging.INFO) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) dbc = dbcredentials.DBCredentials() -mom_credentials = dbc.get("MoM") +restinterface_credentials = dbc.get("trigger_restinterface") # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ @@ -87,11 +87,11 @@ WSGI_APPLICATION = 'lofar.triggerservices.restinterface.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'lofar_trigger_rest', - 'USER': mom_credentials.user, - 'PASSWORD': mom_credentials.password, - 'HOST': mom_credentials.host, - 'PORT': mom_credentials.port, + 'NAME': restinterface_credentials.database, + 'USER': restinterface_credentials.user, + 'PASSWORD': restinterface_credentials.password, + 'HOST': restinterface_credentials.host, + 'PORT': restinterface_credentials.port, } }