1
# Copyright 2011 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
"""Interfaces for querying OOPS references."""
13
from lazr.restful.declarations import (
14
export_read_operation,
15
operation_for_version,
18
from zope.interface import (
21
from zope.schema import (
25
from canonical.launchpad import _
28
class IHasOOPSReferences(Interface):
29
"""Has references to OOPSes that can be queried."""
31
@operation_parameters(
32
start_date=Datetime(title=_("Modified after date")),
33
end_date=Datetime(title=_("Modified before date")),
35
@export_read_operation()
36
@operation_for_version('devel')
37
def findReferencedOOPS(start_date, end_date):
38
"""Find OOPS reports between start_date and end_date.
40
:param start_date: Do not look in objects whose last modification time
42
:param end_date: Do not look in objects whose last modification time
44
:return: A set of OOPS id's - strings of the form 'OOPS-\w+'.