aodh/ceilometer
Eoghan Glynn 4ca9550cfb Add simple capabilities API
Precursor-to: BP selectable-aggregates

The per-deployment variation in API capabilities is effectively
determined by the lack of strict feature parity across storage
drivers.

Currently we require that callers either know a priori which
features are provided and which not, or else to probe the API
and handle the NotImplementedErrors.

With the advent of more complexity in the API (complex queries,
selectable aggregates etc.) it would be useful to allow a more
direct interrogation of capabilities in the current deployment.

We expose the current set of capabilities in the form of a
simple nested dictionary, e.g.:

    {
        'meters': {'pagination': True,
                   'query': {'simple': True,
                             'complex': False}},
        'resources': {'pagination': False,
                      'query': {'simple': True,
                                'metadata': True,
                                'complex': False}},
        'samples': {'pagination': True,
                    'groupby': True,
                    'query': {'simple': True,
                              'complex': True}},
        'statistics': {'pagination': True,
                       'groupby': True,
                       'query': {'simple': True,
                                 'metadata': True,
                                 'complex': False},
                       'aggregation': {'standard': True,
                                       'selectable': {
                                           'max': True,
                                           'min': True,
                                           'sum': True,
                                           'avg': True,
                                           'count': True,
                                           'stddev': True,
                                           'cardinality': True,
                                           'quartile': False}}},
        'alarms': {'query': {'simple': True,
                             'complex': True},
                   'history': {'query': {'simple': True,
                                         'complex': True}}},
        'events': {'query': {'simple': True}},
    }

which is flattened in the usual way (using a similar approach as
used for resource metadata).

Leaf nodes of the capabilities representation are boolean, with
absence being implicitly False.

Change-Id: I8de9e153d7641d5d38ca9b79bab66887257c3010
2014-03-03 19:52:16 +00:00
..
2014-03-03 19:52:16 +00:00
2014-02-28 23:14:52 +00:00
2014-02-08 06:46:32 +01:00
2014-02-19 01:13:52 +00:00
2014-03-03 19:52:16 +00:00
2014-02-08 06:46:32 +01:00
2014-02-08 06:46:32 +01:00
2014-02-08 06:46:32 +01:00
2014-02-08 06:46:32 +01:00
2014-02-14 22:31:32 +08:00
2014-02-25 14:15:55 -05:00
2014-02-08 06:46:32 +01:00
2014-03-03 19:52:16 +00:00