Code

sysdb.git
9 years agoconnection: Use sdb_proto_unmarshal_header.
Sebastian Harl [Mon, 15 Dec 2014 09:46:25 +0000 (10:46 +0100)]
connection: Use sdb_proto_unmarshal_header.

9 years agoproto: Add sdb_proto_unmarshal_header().
Sebastian Harl [Mon, 15 Dec 2014 09:46:08 +0000 (10:46 +0100)]
proto: Add sdb_proto_unmarshal_header().

9 years agoMoved sdb_proto_send/sdb_proto_select to sdb_write/sdb_select.
Sebastian Harl [Mon, 15 Dec 2014 09:39:05 +0000 (10:39 +0100)]
Moved sdb_proto_send/sdb_proto_select to sdb_write/sdb_select.

These functions are not protocol-specific but rather simple wrappers around
system calls.

9 years agoconnection: Let sdb_connection_close not deallocate the connection.
Sebastian Harl [Mon, 15 Dec 2014 08:18:43 +0000 (09:18 +0100)]
connection: Let sdb_connection_close not deallocate the connection.

That'll allow for more flexible use.

9 years agoconnection: Renamed sdb_connection_read to sdb_connection_handle.
Sebastian Harl [Mon, 15 Dec 2014 08:12:10 +0000 (09:12 +0100)]
connection: Renamed sdb_connection_read to sdb_connection_handle.

The function does more than read from the connection, so the old name was a
bad choice.

9 years agoutils/proto: Replaced sdb_proto_send_msg with sdb_proto_marshal.
Sebastian Harl [Sun, 14 Dec 2014 15:30:20 +0000 (16:30 +0100)]
utils/proto: Replaced sdb_proto_send_msg with sdb_proto_marshal.

The new function won't actually send the message but write it into a provided
buffer in the wire format. This allows for more flexible use of the function.

9 years agoMerged branch 'master' of git://git.tokkee.org/sysdb.
Sebastian Harl [Fri, 12 Dec 2014 07:55:39 +0000 (08:55 +0100)]
Merged branch 'master' of git://git.tokkee.org/sysdb.

9 years agosysdb: Use sdb_log() instead of printf().
Sebastian Harl [Thu, 11 Dec 2014 23:24:20 +0000 (00:24 +0100)]
sysdb: Use sdb_log() instead of printf().

9 years agosysdb: Wait for the actual reply after sending a command.
Sebastian Harl [Thu, 11 Dec 2014 23:03:06 +0000 (00:03 +0100)]
sysdb: Wait for the actual reply after sending a command.

Otherwise, multiple replies (log messages) will be interleaved with input
prompts.

9 years agosysdb: Only try to reconnect before executing a command or on an empty line.
Sebastian Harl [Thu, 11 Dec 2014 22:42:14 +0000 (23:42 +0100)]
sysdb: Only try to reconnect before executing a command or on an empty line.

9 years agosysdb: Fixed check for duplicate history entries.
Sebastian Harl [Thu, 11 Dec 2014 21:42:39 +0000 (22:42 +0100)]
sysdb: Fixed check for duplicate history entries.

current_history() returns the currently *selected* history entry. Rather, we
want the latest entry, that is, the one added last.

9 years agosysdb: Store all commands in the history; even if they failed.
Sebastian Harl [Thu, 11 Dec 2014 21:17:37 +0000 (22:17 +0100)]
sysdb: Store all commands in the history; even if they failed.

9 years agosysdb: Parse strings correctly.
Sebastian Harl [Thu, 11 Dec 2014 21:06:49 +0000 (22:06 +0100)]
sysdb: Parse strings correctly.

… and focus only on syntax elements that may include semicolons and escape
their meaning as a query terminator.

9 years agosysdb: Do an attempt to reconnect on all user input.
Sebastian Harl [Thu, 11 Dec 2014 08:57:49 +0000 (09:57 +0100)]
sysdb: Do an attempt to reconnect on all user input.

