Skip to content
Snippets Groups Projects
Commit 0045d0f2 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

OSB-44: update from master branch

parent 905dbc1e
Branches
Tags
2 merge requests!89Monitoring maintenance Epic branch merge,!1Resolve OSB-13 "Monitoringmaintenance "
...@@ -30,7 +30,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...@@ -30,7 +30,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'x)5=9*2a&)32h-loh@rlt_9eyw%t$-fqao*#1j2gh^7=^bnjyy' SECRET_KEY = 'x)5=9*2a&)32h-loh@rlt_9eyw%t$-fqao*#1j2gh^7=^bnjyy'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = False
ALLOWED_HOSTS = ['lofarmonitortest.control.lofar', 'localhost', '127.0.0.1'] ALLOWED_HOSTS = ['lofarmonitortest.control.lofar', 'localhost', '127.0.0.1']
...@@ -95,12 +95,6 @@ LOGGING = { ...@@ -95,12 +95,6 @@ LOGGING = {
'class': 'logging.StreamHandler', 'class': 'logging.StreamHandler',
'formatter': 'verbose', 'formatter': 'verbose',
'level': 'DEBUG' 'level': 'DEBUG'
},
'log_file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'formatter': 'verbose',
'filename': './debug.log',
} }
}, },
'loggers': { 'loggers': {
...@@ -134,7 +128,7 @@ LOGGING = { ...@@ -134,7 +128,7 @@ LOGGING = {
# #
# contents should be like this (adapt as needed): # contents should be like this (adapt as needed):
# #
# [database:lsmr] # [database:mdb]
# type = postgresql # type = postgresql
# host = localhost # host = localhost
# database = <your_lsmr_database_name> # database = <your_lsmr_database_name>
...@@ -151,7 +145,7 @@ DATABASES = { ...@@ -151,7 +145,7 @@ DATABASES = {
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': django_db_credentials.database, 'NAME': django_db_credentials.database,
'USER': django_db_credentials.user, 'USER': django_db_credentials.user,
'PASS': django_db_credentials.password, 'PASSWORD': django_db_credentials.password,
'HOST': django_db_credentials.host, 'HOST': django_db_credentials.host,
'PORT': django_db_credentials.port, 'PORT': django_db_credentials.port,
} }
...@@ -201,4 +195,4 @@ REST_FRAMEWORK = { ...@@ -201,4 +195,4 @@ REST_FRAMEWORK = {
CELERY_RESULT_BACKEND = 'amqp://guest@localhost//' CELERY_RESULT_BACKEND = 'amqp://guest@localhost//'
# LOFAR SPECIFIC PARAMETERS # LOFAR SPECIFIC PARAMETERS
URL_TO_STORE_RTSM_PLOTS = './' URL_TO_STORE_RTSM_PLOTS = '/data/deploy/production/rtsm_plots'
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,7 @@ def test_database_configuration(): ...@@ -16,7 +16,7 @@ def test_database_configuration():
'ENGINE': 'django.db.backends.postgresql_psycopg2', 'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'test_mdb', 'NAME': 'test_mdb',
'USER': ''.join(random.sample(string.ascii_lowercase, 10)), 'USER': ''.join(random.sample(string.ascii_lowercase, 10)),
'PASS': ''.join(random.sample(string.ascii_letters, 10)), 'PASSWORD': ''.join(random.sample(string.ascii_letters, 10)),
'HOST': 'localhost', 'HOST': 'localhost',
'PORT': free_random_port() 'PORT': free_random_port()
} }
\ No newline at end of file
...@@ -33,6 +33,7 @@ def parse_date(date): ...@@ -33,6 +33,7 @@ def parse_date(date):
except Exception as e: except Exception as e:
raise ValueError('cannot parse %s with format %s - %s' % (date, expected_format, e)) raise ValueError('cannot parse %s with format %s - %s' % (date, expected_format, e))
echo docker run --rm -it --net host - -v$PWD/datapoint_config_production.xml:/root/datapoint_config.xml^Cofar/winccdbbridge /root/datapoint_config.xml /root/db.ini
def parse_bool(boolean_value_str): def parse_bool(boolean_value_str):
boolean_value_str = boolean_value_str.lower() boolean_value_str = boolean_value_str.lower()
...@@ -58,7 +59,10 @@ def _get_unique_error_types(): ...@@ -58,7 +59,10 @@ def _get_unique_error_types():
:return: the list containing the unique error types :return: the list containing the unique error types
:rtype: list :rtype: list
""" """
try:
return [item['type'] for item in ComponentError.objects.values('type').distinct()] return [item['type'] for item in ComponentError.objects.values('type').distinct()]
except:
return []
def rcu_from_antenna_type_polarization(antenna_id, type, polarization): def rcu_from_antenna_type_polarization(antenna_id, type, polarization):
......
set(py_files __init__.py
postgres_testrunner.py)
python_install(${py_files} DESTINATION lofar/maintenance/test)
add_subdirectory(controllers) add_subdirectory(controllers)
add_subdirectory(models) add_subdirectory(models)
\ No newline at end of file
...@@ -3,9 +3,7 @@ include(LofarCTestPython) ...@@ -3,9 +3,7 @@ include(LofarCTestPython)
enable_coverage(3) enable_coverage(3)
set(py_files postgres_testrunner.py set(py_files test_rtsm_models.py
__init__.py
test_rtsm_models.py
test_wincc_models.py) test_wincc_models.py)
python_install(${py_files} DESTINATION lofar/maintenance/test) python_install(${py_files} DESTINATION lofar/maintenance/test)
......
...@@ -9,3 +9,7 @@ fabric ...@@ -9,3 +9,7 @@ fabric
invocations invocations
beautifultable beautifultable
blessings blessings
celery
django-filter
coreapi
matplotlib
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment