Sergi Delgado Segura
3405490a10
cli - Updates README
2020-05-08 19:55:31 +02:00
Sergi Delgado Segura
e91f65048d
cli - fixes cli without params
...
Cli was crashing if no param was provided
2020-05-08 19:43:56 +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
86e97e37bf
Removes start/end time from appointment
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
08c66b6d42
Fixes error logging
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
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
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
80e72f089d
Splits exceptions in common + client
2020-04-20 17:30:15 +02:00
Sergi Delgado Segura
472efd847b
Typos
2020-04-20 17:01:55 +02:00
Sergi Delgado Segura
79231c6b38
Fixes wrong param name
2020-04-20 17:01:55 +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
2be433d589
Refactors cli to avoid multi-type returns (normal return + None). Adds exceptions for errors.
2020-04-20 17:00:49 +02:00
Sergi Delgado Segura
7b4ea313c6
Adds register docs and removes API readme
...
The TEOS-API README is no longer needed after open-sourcing the server
2020-04-20 16:06:42 +02:00
Sergi Delgado Segura
4a65b2524b
Refactors cli to avoid multi-type returns (normal return + None). Adds exceptions for errors.
2020-04-20 16:06:38 +02:00
Sergi Delgado Segura
5f7eb9df10
Minor fixes
2020-04-20 13:58:09 +02:00
Sergi Delgado Segura
2c0c1e4c42
Merge branch 'master' into cli_get_all_appointments
2020-04-20 13:27:46 +02:00
Turtle
b6b95a9821
Add get_all_appointments cli command
2020-04-17 15:17:11 -04:00
Sergi Delgado Segura
75060717fc
Merge branch 'master' into 116-openssl-python-dependencies
2020-04-10 11:30:34 +02:00
Sergi Delgado Segura
39f2628b79
Fixes docs and adds register help
2020-04-02 15:15:45 +02:00
Sergi Delgado Segura
b93aa64827
Patches unchanged variable after renaming in 3e32d8a85e
2020-04-02 10:02:11 +02:00
Sergi Delgado Segura
18e9a0fe5f
Removes 2kib restriction from readmes
2020-03-31 17:51:19 +02:00
Sergi Delgado Segura
94be7acceb
Defines minimal version of both openssl and python3 in DEPENDENCIES. Close #116 .
2020-03-31 17:47:07 +02:00
Sergi Delgado Segura
3e32d8a85e
Fixes typo in variable and inconsistent return type
2020-03-31 16:54:52 +02:00
Sergi Delgado Segura
b56123055d
Adds flake8 and fixes style issues
2020-03-31 13:06:44 +02:00
Sergi Delgado Segura
f8cc099696
Adds register command to cli, modifies get_appointment to work with POST, refactors cli to improve modularity and cleaning the code
...
- Adds register command
- Modifies get_appointment command to work with POST + adds signature
- Avoids passing config dict to functions if not necessary (passing single parameters instead)
- Moves key loading to main since most of the commands will need the keys now
- Refactors post_appointment and process_post_appointment_request to work with any post request, so it can be reused for both register and get_appointment
- Functions have been rearanged in a more logical order
- Error handling has been improved
2020-03-30 22:20:01 +02:00
Sergi Delgado Segura
dd53ad68fb
Fixes bug when dealing with empty JSON requests or empty appointment field
...
When posting a request via requests.post the json field was dumped to json, but it shouldn't have been since requests deals with this internally. That meant that the requests made by the code didn't match proper JSON.
In line with this, the API was only parsing this type POST requests correctly, making add_appointment to fail if a proper formatted JSON was passed.
On top of that, empty appointments were not checked in the Inspector before trying to get data from them, making it crash if a JSON was posted to add_appointment not containing the `appointment` field. Unit tests for this should be added.
2020-03-24 20:17:03 +01:00
Sergi Delgado Segura
6ee04bd303
Sets add_appointment_endpoint from / to /add_appointment for consistency
...
Also passes the base_url to add_appointment and get_appointment and builds the full endpoint inside (also for consistency)
2020-03-24 19:03:41 +01:00
Sergi Delgado Segura
6096fe5dc5
Fixes config templates
...
Removes quotation marks ("") from strings in the template config files
2020-03-23 17:25:52 +01:00
Sergi Delgado Segura
d2fbcf61e3
Updates READMEs with the new config file apporach
2020-03-23 17:15:46 +01:00
Sergi Delgado Segura
d21e947e05
Moves cli show_usage to help.py
2020-03-23 17:15:46 +01:00
Sergi Delgado Segura
f5edaf1bf0
Fixes default HOST to remove the schema from config
...
The schema now defaults to http if none is defined. Also improves some of the cli docstrings
2020-03-23 17:15:43 +01:00
Sergi Delgado Segura
3d389a92ac
Refactors cli to use the new config approach. Adds template.conf
2020-03-21 22:13:22 +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
5ff33ad5cf
Gets rid of sample_confs and add defaults confs
2020-03-18 18:33:38 +01:00
Sergi Delgado Segura
6d6fa9f728
Update missing readmes and circleci
...
- Some apps intances were not removed
- requeriment paths were wrong in circleci and some apps path needed to be removed
2020-03-18 16:26:48 +01:00
Sergi Delgado Segura
90ec15923e
Move requeriments to root and creates readmes
2020-03-18 16:25:52 +01:00
Sergi Delgado Segura
5e5ff0278a
Removes apps folder
2020-03-18 12:09:58 +01:00