src.ctf.lttng-live: handle `babeltrace.support-info` query object
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Aug 2019 00:05:29 +0000 (20:05 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Aug 2019 16:35:04 +0000 (12:35 -0400)
commit312df793e96fb4b62c153553186b960108e38f1b
tree5b9e3241f62b55ae8fd2ca740748cfdce681468c
parent847ab606a7c62eccf63c86e4030a667e57d5b3e8
src.ctf.lttng-live: handle `babeltrace.support-info` query object

This patch makes a `src.ctf.lttng-live` component class handle the
`babeltrace.support-info` query object. The query method replies a
weight of 0.75 (arbitrary, but it leaves some room for other component
classes to recognize this very specific URL format) when the input
string matches

    net://HOST[:PORT]/host/TGTHOST/SESSION

This makes it possible to create a conversion graph with a
`src.ctf.lttng-live` source like this:

    babeltrace2 net://localhost/host/qualinet/pour-un-travail-sans-retouche

Note that this will use the component's default "session not found"
action which is to continue, so the `src.ctf.lttng-live` message
iterator will never end. The legacy mode still works, however; when you
do:

    babeltrace2 -i lttng-live net://localhost/host/tgthost/session

the `convert` command adds the `session-not-found-action=end` parameter.

As such, when you do:

    babeltrace2 -i lttng-live net://localhost/host/tgthost

the `convert` command queries the `sessions` object to list the
available remote tracing sessions.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I73e38df1dfe9bed6d8e31015197a34945af026e5
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1944
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
src/plugins/ctf/lttng-live/lttng-live.c
This page took 0.024745 seconds and 4 git commands to generate.