Commit Graph

21 Commits

Author SHA1 Message Date
Sergi Delgado Segura
9c10f7964f teosd- First bits of locator cache 2020-05-18 20:40:17 +02:00
Sergi Delgado Segura
d5dc833bf5 datadir and apibind were not properly working 2020-05-08 19:43:56 +02:00
Sergi Delgado Segura
390dc3e090 teos - adds log line with tower id 2020-04-29 13:04:02 +02:00
Sergi Delgado Segura
a8b9697a38 teosd - handles AppointmentDBM exceptions
AppointmentDBM creation was outside the main try/except, so exception were not properly handled
2020-04-23 12:38:07 +02:00
Sergi Delgado Segura
a9b255e267 Removes gatekeeper from API 2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
3f15459f2c Creates ExtendedAppointment as an appointment with user information 2020-04-20 17:58:16 +02:00
Sergi Delgado Segura
9cbd9ed18a Adds end time to the user (subscription) information. It will replace the appointment one. 2020-04-20 17:56:58 +02:00
Sergi Delgado Segura
a1a87ba9da Can't -> cannot 2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
08701f0fee Refactors Cryptographer to remove logs and avoid multi return types
Cryptographer now uses exceptions to report errors and does not use the log anymore
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
bed21e9625 Adds API HOST and PORT as configurable parameters.
Uses API_BIND/API_PORT for the server and API_CONNECT/API_PORT for the user, for consistency.
2020-04-20 17:01:55 +02:00
Sergi Delgado Segura
fe73ee7298 Fixes comments, docstrings and some renamings 2020-04-02 15:20:09 +02:00
Sergi Delgado Segura
3009bb83ba Addaps api and daemon to use userDB 2020-04-01 18:26:36 +02:00
Sergi Delgado Segura
7031b552f7 Splits DBManager in parent and child classes so a UserDBManager can be implemented
- DBManager preserves the basic methods, while the appointment related ones have been moved to AppointmentDBM.
- AppointmentDBM handles json loads and dumps for appointments and trackers, so the corresponding methods can be removed from their classes.
- Updates docs.
2020-04-01 17:18:37 +02:00
Sergi Delgado Segura
2d67fe8638 rpc_passwd -> rpc_password. The former can be confusing since the bitcoind parameter is rpcpassword. Avoiding that. 2020-04-01 11:14:20 +02:00
Sergi Delgado Segura
4c21326974 Moves slots added on register from gatekeeper to config 2020-03-27 14:57:11 +01:00
Sergi Delgado Segura
519caec29a Adds basic register logic
- Adds register endpoint in the API
- Adds the Gatekeeper to keep track of registered user and allow/reject access
- Adds registration errors
- Updates API unit tests
- Refactors some methods of the API to reduce code replication
2020-03-25 12:14:12 +01:00
Sergi Delgado Segura
3c6f7cf15f Adds teosd command line help 2020-03-23 17:15:46 +01:00
Sergi Delgado Segura
6595c2d790 Avoids global variables in teosd for better testing 2020-03-21 22:52:16 +01:00
Sergi Delgado Segura
00a48ce6f5 Modifies ConfigParser so config file is passed as parameter (to be used by both teos and cli)
- Modifies ConfigParser
- Adapts __init__ and teosd at teos/
2020-03-21 22:02:46 +01:00
Sergi Delgado Segura
b43731397c Updates teos to work with the new conf file format and redefines how objects are built
Configuration parameters are now load from a .conf file (see template.conf as an example).

The code has 3 config levels: default (teos/__init__.py), config file (<data_dir>/teos.conf) and command line.
Most of the config parameters are only modificable trough the config file for now.
The priority order is: command line, config file, default.

Objects that need config parameters are now built in teosd instead of inside other classes. Therefore teosd acts like a factory and config parameters don't have to be passed around between objects. This also implies that a lot of the object creation logic has been changed.

This should simplify unit testing.
2020-03-20 21:38:28 +01:00
Sergi Delgado Segura
7c7ff909d7 pisa -> teos 2020-03-17 15:47:38 +01:00