diff options
author | huangtianhua <huangtianhua@huawei.com> | 2014-07-03 12:01:08 +0800 |
---|---|---|
committer | huangtianhua <huangtianhua@huawei.com> | 2014-07-15 17:21:31 +0800 |
commit | 0b50be300e9656c62a19d0fa2a3fec9cc9ba4119 (patch) | |
tree | d6fc71bc81a5b9ffcf2590d111eed56c10ba6abf /heat/rpc/client.py | |
parent | 170781b7c7914b7df09934d03b89a5ace374d26f (diff) | |
download | heat-0b50be300e9656c62a19d0fa2a3fec9cc9ba4119.tar.gz |
Implement events pagination, sorting and filtering
It supports pagination(limit and marker),
sorting(sort_keys and sort_dir) and filtering(filters) of
the results for events-list.
Implements blueprint events-pagination
Change-Id: I1892d0c19d0c6355bb5c88e4a0bc4daa59460b72
Diffstat (limited to 'heat/rpc/client.py')
-rw-r--r-- | heat/rpc/client.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/heat/rpc/client.py b/heat/rpc/client.py index 8b36d7bce..6babef9d6 100644 --- a/heat/rpc/client.py +++ b/heat/rpc/client.py @@ -262,15 +262,29 @@ class EngineClient(object): return self.call(ctxt, self.make_msg('generate_template', type_name=type_name)) - def list_events(self, ctxt, stack_identity): + def list_events(self, ctxt, stack_identity, filters=None, limit=None, + marker=None, sort_keys=None, sort_dir=None,): """ The list_events method lists all events associated with a given stack. + It supports pagination (``limit`` and ``marker``), + sorting (``sort_keys`` and ``sort_dir``) and filtering(filters) + of the results. :param ctxt: RPC context. - :param stack_identity: Name of the stack you want to get events for. + :param stack_identity: Name of the stack you want to get events for + :param filters: a dict with attribute:value to filter the list + :param limit: the number of events to list (integer or string) + :param marker: the ID of the last event in the previous page + :param sort_keys: an array of fields used to sort the list + :param sort_dir: the direction of the sort ('asc' or 'desc'). """ return self.call(ctxt, self.make_msg('list_events', - stack_identity=stack_identity)) + stack_identity=stack_identity, + filters=filters, + limit=limit, + marker=marker, + sort_keys=sort_keys, + sort_dir=sort_dir)) def describe_stack_resource(self, ctxt, stack_identity, resource_name): """ |