Merge lp:~andreserl/maas/lp1604901 into lp:~maas-committers/maas/trunk

Proposed by Andres Rodriguez
Status: Merged
Merged at revision: 5191
Proposed branch: lp:~andreserl/maas/lp1604901
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 25 lines (+7/-1)
1 file modified
src/maasserver/api/events.py (+7/-1)
To merge this branch: bzr merge lp:~andreserl/maas/lp1604901
Reviewer Review Type Date Requested Status
Mike Pontillo (community) Approve
Review via email: mp+300673@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Looks good to me.

As an aside, I wonder why we chose 1000 as an arbitrary limit. It seems like it would be fine for it to be higher, for ease-of-API-use in support cases.

review: Approve
Revision history for this message
LaMont Jones (lamont) wrote :

I believe that my suggested wording is more in line with other API docstrings.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/api/events.py'
2--- src/maasserver/api/events.py 2016-04-12 22:25:44 +0000
3+++ src/maasserver/api/events.py 2016-07-20 22:15:43 +0000
4@@ -26,7 +26,7 @@
5 from maasserver.models.eventtype import LOGGING_LEVELS_BY_NAME
6
7
8-MAX_EVENT_LOG_COUNT = 1000
9+MAX_EVENT_LOG_COUNT =
10 DEFAULT_EVENT_LOG_LIMIT = 100
11
12
13@@ -89,6 +89,12 @@
14 :param level: Desired minimum log level of returned events. Returns
15 this level of events and greater. Choose from: %(log_levels)s.
16 The default is INFO.
17+ :param limit: Optional number of events to return. Default 100.
18+ Maximum: 1000.
19+ :param before: Optional event id. Defines where to start returning
20+ older events.
21+ :param after: Optional event id. Defines where to start returning
22+ newer events.
23 """
24 # Filter first by optional node ID, hostname, MAC, etc.
25 nodes = filtered_nodes_list_from_request(request)