From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
v6:
- added user log messages in /config/reload API
v5:
- added 'self.admin_methods = ['POST'] in control/config.py
v4:
- fixed a '()' in test_api.py
- changed the positioning of the notification message in i18n.py
v3:
- 'add_notification' is now being called before the reload command
v2:
- changed API name to 'reload'
- added test_api tests
This patch set implements a new WOK API called 'reload' under
/config/reload.
To test it:
$ curl -k -u danielhb -H "Content-Type: application/json" -H "Accept:
application/json" -X POST 'https://localhost:8001/config/reload'
-d'{}'
Enter host password for user 'danielhb':
{
"proxy_port":"8001",
"websockets_port":"64667",
"version":"2.3.0-55.git5c9127b",
"auth":"pam",
"server_root":""
}
This will reload WoK and all its plug-ins.
Daniel Henrique Barboza (6):
reload API: doc changes
reload API: control and model changes
reload API: new file tests/test_config_model.py
reload API: added rest API tests
reload API: adding notification before reloading operation
reload API: adding user log messages
docs/API/config.md | 2 +-
src/wok/control/config.py | 13 ++++++++++++-
src/wok/i18n.py | 3 +++
src/wok/model/config.py | 22 +++++++++++++++++++++-
tests/test_api.py | 9 ++++++++-
tests/test_config_model.py | 41 +++++++++++++++++++++++++++++++++++++++++
6 files changed, 86 insertions(+), 4 deletions(-)
create mode 100644 tests/test_config_model.py
--
2.7.4