diff --git a/src/frontend/grammar.y b/src/frontend/grammar.y
index a444423b409ce6854190b5d9e9ef7812fe702a5a..a2ae448cc744166875afd8e0f4904b5a186ad5cf 100644 (file)
--- a/src/frontend/grammar.y
+++ b/src/frontend/grammar.y
* Retrieve detailed information about a single host.
*/
fetch_statement:
- FETCH STRING
+ FETCH STRING filter_clause
{
$$ = SDB_CONN_NODE(sdb_object_create_dT(/* name = */ NULL,
conn_fetch_t, conn_fetch_destroy));
CONN_FETCH($$)->name = strdup($2);
+ CONN_FETCH($$)->filter = CONN_MATCHER($3);
$$->cmd = CONNECTION_FETCH;
free($2); $2 = NULL;
}
* Returns a list of all hosts in the store.
*/
list_statement:
- LIST
+ LIST filter_clause
{
- $$ = SDB_CONN_NODE(sdb_object_create_T(/* name = */ NULL,
- sdb_conn_node_t));
+ $$ = SDB_CONN_NODE(sdb_object_create_dT(/* name = */ NULL,
+ conn_list_t, conn_list_destroy));
+ CONN_LIST($$)->filter = CONN_MATCHER($2);
$$->cmd = CONNECTION_LIST;
}
;