~launchpad-pqm/launchpad/devel

13257.3.2 by Brad Crittenden
Added IProcessorFamily to webservice to allow it to be exported
1
# Copyright 2010-2011 Canonical Ltd.  This software is licensed under the
11882.3.13 by Jonathan Lange
Explicitly expose soyuz webservice stuff.
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
11882.3.15 by Jonathan Lange
Some documentational redundancy to help others spend less time than I did.
4
"""All the interfaces that are exposed through the webservice.
5
6
There is a declaration in ZCML somewhere that looks like:
7
  <webservice:register module="lp.soyuz.interfaces.webservice" />
8
9
which tells `lazr.restful` that it should look for webservice exports here.
10
"""
11882.3.13 by Jonathan Lange
Explicitly expose soyuz webservice stuff.
11
12
__all__ = [
13
    'AlreadySubscribed',
14
    'ArchiveDisabled',
15
    'ArchiveNotPrivate',
16
    'CannotBeRescored',
17
    'CannotCopy',
18
    'CannotSwitchPrivacy',
19
    'CannotUploadToArchive',
20
    'CannotUploadToPPA',
21
    'CannotUploadToPocket',
22
    'ComponentNotFound',
23
    'DuplicatePackagesetName',
24
    'IArchive',
25
    'IArchiveDependency',
26
    'IArchivePermission',
27
    'IArchiveSubscriber',
28
    'IBinaryPackageBuild',
29
    'IBinaryPackagePublishingHistory',
30
    'IBinaryPackageReleaseDownloadCount',
31
    'IDistroArchSeries',
32
    'IPackageUpload',
33
    'IPackageset',
34
    'IPackagesetSet',
13240.2.3 by Brad Crittenden
Broken to hell
35
    'IProcessor',
13257.3.2 by Brad Crittenden
Added IProcessorFamily to webservice to allow it to be exported
36
    'IProcessorFamily',
13240.2.3 by Brad Crittenden
Broken to hell
37
    'IProcessorFamilySet',
13387.1.13 by Francis J. Lacoste
Some lint.
38
    'IProcessorSet',
11882.3.22 by Jonathan Lange
Missed one
39
    'ISourcePackagePublishingHistory',
11882.3.13 by Jonathan Lange
Explicitly expose soyuz webservice stuff.
40
    'IncompatibleArguments',
41
    'InsufficientUploadRights',
42
    'InvalidComponent',
43
    'InvalidPocketForPPA',
44
    'InvalidPocketForPartnerArchive',
45
    'NoRightsForArchive',
46
    'NoRightsForComponent',
47
    'NoSuchPPA',
48
    'NoSuchPackageSet',
49
    'NoTokensForTeams',
50
    'PocketNotFound',
51
    'VersionRequiresName',
52
    ]
53
14612.2.1 by William Grant
format-imports on lib/. So many imports.
54
# XXX: JonathanLange 2010-11-09 bug=673083: Legacy work-around for circular
55
# import bugs.  Break this up into a per-package thing.
56
from lp import _schema_circular_imports
14560.2.8 by Curtis Hovey
Moved api helpers to lp.services.webservice.
57
from lp.services.webservice.apihelpers import (
14550.1.1 by Steve Kowalik
Run format-imports over lib/lp and lib/canonical/launchpad
58
    patch_collection_property,
59
    patch_plain_parameter_type,
60
    patch_reference_property,
61
    )
11882.3.13 by Jonathan Lange
Explicitly expose soyuz webservice stuff.
62
from lp.soyuz.interfaces.archive import (
63
    AlreadySubscribed,
64
    ArchiveDisabled,
65
    ArchiveNotPrivate,
66
    CannotCopy,
67
    CannotSwitchPrivacy,
68
    CannotUploadToArchive,
14550.1.1 by Steve Kowalik
Run format-imports over lib/lp and lib/canonical/launchpad
69
    CannotUploadToPocket,
11882.3.13 by Jonathan Lange
Explicitly expose soyuz webservice stuff.
70
    CannotUploadToPPA,
71
    ComponentNotFound,
72
    IArchive,
73
    InsufficientUploadRights,
74
    InvalidComponent,
14550.1.1 by Steve Kowalik
Run format-imports over lib/lp and lib/canonical/launchpad
75
    InvalidPocketForPartnerArchive,
11882.3.13 by Jonathan Lange
Explicitly expose soyuz webservice stuff.
76
    InvalidPocketForPPA,
77
    NoRightsForArchive,
78
    NoRightsForComponent,
79
    NoSuchPPA,
80
    NoTokensForTeams,
81
    PocketNotFound,
82
    VersionRequiresName,
83
    )
84
from lp.soyuz.interfaces.archivedependency import IArchiveDependency
85
from lp.soyuz.interfaces.archivepermission import IArchivePermission
86
from lp.soyuz.interfaces.archivesubscriber import IArchiveSubscriber
87
from lp.soyuz.interfaces.binarypackagebuild import (
88
    CannotBeRescored,
89
    IBinaryPackageBuild,
90
    )
91
from lp.soyuz.interfaces.binarypackagerelease import (
92
    IBinaryPackageReleaseDownloadCount,
93
    )
14550.1.1 by Steve Kowalik
Run format-imports over lib/lp and lib/canonical/launchpad
94
from lp.soyuz.interfaces.buildrecords import IncompatibleArguments
11882.3.13 by Jonathan Lange
Explicitly expose soyuz webservice stuff.
95
from lp.soyuz.interfaces.distroarchseries import IDistroArchSeries
96
from lp.soyuz.interfaces.packageset import (
97
    DuplicatePackagesetName,
98
    IPackageset,
99
    IPackagesetSet,
100
    NoSuchPackageSet,
101
    )
13240.2.3 by Brad Crittenden
Broken to hell
102
from lp.soyuz.interfaces.processor import (
103
    IProcessor,
104
    IProcessorFamily,
105
    IProcessorFamilySet,
13387.1.11 by Francis J. Lacoste
Export processors collection.
106
    IProcessorSet,
13240.2.3 by Brad Crittenden
Broken to hell
107
    )
11882.3.22 by Jonathan Lange
Missed one
108
from lp.soyuz.interfaces.publishing import (
109
    IBinaryPackagePublishingHistory,
110
    ISourcePackagePublishingHistory,
111
    )
11882.3.13 by Jonathan Lange
Explicitly expose soyuz webservice stuff.
112
from lp.soyuz.interfaces.queue import IPackageUpload
13240.2.4 by Brad Crittenden
Builds WADL without error. May include some unnecessary work-arounds.
113
13240.2.5 by Brad Crittenden
Add work-around for bug 760849
114
13387.1.13 by Francis J. Lacoste
Some lint.
115
_schema_circular_imports
13240.2.4 by Brad Crittenden
Builds WADL without error. May include some unnecessary work-arounds.
116
13240.2.17 by Brad Crittenden
Moved circular patching to local webservice file per review suggestion.
117
# IProcessor
118
patch_reference_property(
119
    IProcessor, 'family', IProcessorFamily)
120
121
patch_collection_property(
122
    IArchive, 'enabled_restricted_families', IProcessorFamily)
123
patch_plain_parameter_type(
124
    IArchive, 'enableRestrictedFamily', 'family', IProcessorFamily)