9 years agosysdb: Don't exit if the server closed the connection.
Sebastian Harl [Thu, 11 Dec 2014 08:47:56 +0000 (09:47 +0100)]
sysdb: Don't exit if the server closed the connection.

Instead, notify the user an try to reconnect before executing the next
command.

9 years agosysdb: Make sure to properly reset term attributes.
Sebastian Harl [Thu, 11 Dec 2014 08:45:41 +0000 (09:45 +0100)]
sysdb: Make sure to properly reset term attributes.

Don't record the "old" settings on each call to rawmode since we do that a lot
of times. Also, don't use up all atexit handler slots this way.

9 years agosysdb: Clear the current command from the buffer after error.
Sebastian Harl [Thu, 11 Dec 2014 08:44:35 +0000 (09:44 +0100)]
sysdb: Clear the current command from the buffer after error.

9 years agostore.h: Make it such that HOST/SERVICE/METRIC don't share bits with ATTRIBUTE
Sebastian Harl [Wed, 10 Dec 2014 23:15:55 +0000 (00:15 +0100)]
store.h: Make it such that HOST/SERVICE/METRIC don't share bits with ATTRIBUTE

An attribute can be assigned to any of the other types. This approach allows
to represent host-, service-, and metric-attributes in one byte.

9 years agofrontend: Get the username of the remote peer from a UNIX socket.
Sebastian Harl [Tue, 9 Dec 2014 14:19:47 +0000 (15:19 +0100)]
frontend: Get the username of the remote peer from a UNIX socket.

Then, only allow that user to authenticate against the daemon. That is, use
the same as PostgreSQL's "peer" authentication for all connections.

9 years agoutils/os: Added sdb_get_current_user().
Sebastian Harl [Tue, 9 Dec 2014 14:18:04 +0000 (15:18 +0100)]
utils/os: Added sdb_get_current_user().

… copied from sysdb/main.c which now uses this new function.

9 years agoREADME: Added libfacter and librrd to list of prerequisites.
Sebastian Harl [Sun, 7 Dec 2014 22:41:04 +0000 (23:41 +0100)]
README: Added libfacter and librrd to list of prerequisites.

9 years agoAdded documentation and sample configuration for the facter backend.
Sebastian Harl [Thu, 4 Dec 2014 20:10:01 +0000 (21:10 +0100)]
Added documentation and sample configuration for the facter backend.

9 years agofacter plugin: Added a plugin collecting local facter values.
Sebastian Harl [Thu, 4 Dec 2014 19:55:00 +0000 (20:55 +0100)]
facter plugin: Added a plugin collecting local facter values.

The plugin uses libfacter from the cfacter project. libfacter is a C++
library, so the plugin is implemented in C++ as well using a small shim to
talk to SysDB.

9 years agoBootstrap the build system for C++ as well.
Sebastian Harl [Thu, 4 Dec 2014 16:35:45 +0000 (17:35 +0100)]
Bootstrap the build system for C++ as well.

That is, check CXX support for strict compiler flags.

Also, use all configured strict flags when checking for other strict flags.
This way, we detect problems when using flags that are not supported in C++
mode.

9 years agoUse stdbool.h's bool type instead of _Bool.
Sebastian Harl [Wed, 3 Dec 2014 21:20:45 +0000 (22:20 +0100)]
Use stdbool.h's bool type instead of _Bool.

That'll work with C++ as well.

9 years agoanalyzer: Analyze expressions as well; validate typed expressions.
Sebastian Harl [Tue, 2 Dec 2014 17:31:48 +0000 (18:31 +0100)]
analyzer: Analyze expressions as well; validate typed expressions.

Also, added various tests for typed expressions.

9 years agofrontend/grammar: Added support for <obj_type> . <obj_expression>.
Sebastian Harl [Mon, 1 Dec 2014 16:36:29 +0000 (17:36 +0100)]
frontend/grammar: Added support for <obj_type> . <obj_expression>.

… where <obj_expression> may be an arbitrary expression accessing an object's
fields or attributes.

