Commit Graph

15 Commits

Author SHA1 Message Date
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
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
71507d4c32 Gets rid of blob classes. Close #66 2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
630c3f6e0c Fixes last known block initialization on Watcher 2020-04-07 11:40:44 +02:00
Sergi Delgado Segura
75eebf80cd Adds last_known_block to Watcher and stores last block on db on fresh bootstrap Watcher and Responder 2020-04-07 11:40:44 +02:00
Sergi Delgado Segura
fe73ee7298 Fixes comments, docstrings and some renamings 2020-04-02 15:20:09 +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
b56123055d Adds flake8 and fixes style issues 2020-03-31 13:06:44 +02:00
Sergi Delgado Segura
f55e37b0fc Adds unit test for watcher.get_appointment_summary 2020-03-30 16:22:52 +02:00
Sergi Delgado Segura
e924b57efc Appointment updates only do not decrease slots if not necessary
- For a given appointment, checks if it is an update and computes the difference of sizes if so.
- Additional slots are only filled if the new version is bigger. Slots are freed if the update is smaller.
- Adds get_appoiment_summary to get information in memory information of an appointment (so the API can check if a request is an update)
	- The API computes the uuid and requests it to the tower.
	- Size field has been added to all in memory appointments
2020-03-30 12:49:53 +02:00
Sergi Delgado Segura
a6f9cbf44e Prevents adding the same uuid twice in the map (appointment update) 2020-03-26 19:06:38 +01:00
Sergi Delgado Segura
3d8c0a9498 Applies new uuid apporach to the Watcher 2020-03-26 19:06:38 +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