MXS-1220: Show parameters for services, filters and monitors

The service, filter and monitor resources now have a "parameters" value
which contains a set of all configuration parameters for that object. This
set contains both standard and non-standard parameters.

Also fixed a mistake in the constant name definitions for the monitor
parameters "events" and "script".
This commit is contained in:
Markus Mäkelä
2017-04-22 07:10:25 +03:00
committed by Markus Mäkelä
parent 722ca4c8d1
commit cd6e0ab5e9
6 changed files with 140 additions and 24 deletions

View File

@ -19,6 +19,7 @@
#include <maxscale/config.h>
#include <maxscale/ssl.h>
#include <maxscale/jansson.h>
MXS_BEGIN_DECLS
@ -34,6 +35,13 @@ enum
MAX_PARAM_LEN = 256
};
/** Object type specific parameter name lists */
extern const char *config_service_params[];
extern const char *config_listener_params[];
extern const char *config_monitor_params[];
extern const char *config_filter_params[];
extern const char *config_server_params[];
/**
* @brief Generate default module parameters
*
@ -111,4 +119,17 @@ SSL_LISTENER *make_ssl_structure(CONFIG_CONTEXT *obj, bool require_cert, int *er
*/
bool config_have_required_ssl_params(CONFIG_CONTEXT *obj);
/**
* @brief Add non-standard module type parameters to a JSON object
*
* @param mod Module whose parameters are inspected
* @param parameters List of configuration parameters for the module
* @param type_params NULL terminated list of default module type parameters
* @param output Output JSON object where the parameters are added
*/
void config_add_module_params_json(const MXS_MODULE* mod,
MXS_CONFIG_PARAMETER* parameters,
const char** type_params,
json_t* output);
MXS_END_DECLS