Commit Graph

7 Commits

Author SHA1 Message Date
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