28 Commits

Author SHA1 Message Date
Markus Mäkelä
71ffef5708
Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
Markus Mäkelä
d11c78ad80
Format all sources with Uncrustify
Formatted all sources and manually tuned some files to make the code look
neater.
2018-09-10 13:22:49 +03:00
Niclas Antti
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
Johan Wikman
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
Johan Wikman
cf0aeed516 MXS-2014 Rename log_manager.h to log.h
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
Markus Mäkelä
ec420332ea
MXS-1929: Take ResultSet into use
Replaced the previous RESULTSET with the new implementation. As the new
ResultSet doesn't have a JSON streaming capability, the MaxInfo JSON
interface has been removed. This should not be a big problem as the REST
API offers the same information in a more secure and structured way.
2018-07-31 22:50:08 +03:00
Markus Mäkelä
3be975ba5d
Fix fixing of std::string object names
Comparing two fixed std::strings would have equal C strings but comparing
with operator== they would be different. This was a result of the string
modification done by fix_object_name.

Converted the internal header into a C++ header, added std::string
overload and fixed use of the function.
2018-07-31 09:41:15 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Markus Mäkelä
e858ef672c
Fix moudle command debug assertion
The names can be of different case.
2018-06-04 19:26:36 +03:00
Markus Mäkelä
a6fc2d3f88
Add missing <string> header
load_utils.cc used std::string without including the header.
2018-02-08 13:40:11 +02:00
Markus Mäkelä
4089b6b6fd
MXS-1647: Detect API version mismatch
If the API versions do not match, MaxScale will treat this as an
error. The API versioning would allow backwards compatible changes but the
functionality to handle that is not implemented in MaxScale.

Updated API versions based on changes done to module APIs in 2.2.
2018-02-06 14:51:07 +02:00
Johan Wikman
afaf890840 MXS-1596 Rename mysqlbackend to mariadbbackend 2018-01-05 10:01:50 +02:00
Johan Wikman
f129dd56be MXS-1595 Rename mysqlclient to mariadbclient
Documentation update will follow.
2018-01-05 10:01:50 +02:00
Johan Wikman
224f918845 MXS-1592 Make all modules lowercase
Make all modules lowercase and make module loading case
insensitive. Further, make command invocation case insensitive,
as far as the module name is conserned.
2018-01-03 14:57:18 +02:00
Johan Wikman
1fb2608521 Expose module mapping function
The effective name of a module can now be obtained also
outside the module loading mechanism.
2017-12-29 08:34:46 +02:00
Johan Wikman
d4f9cb661f MXS-1587 Rename mysqlmon to mariadbmon
'mysqlmon' is still accepted but 'mariadbmon' is loaded instead.
This is done at runtime instead of e.g. by using a symbolic link,
so that a warning can be logged.

The warning is logged and the translation of the module name is
made by the code that loads the modules so that it's easy to do
the same thing for other modules as well.

In a subsequent commit the documentation is updated.
2017-12-27 11:22:27 +02:00
Markus Mäkelä
396b81f336 Fix in-source builds
The internal header directory conflicted with in-source builds causing a
build failure. This is fixed by renaming the internal header directory to
something other than maxscale.

The renaming pointed out a few problems in a couple of source files that
appeared to include internal headers when the headers were in fact public
headers.

Fixed maxctrl in-source builds by making the copying of the sources
optional.
2017-11-22 18:40:18 +02:00
Markus Mäkelä
14d8b6a0df Remove MODULECMD_ARG_OUTPUT argument type
Since the module command interface was expanded to include a JSON output
parameter, there is no longer a need for an output DCB. As the JSON can be
printed by both maxadmin and the REST API, this allows the removal of
explicit output formatting in module commands.
2017-09-28 13:59:28 +03:00
Markus Mäkelä
c7b9b7ac4a MXS-1220: Unify resource member naming
All resoures now use the `state` member to describe their internal
state. This includes servers, services and monitors. This means that the
`status` keyword can be reserved for something else and it can be removed
until it is needed again.

Changed the module maturity field to `maturity` to better describe its
purpose.
2017-07-10 22:23:45 +03:00
Markus Mäkelä
61241f9e07 Remove old feedback system
The feedback system wasn't used and was starting to cause problems on
Debian 9 where the libcurl required different version of OpenSSL than what
MaxScale was linked against.
2017-07-10 16:03:50 +03:00
Markus Mäkelä
45afbda100 Add descriptions to module commands
Each module command has to describe what it does. This should make module
commands self-documenting to some degree.
2017-06-12 10:08:25 +03:00
Markus Mäkelä
ba546fcd21 MXS-1220: Add execution of module commands to REST API
The module command self links now point to an endpoint that executes the
module command. Depending on the type of the module command, either a GET
or a POST request must be made.
2017-06-02 12:52:33 +03:00
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
Markus Mäkelä
948a059004 MXS-1220: Add module commands to /maxscale/modules
The module commands are now exposed as an additional sub-resource for the
module type.
2017-05-29 19:27:45 +03:00
Markus Mäkelä
157b7f853b MXS-1220: Fix resource self links
The top level resource self links pointed to the collection instead of the
resource itself. The individual resoures now also have a links field that
contains the self link to the resource. This should make navigation of the
API easier as all objects have valid links in them.
2017-05-09 15:32:42 +03:00
Markus Mäkelä
ac21443529 MXS-1220: Make modules proper resources
The /maxscale/modules/ endpoint is now a resource collection and the
/maxscale/modules/:module endpoint exposes the individual resources.
2017-05-09 15:32:42 +03:00
Markus Mäkelä
afff5e98b3 MXS-1220: Expose module information via the REST API
The modules, their types and default values are exposed via the
/maxscale/modules resource. Currently, only a list of resources can be
exposed as the externally exposed module object (MXS_MODULE) does not have
the name and type information in it.
2017-05-04 09:17:51 +03:00
Johan Wikman
96df523ce4 Compile load_utils.c as C++ 2017-03-24 09:21:20 +02:00