~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/interfaces/sourcepackagerecipe.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-10-19 02:33:39 UTC
  • mfrom: (14162.1.4 bug-870130)
  • Revision ID: launchpad@pqm.canonical.com-20111019023339-1i3g2tzvz00gme5a
[r=gmb][bug=870130] Exclude some problematic attributes from API
 snapshots.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
# pylint: disable-msg=E0211,E0213,F0401
19
19
 
20
20
from textwrap import dedent
21
21
 
 
22
from lazr.lifecycle.snapshot import doNotSnapshot
22
23
from lazr.restful.declarations import (
23
24
    call_with,
24
25
    export_as_webservice_entry,
82
83
    deb_version_template = exported(
83
84
        TextLine(
84
85
            title=_('deb-version template'), readonly=True,
85
 
            description = _(
 
86
            description=_(
86
87
                'The template that will be used to generate a deb version.')))
87
88
 
88
89
    def getReferencedBranches():
104
105
 
105
106
    recipe_text = exported(Text(readonly=True))
106
107
 
107
 
    pending_builds = exported(
 
108
    pending_builds = exported(doNotSnapshot(
108
109
        CollectionField(
109
110
            title=_("The pending builds of this recipe."),
110
111
            description=_('Pending builds of this recipe, sorted in '
111
112
                    'descending order of creation.'),
112
113
            value_type=Reference(schema=Interface),
113
 
            readonly=True))
 
114
            readonly=True)))
114
115
 
115
 
    completed_builds = exported(
 
116
    completed_builds = exported(doNotSnapshot(
116
117
        CollectionField(
117
118
            title=_("The completed builds of this recipe."),
118
119
            description=_('Completed builds of this recipe, sorted in '
119
120
                    'descending order of finishing (or starting if not'
120
121
                    'completed successfully).'),
121
122
            value_type=Reference(schema=Interface),
122
 
            readonly=True))
 
123
            readonly=True)))
123
124
 
124
 
    builds = exported(
 
125
    builds = exported(doNotSnapshot(
125
126
        CollectionField(
126
127
            title=_("All builds of this recipe."),
127
128
            description=_('All builds of this recipe, sorted in '
128
129
                    'descending order of finishing (or starting if not'
129
130
                    'completed successfully).'),
130
131
            value_type=Reference(schema=Interface),
131
 
            readonly=True))
 
132
            readonly=True)))
132
133
 
133
134
    last_build = exported(
134
135
        Reference(