1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Interfaces for the Launchpad application.
Note that these are not interfaces to application content objects.
"""
__metaclass__ = type
__all__ = [
'ILaunchpadCelebrities',
'ILaunchpadUsage',
'IServiceUsage',
]
from lazr.restful.declarations import exported
from zope.interface import (
Attribute,
Interface,
)
from zope.schema import (
Bool,
Choice,
)
from canonical.launchpad import _
from lp.app.enums import ServiceUsage
class ILaunchpadCelebrities(Interface):
"""Well known things.
Celebrities are SQLBase instances that have a well known name.
"""
admin = Attribute("The 'admins' team.")
bazaar_experts = Attribute("The Bazaar Experts team.")
software_center_agent = Attribute("The Software Center Agent.")
bug_importer = Attribute("The bug importer.")
bug_watch_updater = Attribute("The Bug Watch Updater.")
buildd_admin = Attribute("The Build Daemon administrator.")
commercial_admin = Attribute("The Launchpad Commercial team.")
debbugs = Attribute("The Debian Bug Tracker")
debian = Attribute("The Debian Distribution.")
english = Attribute("The English language.")
gnome_bugzilla = Attribute("The Gnome Bugzilla.")
hwdb_team = Attribute("The HWDB team.")
janitor = Attribute("The Launchpad Janitor.")
katie = Attribute("The Debian Auto-sync user.")
launchpad = Attribute("The Launchpad project.")
launchpad_beta_testers = Attribute("The Launchpad Beta Testers team.")
launchpad_developers = Attribute("The Launchpad development team.")
obsolete_junk = Attribute("The Obsolete Junk project.")
ppa_key_guard = Attribute("The PPA signing keys owner.")
registry_experts = Attribute("The Registry Administrators team.")
rosetta_experts = Attribute("The Rosetta Experts team.")
savannah_tracker = Attribute("The GNU Savannah Bug Tracker.")
sourceforge_tracker = Attribute("The SourceForge Bug Tracker")
ubuntu = Attribute("The Ubuntu Distribution.")
ubuntu_archive_mirror = Attribute("The main archive mirror for Ubuntu.")
ubuntu_branches = Attribute("The Ubuntu branches team")
ubuntu_bugzilla = Attribute("The Ubuntu Bugzilla.")
ubuntu_cdimage_mirror = Attribute("The main cdimage mirror for Ubuntu.")
ubuntu_security = Attribute("The 'ubuntu-security' team.")
ubuntu_techboard = Attribute("The Ubuntu technical board.")
vcs_imports = Attribute("The 'vcs-imports' team.")
def isCelebrityPerson(name):
"""Return true if there is an IPerson celebrity with the given name.
"""
class IServiceUsage(Interface):
"""Pillar service usages."""
# XXX: BradCrittenden 2010-08-06 bug=n/a: I hate using the term 'pillar'
# but cannot use 'project' or 'distribution'. The phrase 'Where does'
# implies an actual location not an answer of "Launchpad, externally, or
# neither."
answers_usage = Choice(
title=_('Type of service for answers application'),
description=_("Where does this pillar have an Answers forum?"),
default=ServiceUsage.UNKNOWN,
vocabulary=ServiceUsage)
blueprints_usage = Choice(
title=_('Type of service for blueprints application'),
description=_("Where does this pillar host blueprints?"),
default=ServiceUsage.UNKNOWN,
vocabulary=ServiceUsage)
codehosting_usage = Choice(
title=_('Type of service for hosting code'),
description=_("Where does this pillar host code?"),
default=ServiceUsage.UNKNOWN,
vocabulary=ServiceUsage)
translations_usage = exported(Choice(
title=_('Type of service for translations application'),
description=_("Where does this pillar do translations?"),
default=ServiceUsage.UNKNOWN,
vocabulary=ServiceUsage), as_of="devel")
bug_tracking_usage = Choice(
title=_('Type of service for tracking bugs'),
description=_("Where does this pillar track bugs?"),
default=ServiceUsage.UNKNOWN,
vocabulary=ServiceUsage)
uses_launchpad = Bool(
title=_('Uses Launchpad for something.'))
class ILaunchpadUsage(Interface):
"""How the project uses Launchpad."""
official_answers = Bool(
title=_('People can ask questions in Launchpad Answers'),
required=True)
official_blueprints = Bool(
title=_('This project uses blueprints'), required=True)
official_codehosting = Bool(
title=_('Code for this project is published in Bazaar branches on'
' Launchpad'),
required=True)
official_malone = Bool(
title=_('Bugs in this project are tracked in Launchpad'),
required=True)
official_rosetta = Bool(
title=_('Translations for this project are done in Launchpad'),
required=True)
official_anything = Bool(
title=_('Uses Launchpad for something'))
enable_bug_expiration = Bool(
title=_('Expire "Incomplete" bug reports when they become inactive'),
required=True)
|