lc-tool will be the initial UI to validate the data view concept. It will serve both as a development tool assisting users with development of their data views and as a very simple reporting tool to simply display some data as a table.

Release Note



We want to allow users to experiment with data views during development stages (for the data views they create). Later on lc-tool can be used as a poor man's reporting tool.

User stories

Michael Hope wants to start digging into Launch Control database. He just heard about this new concept and wants to get started. He wants to run the example data views that are provided on the server he's working with (either, or his own server from the ppa:zkrynicki/lava). Michael uses the new commands to discover and experiment with the data views. He can use this tool to learn about Launch Control database schema.

Torez Smith wants to create a report showing how power management working group changes are affecting C-states across hardware. She starts by using SQL shell to the database to figure out how a query should look like. After getting the query right she registers the data view with her local dashboard and uses lc-tool to check how the query responds to various arguments she provided. Using lc-tool she can start producing simple reports that get sent by email daily.


This tool will be used as a validation for the data view concept, it's not designed to be a full-fledged reporting solution (for that we'll have client-side reporting in another blueprint)


The design is straightforward. We'll use existing infrastructure in lc-tool to wrap new API exposed by the server. The front-end is very limited and mostly displays/formats what the server returned.


lc-tool will be extended to support this new XML-RPC API, existing generic tabular dataset renderer present in lc-tool will be used to display the results.

UI Changes


 lc-tool query-data-view NAME [--argument=value]...
 Query the data view with the specified NAME.

 Any required arguments (as announced by the data view) will be registered as special commands
 to this sub-command. Optional arguments may be omitted for server-specified defaults.
 The result will be displayed as a tabular data.

Exapmle output for lc-tool query-data-view --help

$ lc-tool query-data-view --help

Usage: lc-tool query-data-view [NAME] ...

Query specified data view.

The actual arguments depend on the data view.
See lc-tool query-data-view <selected-data-view> --help

Example output for lc-tool query-data-view bundle-stream-stats --help

$ lc-tool query-data-view bundle-stream-stats --help

bundle-stream-stats([pathname], [order_by]) - Simple query mimicking the result of lc-tool bundles

  pathname: optional string, defaults to "" (empty string)
  order_by: optional string, defaults to "pathname"

  This query is a small demo that shows how data views can be used to implement
  existing lc-tool commands. This particular view shows the same data as `lc-tool streams`
  but also allows to change sorting and filter results by pathname.

Example output for lc-tool query-data-view bundle-stream-stats:

$ lc-tool query-data-view bundle-stream-stats
                             Bundle Stream Statistic                                
             Pathname              | Number of bundles |         Name        
/anonymous/zyga/                   | 1                 | Restored from backup
/anonymous/panda01-stream/         | 2                 | Restored from backup
/anonymous/                        | 0                 | Restored from backup
/anonymous/panda01-ltp/            | 1                 | Restored from backup
/anonymous/panda01-posixtestsuite/ | 1                 | Restored from backup
/anonymous/gcc/                    | 1565              | Restored from backup


 lc-tool data-views
 List all registered data views

Example output

$ lc-tool data-views
                             Available Data Views                                
         Name       |                          Summary
bundle-stream-stats | Simple query mimicking the result of lc-tool bundles

Code Changes

Some changes to launch_control_tool/commands/ + possible changes to dispatcher to support early peek at arguments to support server-side arguments (that is command which arguments depend on interaction with the server)



Test/Demo Plan

This feature will be delivered in the 0.4 series for launch-control-tool (by accident sharing version with launch-control) A PPA will have up-to-date packages for quick turnover.

Unresolved issues


BoF agenda and discussion


CategorySpec CategoryTemplate

Platform/Validation/Specs/Accessing Data Views in Launch Control Tool (last modified 2011-04-07 13:28:54)