9 years agostore: Added sdb_store_expr_typed.
Sebastian Harl [Mon, 1 Dec 2014 16:34:59 +0000 (17:34 +0100)]
store: Added sdb_store_expr_typed.

This function creates an expression which evaluates another expression in the
context of an object's sibling. The sibling is specified by type and refers to
a parent or child node of the specified type.

9 years agostore.h: Fixed a typo.
Sebastian Harl [Mon, 1 Dec 2014 08:03:05 +0000 (09:03 +0100)]
store.h: Fixed a typo.

9 years agocore/store.h: Reordered file to group related functions better.
Sebastian Harl [Fri, 28 Nov 2014 07:15:28 +0000 (08:15 +0100)]
core/store.h: Reordered file to group related functions better.

10 years agofrontend/scanner: Fixed parsing of time values.
Sebastian Harl [Sun, 23 Nov 2014 18:01:17 +0000 (19:01 +0100)]
frontend/scanner: Fixed parsing of time values.

It turns out, mktime() cannot be used to parse a time (at day 0). Let's do it
manually then, it's no big magic anyway ;-)

10 years agotimeseries::rrdtool: Limit to 1000 data-points for now.
Sebastian Harl [Sun, 23 Nov 2014 15:56:08 +0000 (16:56 +0100)]
timeseries::rrdtool: Limit to 1000 data-points for now.

That's good enough for most use cases (ought to be enough for anybody!) and
avoids excessive memory use when requesting data.

10 years agostore: Include in metric JSON whether access to time-series is available.
Sebastian Harl [Sat, 22 Nov 2014 10:24:53 +0000 (11:24 +0100)]
store: Include in metric JSON whether access to time-series is available.

… based on whether a time-series store is configured for the metric.

10 years agostore_json: Escape special characters in strings.
Sebastian Harl [Fri, 21 Nov 2014 23:03:49 +0000 (00:03 +0100)]
store_json: Escape special characters in strings.

10 years agoversion-gen.sh: Added .git suffix to default version again.
Sebastian Harl [Mon, 17 Nov 2014 20:32:45 +0000 (21:32 +0100)]
version-gen.sh: Added .git suffix to default version again.

10 years agoRelease SysDB 0.6.0. sysdb-0.6.0
Sebastian Harl [Mon, 17 Nov 2014 20:01:12 +0000 (21:01 +0100)]
Release SysDB 0.6.0.

10 years agoMake sure to print non-a-number as 'nan'.
Sebastian Harl [Mon, 17 Nov 2014 18:41:40 +0000 (19:41 +0100)]
Make sure to print non-a-number as 'nan'.

Some versions of GNU libc use '-nan' instead which we don't want. For example,
Go's JSON package doesn't support that at all.

10 years agosysdbql(7): Documented arrays.
Sebastian Harl [Fri, 14 Nov 2014 18:30:46 +0000 (19:30 +0100)]
sysdbql(7): Documented arrays.

10 years agoDrafted release notes for 0.6.0.
Sebastian Harl [Fri, 14 Nov 2014 07:43:42 +0000 (08:43 +0100)]
Drafted release notes for 0.6.0.

10 years agodata: Let concat support empty arrays; add various tests for empty arrays.
Sebastian Harl [Wed, 12 Nov 2014 21:59:03 +0000 (22:59 +0100)]
data: Let concat support empty arrays; add various tests for empty arrays.

10 years agoMerged branch 'master' of git://git.tokkee.org/sysdb.
Sebastian Harl [Wed, 12 Nov 2014 21:16:35 +0000 (22:16 +0100)]
Merged branch 'master' of git://git.tokkee.org/sysdb.

10 years agosysdbql(7): Documented <array> IN <array>.
Sebastian Harl [Wed, 12 Nov 2014 21:14:28 +0000 (22:14 +0100)]
sysdbql(7): Documented <array> IN <array>.

