diff --git a/myems-api/core/datasource.py b/myems-api/core/datasource.py index 14c96b63..54d5961c 100644 --- a/myems-api/core/datasource.py +++ b/myems-api/core/datasource.py @@ -104,7 +104,7 @@ class DataSourceCollection: 'mongodb', 'influxdb'): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', - description='API.INVALID_DATA_SOURCE_PROTOCOL.') + description='API.INVALID_DATA_SOURCE_PROTOCOL') protocol = new_values['data']['protocol'] if 'connection' not in new_values['data'].keys() or \ @@ -278,10 +278,25 @@ class DataSourceItem: if 'protocol' not in new_values['data'].keys() \ or new_values['data']['protocol'] not in \ - ('modbus-tcp', 'modbus-rtu', 'bacnet-ip', 's7', 'profibus', 'profinet', 'opc-ua', 'lora', 'simulation', - 'controllogix', 'weather'): + ('modbus-tcp', + 'modbus-rtu', + 'bacnet-ip', + 's7', + 'profibus', + 'profinet', + 'opc-ua', + 'lora', + 'simulation', + 'controllogix', + 'weather', + 'mysql', + 'sqlserver', + 'postgresql', + 'oracle', + 'mongodb', + 'influxdb'): raise falcon.HTTPError(falcon.HTTP_400, title='API.BAD_REQUEST', - description='API.INVALID_DATA_SOURCE_PROTOCOL.') + description='API.INVALID_DATA_SOURCE_PROTOCOL') protocol = new_values['data']['protocol'] if 'connection' not in new_values['data'].keys() or \