~launchpad-pqm/launchpad/devel

7675.391.6 by Muharem Hrnjadovic
Added 'buildpackagejob' interface/model classes.
1
# Copyright 2009 Canonical Ltd.  This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
4
# pylint: disable-msg=E0211,E0213
5
6
"""BuildPackageJob interfaces."""
7
8
__metaclass__ = type
9
10
__all__ = [
11
    'IBuildPackageJob',
12
    ]
13
11403.1.4 by Henning Eggers
Reformatted imports using format-imports script r32.
14
from lazr.restful.fields import Reference
7675.391.6 by Muharem Hrnjadovic
Added 'buildpackagejob' interface/model classes.
15
from zope.schema import Int
16
17
from canonical.launchpad import _
18
from lp.services.job.interfaces.job import IJob
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
19
from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuild
10466.9.5 by Jeroen Vermeulen
Prototype with weird timezone-related test failure in test_min_time_to_next_builder.
20
from lp.soyuz.interfaces.buildfarmbuildjob import IBuildFarmBuildJob
21
22
23
class IBuildPackageJob(IBuildFarmBuildJob):
7675.391.6 by Muharem Hrnjadovic
Added 'buildpackagejob' interface/model classes.
24
    """A read-only interface for build package jobs."""
10130.7.10 by Jonathan Lange
Add a model class for the job
25
7675.391.6 by Muharem Hrnjadovic
Added 'buildpackagejob' interface/model classes.
26
    id = Int(title=_('ID'), required=True, readonly=True)
27
7675.391.11 by Muharem Hrnjadovic
Build fixes.
28
    job = Reference(
7675.390.5 by Muharem Hrnjadovic
Review changes, round 1.
29
        IJob, title=_("Job"), required=True, readonly=True,
30
        description=_("Data common to all job types."))
10130.2.5 by William Grant
Remove the IBuildFarmJob.build hack. It wasn't as necessary as we thought.
31
32
    build = Reference(
10667.2.2 by Michael Nelson
Mass renaming of imports and references to IBuild/Build/IBuildSet
33
        IBinaryPackageBuild, title=_("Build"),
10130.7.10 by Jonathan Lange
Add a model class for the job
34
        required=True, readonly=True,
10130.2.5 by William Grant
Remove the IBuildFarmJob.build hack. It wasn't as necessary as we thought.
35
        description=_("Build record associated with this job."))