10 years agofrontend: Added support for array constants.
Sebastian Harl [Wed, 12 Nov 2014 21:10:47 +0000 (22:10 +0100)]
frontend: Added support for array constants.

10 years agodata: Let inarray() support <array> IN <array> checks.
Sebastian Harl [Wed, 12 Nov 2014 19:55:10 +0000 (20:55 +0100)]
data: Let inarray() support <array> IN <array> checks.

This check returns true if all elements of the first array are included in the
second array where order does not matter.

10 years agoRenamed CONNECTION_* constants to SDB_CONNECTION_*.
Sebastian Harl [Tue, 11 Nov 2014 17:49:49 +0000 (18:49 +0100)]
Renamed CONNECTION_* constants to SDB_CONNECTION_*.

All public symbols should use the "sdb" prefix.

10 years agodata: Support array + element concatenation.
Sebastian Harl [Mon, 10 Nov 2014 17:40:20 +0000 (18:40 +0100)]
data: Support array + element concatenation.

That is, concatenation may be used to prepend to or append to an array.

10 years agodata: Let strlen() and format() support string/decimal/integer arrays.
Sebastian Harl [Mon, 10 Nov 2014 08:33:36 +0000 (09:33 +0100)]
data: Let strlen() and format() support string/decimal/integer arrays.

10 years agocore: Improved style related to conditionals using many branches.
Sebastian Harl [Sun, 9 Nov 2014 14:39:22 +0000 (15:39 +0100)]
core: Improved style related to conditionals using many branches.

10 years agosysdbql(7): Documented iterator support for arrays.
Sebastian Harl [Sun, 9 Nov 2014 14:09:40 +0000 (15:09 +0100)]
sysdbql(7): Documented iterator support for arrays.

10 years agostore: Avoid unnecessary data copies when "evaluating" constant values.
Sebastian Harl [Sun, 9 Nov 2014 14:05:57 +0000 (15:05 +0100)]
store: Avoid unnecessary data copies when "evaluating" constant values.

10 years agostore: Let array iterators support regex matches as well.
Sebastian Harl [Sun, 9 Nov 2014 13:49:20 +0000 (14:49 +0100)]
store: Let array iterators support regex matches as well.

That is, all operators are supported now.

10 years agostore: Let NREGEX (!~) not match on NULL values.
Sebastian Harl [Sun, 9 Nov 2014 12:47:36 +0000 (13:47 +0100)]
store: Let NREGEX (!~) not match on NULL values.

10 years agoparser_test: Added various ANY/ALL iterator tests; also for arrays.
Sebastian Harl [Sun, 9 Nov 2014 10:49:47 +0000 (11:49 +0100)]
parser_test: Added various ANY/ALL iterator tests; also for arrays.

10 years agodata: Don't treat empty arrays (value = NULL) as NULL.
Sebastian Harl [Sun, 9 Nov 2014 10:48:03 +0000 (11:48 +0100)]
data: Don't treat empty arrays (value = NULL) as NULL.

Treating them as NULL leads to weird behavior when using ANY/ALL iterators.

10 years agostore, frontend: Added support for iterating arrays (using ALL / ANY).
Sebastian Harl [Sun, 9 Nov 2014 09:39:13 +0000 (10:39 +0100)]
store, frontend: Added support for iterating arrays (using ALL / ANY).

Currently, this is limited to the 'backend' field of an object. Also, only
simple statements like 'ANY/ALL <array> <cmp> <value>' are supported by the
store (in contrast to service/metric iterators which support arbitrary
matchers to be applied). Given that matchers are object based, this limitation
should feel natural, though.

10 years agostore.h: Use separate value ranges for object and field types.
Sebastian Harl [Sun, 9 Nov 2014 09:36:07 +0000 (10:36 +0100)]
store.h: Use separate value ranges for object and field types.

This allows to use the same flag to store either object or field types or even
a combination of both.

10 years agostore: Merged implementations of compare matchers.
Sebastian Harl [Sat, 8 Nov 2014 16:06:56 +0000 (17:06 +0100)]
store: Merged implementations of compare matchers.

