Commit Graph

774 Commits

Author SHA1 Message Date
Sergi Delgado Segura
d86112d86e plugin - endpoint -> netaddr in TowerInfo and adds get_summary 2020-04-23 12:44:25 +02:00
Sergi Delgado Segura
5f33d63cb6 plugin - simplifies argparser after https://github.com/ElementsProject/lightning/pull/3640 2020-04-23 12:43:16 +02:00
Sergi Delgado Segura
7b6d4a0c9c plugin - specifies cryptography library version 2020-04-23 12:40:24 +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
afdd8ef47e Merge pull request #137 from talaia-labs/42-decouple-start-end-time
Removes start and end time from the appointment data
2020-04-22 15:31:02 +02:00
Sergi Delgado Segura
4c1f95ca77 e2e - updates e2e tests 2020-04-22 14:56:25 +02:00
Sergi Delgado Segura
f810607348 responder - wipes completed/expired data from the gatekeeper 2020-04-22 14:55:43 +02:00
Sergi Delgado Segura
e7141b295e watcher - wipes completed/expired appointments from the Gatekeeper 2020-04-22 14:55:10 +02:00
Sergi Delgado Segura
f66e4785f2 cleaner - adds delete_gatekeeper_appointments
delete_gatekeeper_appointments takes care of deleting data from the Gatekeeper once it has expired / it has been completed
2020-04-22 14:53:58 +02:00
Sergi Delgado Segura
69e9c12258 gatekeeper reformats update_available_slots to add_update_appointment
- add_update_appointment handles the slot count and also keeps a copy of the appointment uuid and slots taken.
- gatekeeper.appointments is turned to a dict uuid:slots so appointment updates can be computed with no further data
- deleting appointment will also allow to update the slot count with no further data from both the Watcher and the Responder
2020-04-22 14:50:13 +02:00
Sergi Delgado Segura
eb6d292d3c extended_appointment - deletes appointment size 2020-04-22 14:48:00 +02:00
Sergi Delgado Segura
5f7a909804 user_pk/client_pk -> user_id and cli/client -> user (when it does not reffer to the software) 2020-04-21 19:05:20 +02:00
Sergi Delgado Segura
0e5a99b778 Fixes potential runtime errors for dictionaries changing size 2020-04-21 13:40:43 +02:00
Sergi Delgado Segura
7e800ade4a Fixes E2E tests 2020-04-20 18:09:08 +02:00
Sergi Delgado Segura
96cb8d4afd Adds user_id to ExtendedAppointment after authentication
The ExtendedAppointment is passed to the Watcher without user_id, since the user is not yet authenticated.

The Watcher has to add the user_id to the ExtendedAppointment after the user is authenticated.
2020-04-20 17:59:57 +02:00
Sergi Delgado Segura
a1b0236c0a Adds new Responder tests 2020-04-20 17:59:56 +02:00
Sergi Delgado Segura
6ef6e68e18 Adds Responder.get_summary. Fixes bug on Responder.get_expired_trackers 2020-04-20 17:59:56 +02:00
Sergi Delgado Segura
797cb9786e Adds new gatekeeper tests 2020-04-20 17:59:47 +02:00
Sergi Delgado Segura
66dce42526 Adds get_summary to extended appointment
The Watcher used to create the summary, but that was not modular enough and introduced issues when testing
2020-04-20 17:58:41 +02:00
Sergi Delgado Segura
2e6095971d Improves docstrings 2020-04-20 17:58:41 +02:00
Sergi Delgado Segura
eea12a695e Improves API returns for 404 and extends tests to cover it 2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
eb8ffb4916 Adaps unit tests. Speeds up tests by removing unnecesary sleeps 2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
8fad4d79cc Small fixes and docs 2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
a9b255e267 Removes gatekeeper from API 2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
8e3caadc5c Adds ExtendedAppointent unit tests and simplifies Appointment's 2020-04-20 17:58:40 +02:00
Sergi Delgado Segura
4e1c3e83cf Removes start/end_time from plugin 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
86e97e37bf Removes start/end time from appointment 2020-04-20 17:56:58 +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
32dd5cfc3f Refactors cli to avoid multi-type returns (normal return + None). Adds exceptions for errors. 2020-04-20 17:48:41 +02:00
Sergi Delgado Segura
1ec69e8703 Stops plugin if towers db cannot be accessed 2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
96d98a3546 compressed_pk -> user_id and logs id on bootstrap 2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
08c66b6d42 Fixes error logging 2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
5c35ff1249 Fixes tests 2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
a1a87ba9da Can't -> cannot 2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
a427b12799 Updates cli unit tests 2020-04-20 17:30:17 +02:00
Sergi Delgado Segura
9afd5b1970 Gets rid of cli_pk file
The public key can be generated from the private, and the latter has to be loaded anyway, so there's no point storing both
2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
2242e780dd Fixes log level and register command 2020-04-20 17:30:16 +02:00
Sergi Delgado Segura
6b025a2d9c Improves add_appointment method. Has some pending fixmes
- Start and end time have to be dealt with (changes required on the tower side)
- Sends appointments to every register tower. We may want to manage this better
2020-04-20 17:30:16 +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
b4ea005f55 Adds parse methods for add_appointment 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
80e72f089d Splits exceptions in common + client 2020-04-20 17:30:15 +02:00
Sergi Delgado Segura
b3841c1da6 Updates defaults names 2020-04-20 17:30:15 +02:00
Sergi Delgado Segura
ed8ff228d8 First commands with basic structure.
- Moves DBManager to common.
2020-04-20 17:30:15 +02:00
Sergi Delgado Segura
b5c587b7c5 Merge pull request #136 from talaia-labs/121-refactor-cli
121 refactor cli
2020-04-20 17:29:38 +02:00
Sergi Delgado Segura
018852f829 Merge branch 'master' into 121-refactor-cli 2020-04-20 17:28:44 +02:00
Sergi Delgado Segura
7c5d65b378 Merge pull request #132 from talaia-labs/131-host-port-cofig
Adds API HOST and PORT as configurable parameters
2020-04-20 17:24:29 +02:00
Sergi Delgado Segura
e4cd453860 Fixes test_appointment_malformed_penalty 2020-04-20 17:21:58 +02:00
Sergi Delgado Segura
472efd847b Typos 2020-04-20 17:01:55 +02:00