MXS-1220: Add PUT support for servers
The server can now be modified with a PUT request of a modified server resource. The server resource was reorganized to have the parameters as a separate entity from the other more general entities of the resource. The PUT/POST functions return a more appropriate error message when no request body is provided. Moved some of the constant names used in server.cc into the config.h header.
This commit is contained in:
committed by
Markus Mäkelä
parent
1e55ee5b2f
commit
043ed95bdf
@ -89,7 +89,7 @@ bool runtime_unlink_server(SERVER *server, const char *target);
|
||||
* @param value New value
|
||||
* @return True if @c key was one of the supported parameters
|
||||
*/
|
||||
bool runtime_alter_server(SERVER *server, char *key, char *value);
|
||||
bool runtime_alter_server(SERVER *server, const char *key, const char *value);
|
||||
|
||||
/**
|
||||
* @brief Enable SSL for a server
|
||||
@ -188,6 +188,16 @@ bool runtime_destroy_monitor(MXS_MONITOR *monitor);
|
||||
*/
|
||||
SERVER* runtime_create_server_from_json(json_t* json);
|
||||
|
||||
/**
|
||||
* @brief Alter a server using JSON
|
||||
*
|
||||
* @param server Server to alter
|
||||
* @param new_json JSON definition of the new server
|
||||
*
|
||||
* @return True if the server was successfully modified to represent @c new_json
|
||||
*/
|
||||
bool runtime_alter_server_from_json(SERVER* server, json_t* new_json);
|
||||
|
||||
/**
|
||||
* @brief Create a new monitor from JSON
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user