This allowed to factor out the actual comparison functionality, thus making it
reusable.

10 years agodata: Added sdb_data_array_get().
Sebastian Harl [Sat, 8 Nov 2014 16:00:05 +0000 (17:00 +0100)]
data: Added sdb_data_array_get().

This function retrieves an array element, returning an "alias" to its value.

10 years agosysdbql(7): Updated documentation according to latest language changes.
Sebastian Harl [Fri, 7 Nov 2014 23:27:45 +0000 (00:27 +0100)]
sysdbql(7): Updated documentation according to latest language changes.

Lots of stuff has changed … and it's much better now :-)

10 years agofrontend/grammar: Drop support for the special 'host' field.
Sebastian Harl [Thu, 6 Nov 2014 09:10:06 +0000 (10:10 +0100)]
frontend/grammar: Drop support for the special 'host' field.

The old implementation didn't work when querying services or metrics and for
hosts it's the same as querying the 'name' field.

10 years agofrontend/grammar: Let LOOKUP support all object types.
Sebastian Harl [Wed, 5 Nov 2014 23:50:40 +0000 (00:50 +0100)]
frontend/grammar: Let LOOKUP support all object types.

10 years agofrontend: Let the 'lookup' command support services and metrics.
Sebastian Harl [Wed, 5 Nov 2014 23:47:16 +0000 (00:47 +0100)]
frontend: Let the 'lookup' command support services and metrics.

10 years agostore_lookup: Let the iter operators support services and metrics.
Sebastian Harl [Wed, 5 Nov 2014 23:28:00 +0000 (00:28 +0100)]
store_lookup: Let the iter operators support services and metrics.

10 years agofrontend: Let the analyzer report details about errors.
Sebastian Harl [Wed, 5 Nov 2014 23:20:20 +0000 (00:20 +0100)]
frontend: Let the analyzer report details about errors.

10 years agodata: Add to-string support for array types.
Sebastian Harl [Wed, 5 Nov 2014 23:19:49 +0000 (00:19 +0100)]
data: Add to-string support for array types.

10 years agofrontend: Improved parser error reporting.
Sebastian Harl [Wed, 5 Nov 2014 21:15:15 +0000 (22:15 +0100)]
frontend: Improved parser error reporting.

All error messages are now written to a string buffer, allowing them to be
displayed as part of the main error messages associated with failed commands.

10 years agofrontend/grammar: Added sdb_fe_yyerrorf() helper.
Sebastian Harl [Tue, 4 Nov 2014 22:36:11 +0000 (23:36 +0100)]
frontend/grammar: Added sdb_fe_yyerrorf() helper.

10 years agoutils/error: Added sdb_vlog().
Sebastian Harl [Tue, 4 Nov 2014 22:35:27 +0000 (23:35 +0100)]
utils/error: Added sdb_vlog().

This function is like sdb_log() but accept a va_list.

10 years agofrontend/grammar: Added support for FETCHing all object types.
Sebastian Harl [Tue, 4 Nov 2014 19:16:25 +0000 (20:16 +0100)]
frontend/grammar: Added support for FETCHing all object types.

10 years agofrontend: Let the parser run the analyzer.
Sebastian Harl [Tue, 4 Nov 2014 19:14:32 +0000 (20:14 +0100)]
frontend: Let the parser run the analyzer.

… but only when parsing a full statement. Otherwise, the analyzer is missing
the context for verification.

10 years agoparser_test: Fixed semantically invalid filter statements.
Sebastian Harl [Tue, 4 Nov 2014 19:10:32 +0000 (20:10 +0100)]
parser_test: Fixed semantically invalid filter statements.

These errors are only detected by the analyzer which is not used for the
parser test.

10 years agofrontend/analyzer: Check name parameters for FETCH.
Sebastian Harl [Tue, 4 Nov 2014 07:34:28 +0000 (08:34 +0100)]
frontend/analyzer: Check name parameters for FETCH.

