MXS-1220: Add missing relationships

The relationships from servers to services and monitors and filters to
services were not implemented. Now each server lists the services and
monitors that use it and each filter lists the services that use the
filter.

This enables the creation of a server and linking of that server to
services and monitors in one atomic operation.
This commit is contained in:
Markus Mäkelä
2017-04-19 11:08:07 +03:00
committed by Markus Mäkelä
parent b6add43bd2
commit 3d2219e8ef
6 changed files with 160 additions and 1 deletions

View File

@ -293,4 +293,14 @@ json_t* monitor_to_json(const MXS_MONITOR* monitor, const char* host);
*/
json_t* monitor_list_to_json(const char* host);
/**
* @brief Get links to monitors that relate to a server
*
* @param server Server to inspect
* @param host Hostname of this server
*
* @return Array of monitor links
*/
json_t* monitor_relations_to_server(const SERVER* server, const char* host);
MXS_END_DECLS