added new protocols of datasource into API
parent
be1ab059a1
commit
0e483b674e
|
@ -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 \
|
||||
|
|
Loading…
Reference in New Issue