10 years agofrontend: Fixed various size checks.
Sebastian Harl [Tue, 4 Nov 2014 07:30:26 +0000 (08:30 +0100)]
frontend: Fixed various size checks.

10 years agofrontend: Let the 'fetch' command support other types besides hosts.
Sebastian Harl [Tue, 4 Nov 2014 07:26:57 +0000 (08:26 +0100)]
frontend: Let the 'fetch' command support other types besides hosts.

10 years agostore: Added sdb_store_get_child().
Sebastian Harl [Mon, 3 Nov 2014 18:35:34 +0000 (19:35 +0100)]
store: Added sdb_store_get_child().

This function may be used to retrieve a host's child object (service, metric,
attribute) by it's name.

10 years agostore: Removed now unused tojson functions.
Sebastian Harl [Mon, 3 Nov 2014 06:43:20 +0000 (07:43 +0100)]
store: Removed now unused tojson functions.

10 years agofrontend: Let FETCH and LIST use JSON formatters.
Sebastian Harl [Mon, 3 Nov 2014 06:37:57 +0000 (07:37 +0100)]
frontend: Let FETCH and LIST use JSON formatters.

… instead of the old tojson functions.

10 years agofrontend: Let FETCH apply filters to the host as well.
Sebastian Harl [Mon, 3 Nov 2014 06:28:28 +0000 (07:28 +0100)]
frontend: Let FETCH apply filters to the host as well.

10 years agostore: Let JSON formatter know about the to-be-formatted object type.
Sebastian Harl [Sun, 2 Nov 2014 18:04:42 +0000 (19:04 +0100)]
store: Let JSON formatter know about the to-be-formatted object type.

When formatting services or metrics, expect those objects to be emitted on the
highest level and then create the host object for them first (once for a
series of objects belonging to the same host).

10 years agostore: Let the JSON formatter know about arrays at top level.
Sebastian Harl [Sun, 2 Nov 2014 17:02:25 +0000 (18:02 +0100)]
store: Let the JSON formatter know about arrays at top level.

There's no reason to require this to be handled separately.

10 years agot/: Added tests for json_formatter-based JSON generation.
Sebastian Harl [Sun, 2 Nov 2014 16:51:30 +0000 (17:51 +0100)]
t/: Added tests for json_formatter-based JSON generation.

10 years agostore: Record each object's parent.
Sebastian Harl [Sun, 2 Nov 2014 15:22:09 +0000 (16:22 +0100)]
store: Record each object's parent.

10 years agofrontend/query: Use the new JSON formatter to implement LOOKUP.
Sebastian Harl [Fri, 31 Oct 2014 17:53:16 +0000 (18:53 +0100)]
frontend/query: Use the new JSON formatter to implement LOOKUP.

This will allow for more flexiblity.

10 years agostore: Added a generic JSON formatter.
Sebastian Harl [Fri, 31 Oct 2014 17:48:34 +0000 (18:48 +0100)]
store: Added a generic JSON formatter.

It works by consuming single objects of any type (host, service, metric,
attribute) at a time and appending their JSON serialization to a string
buffer. The current position in the object tree is recorded in an internal
state.

A helper function is provided on top of the base formatter which allows to
handle an full object at a time.

10 years agostore: Provide more verbose messages on errors during scanning.
Sebastian Harl [Fri, 31 Oct 2014 16:14:04 +0000 (17:14 +0100)]
store: Provide more verbose messages on errors during scanning.

10 years agostore_lookup_test: Ensure that filters are applied before matchers.
Sebastian Harl [Fri, 31 Oct 2014 16:13:20 +0000 (17:13 +0100)]
store_lookup_test: Ensure that filters are applied before matchers.

10 years agosysdbql(7): Link to the JSON RFC.
Sebastian Harl [Thu, 30 Oct 2014 22:43:36 +0000 (23:43 +0100)]
sysdbql(7): Link to the JSON RFC.

10 years agostore: Let sdb_store_scan() pass on filters to callback functions.
Sebastian Harl [Thu, 30 Oct 2014 22:34:08 +0000 (23:34 +0100)]
store: Let sdb_store_scan() pass on filters to callback functions.

The callback function needs access to the filter anyway, so let's handle this
centrally.

10 years agostore: Use sdb_avltree_lookup() to retrieve attributes.
Sebastian Harl [Wed, 29 Oct 2014 16:41:04 +0000 (17:41 +0100)]
store: Use sdb_avltree_lookup() to retrieve attributes.

… rather than iterating through all attributes. D'oh!

10 years agostore: Let sdb_store_scan() support other object types besides hosts.
Sebastian Harl [Tue, 28 Oct 2014 17:17:35 +0000 (18:17 +0100)]
store: Let sdb_store_scan() support other object types besides hosts.

10 years agostore: Merged sdb_store_iterate() into sdb_store_scan().
Sebastian Harl [Tue, 28 Oct 2014 06:44:33 +0000 (07:44 +0100)]
store: Merged sdb_store_iterate() into sdb_store_scan().

These functions are really the same when using a NULL matcher and filter.

10 years agofrontend: Added basic support for semantic AST analysis.
Sebastian Harl [Mon, 27 Oct 2014 23:08:07 +0000 (00:08 +0100)]
frontend: Added basic support for semantic AST analysis.

For now, the analyzer checks the types of all matcher operands.

10 years agofrontend: Let scanner/parser know about object types and field names.
Sebastian Harl [Sun, 26 Oct 2014 09:10:21 +0000 (10:10 +0100)]
frontend: Let scanner/parser know about object types and field names.

This allows to handle all known objects and fields as part of the grammar
rather than manually parsing them and generating custom error messages.

10 years agofrontend/grammar: Access fields by their name rather than '.<name>'.
Sebastian Harl [Sat, 25 Oct 2014 20:45:32 +0000 (22:45 +0200)]
frontend/grammar: Access fields by their name rather than '.<name>'.

There's no more need for a special and somewhat weird syntax.

10 years agofrontend/grammar: Added support for 'ALL <obj> <cmp> <expr>'.
Sebastian Harl [Sat, 25 Oct 2014 20:22:45 +0000 (22:22 +0200)]
frontend/grammar: Added support for 'ALL <obj> <cmp> <expr>'.

This matches, if all of the specified objects match the specified expression.
ALL also matches on empty object lists.

10 years agostore: Removed unused types.
Sebastian Harl [Sat, 25 Oct 2014 20:10:12 +0000 (22:10 +0200)]
store: Removed unused types.

10 years agostore: Added support for ALL matchers.
Sebastian Harl [Sat, 25 Oct 2014 19:43:28 +0000 (21:43 +0200)]
store: Added support for ALL matchers.

Similar to ANY, this matcher iterators over objects. It matches, if *all* of
those objects match another matcher.

10 years agostore: Don't special case negated matchers in the ANY matcher.
Sebastian Harl [Sat, 25 Oct 2014 19:41:16 +0000 (21:41 +0200)]
store: Don't special case negated matchers in the ANY matcher.

The old behavior no longer makes sense when thinking about matching *any*
object.

10 years agofrontend/grammar: Changed '<obj> <cmp> <expr>' to 'ANY <obj> <cmp> <expr>'.
Sebastian Harl [Sat, 25 Oct 2014 12:31:06 +0000 (14:31 +0200)]
frontend/grammar: Changed '<obj> <cmp> <expr>' to 'ANY <obj> <cmp> <expr>'.

… for services, metrics, and attributes. That is, let this involve less magic
but make it clear that this looks at multiple objects and matches if any of
them match.

10 years agostore: Renamed child-matcher to any-matcher.
Sebastian Harl [Sat, 25 Oct 2014 11:58:58 +0000 (13:58 +0200)]
store: Renamed child-matcher to any-matcher.

It matches if any object of an iterable list matches, so this is a more
appropriate name.