launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28604
[Merge] ~cjwatson/launchpad:schema-explicit-versions-registry into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:schema-explicit-versions-registry into launchpad:master.
Commit message:
Set explicit webservice versions for lp.registry
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/424905
Similar to https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/423611.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:schema-explicit-versions-registry into launchpad:master.
diff --git a/lib/lp/_schema_circular_imports.py b/lib/lp/_schema_circular_imports.py
index cbac27d..53731e5 100644
--- a/lib/lp/_schema_circular_imports.py
+++ b/lib/lp/_schema_circular_imports.py
@@ -94,49 +94,20 @@ from lp.registry.interfaces.distroseriesdifference import (
from lp.registry.interfaces.distroseriesdifferencecomment import (
IDistroSeriesDifferenceComment,
)
-from lp.registry.interfaces.gpg import IGPGKey
-from lp.registry.interfaces.irc import IIrcID
-from lp.registry.interfaces.jabber import IJabberID
-from lp.registry.interfaces.milestone import (
- IHasMilestones,
- IMilestone,
- )
from lp.registry.interfaces.ociproject import IOCIProject
from lp.registry.interfaces.person import (
IPerson,
IPersonEditRestricted,
IPersonLimitedView,
IPersonViewRestricted,
- ITeam,
- )
-from lp.registry.interfaces.pillar import (
- IPillar,
- IPillarNameSet,
- )
-from lp.registry.interfaces.product import (
- IProduct,
- IProductSet,
- )
-from lp.registry.interfaces.productrelease import (
- IProductRelease,
- IProductReleaseFile,
- )
-from lp.registry.interfaces.productseries import (
- IProductSeries,
- ITimelineProductSeries,
- )
-from lp.registry.interfaces.projectgroup import (
- IProjectGroup,
- IProjectGroupSet,
)
+from lp.registry.interfaces.product import IProduct
+from lp.registry.interfaces.productseries import IProductSeries
from lp.registry.interfaces.sourcepackage import (
ISourcePackage,
ISourcePackageEdit,
ISourcePackagePublic,
)
-from lp.registry.interfaces.ssh import ISSHKey
-from lp.registry.interfaces.teammembership import ITeamMembership
-from lp.registry.interfaces.wikiname import IWikiName
from lp.services.auth.interfaces import IAccessToken
from lp.services.comments.interfaces.conversation import IComment
from lp.services.fields import InlineObject
@@ -790,9 +761,6 @@ patch_operations_explicit_version(
ICodeReviewVoteReference, 'beta', "claimReview", "delete",
"reassignReview")
-# ICommercialSubscription
-patch_entry_explicit_version(ICommercialSubscription, 'beta')
-
# ICountry
patch_entry_explicit_version(ICountry, 'beta')
@@ -800,55 +768,12 @@ patch_entry_explicit_version(ICountry, 'beta')
patch_operations_explicit_version(
ICountrySet, 'beta', "getByCode", "getByName")
-# IDistribution
-patch_operations_explicit_version(
- IDistribution, 'beta', "getArchive", "getCountryMirror",
- "getDevelopmentSeries", "getMirrorByName", "getSeries",
- "getSourcePackage", "searchSourcePackages")
-
-# IDistributionMirror
-patch_entry_explicit_version(IDistributionMirror, 'beta')
-patch_operations_explicit_version(
- IDistributionMirror, 'beta', "canTransitionToCountryMirror",
- "getOverallFreshness", "isOfficial", "transitionToCountryMirror")
-
-# IDistributionSourcePackage
-patch_entry_explicit_version(IDistributionSourcePackage, 'beta')
-
# IDistroArchSeries
patch_entry_explicit_version(IDistroArchSeries, 'beta')
-# IDistroSeries
-patch_entry_explicit_version(IDistroSeries, 'beta')
-patch_operations_explicit_version(
- IDistroSeries, 'beta', "initDerivedDistroSeries", "getDerivedSeries",
- "getParentSeries", "getDistroArchSeries", "getPackageUploads",
- "getSourcePackage", "newMilestone")
-
-# IDistroSeriesDifference
-patch_entry_explicit_version(IDistroSeriesDifference, 'beta')
-patch_operations_explicit_version(
- IDistroSeriesDifference, 'beta', "addComment", "blocklist",
- "requestPackageDiffs", "unblocklist")
-
-# IDistroSeriesDifferenceComment
-patch_entry_explicit_version(IDistroSeriesDifferenceComment, 'beta')
-
-# IGPGKey
-patch_entry_explicit_version(IGPGKey, 'beta')
-
-# IHasMilestones
-patch_entry_explicit_version(IHasMilestones, 'beta')
-
# IHasTranslationImports
patch_entry_explicit_version(IHasTranslationImports, 'beta')
-# IIrcID
-patch_entry_explicit_version(IIrcID, 'beta')
-
-# IJabberID
-patch_entry_explicit_version(IJabberID, 'beta')
-
# ILanguage
patch_entry_explicit_version(ILanguage, 'beta')
@@ -858,9 +783,6 @@ patch_operations_explicit_version(ILanguageSet, 'beta', "getAllLanguages")
# IMessage
patch_entry_explicit_version(IMessage, 'beta')
-# IMilestone
-patch_entry_explicit_version(IMilestone, 'beta')
-
# IPOFile
patch_entry_explicit_version(IPOFile, 'beta')
@@ -881,59 +803,9 @@ patch_operations_explicit_version(
patch_operations_explicit_version(
IPackagesetSet, 'beta', "getByName", "new", "setsIncludingSource")
-# IPerson
-patch_entry_explicit_version(IPerson, 'beta')
-
-# IPillar
-patch_entry_explicit_version(IPillar, 'beta')
-
-# IPillarNameSet
-patch_entry_explicit_version(IPillarNameSet, 'beta')
-patch_operations_explicit_version(
- IPillarNameSet, 'beta', "search")
-
# IPreviewDiff
patch_entry_explicit_version(IPreviewDiff, 'beta')
-# IProduct
-patch_entry_explicit_version(IProduct, 'beta')
-patch_operations_explicit_version(
- IProduct, 'beta', "getRelease", "getSeries", "getTimeline", "newSeries")
-
-# IProductRelease
-patch_entry_explicit_version(IProductRelease, 'beta')
-patch_operations_explicit_version(
- IProductRelease, 'beta', "addReleaseFile", "destroySelf")
-
-# IProductReleaseFile
-patch_entry_explicit_version(IProductReleaseFile, 'beta')
-patch_operations_explicit_version(
- IProductReleaseFile, 'beta', "destroySelf")
-
-# IProductSeries
-patch_entry_explicit_version(IProductSeries, 'beta')
-patch_operations_explicit_version(
- IProductSeries, 'beta', "getTimeline", "newMilestone")
-
-# IProductSet
-patch_operations_explicit_version(
- IProductSet, 'beta', "createProduct", "forReview", "latest", "search")
-
-# IProjectGroup
-patch_entry_explicit_version(IProjectGroup, 'beta')
-
-# IProjectGroupSet
-patch_operations_explicit_version(
- IProjectGroupSet, 'beta', "search")
-
-# ISSHKey
-patch_entry_explicit_version(ISSHKey, 'beta')
-
-# ISourcePackage
-patch_entry_explicit_version(ISourcePackage, 'beta')
-patch_operations_explicit_version(
- ISourcePackage, 'beta', "getBranch", "linkedBranches", "setBranch")
-
# ISourcePackagePublishingHistory
patch_entry_explicit_version(ISourcePackagePublishingHistory, 'beta')
patch_operations_explicit_version(
@@ -950,17 +822,6 @@ patch_operations_explicit_version(
# ISourcePackageRecipeBuild
patch_entry_explicit_version(ISourcePackageRecipeBuild, 'beta')
-# ITeam
-patch_entry_explicit_version(ITeam, 'beta')
-
-# ITeamMembership
-patch_entry_explicit_version(ITeamMembership, 'beta')
-patch_operations_explicit_version(
- ITeamMembership, 'beta', "setExpirationDate", "setStatus")
-
-# ITimelineProductSeries
-patch_entry_explicit_version(ITimelineProductSeries, 'beta')
-
# ITranslationGroup
patch_entry_explicit_version(ITranslationGroup, 'beta')
@@ -973,6 +834,3 @@ patch_operations_explicit_version(
patch_entry_explicit_version(ITranslationImportQueueEntry, 'beta')
patch_operations_explicit_version(
ITranslationImportQueueEntry, 'beta', "setStatus")
-
-# IWikiName
-patch_entry_explicit_version(IWikiName, 'beta')
diff --git a/lib/lp/registry/interfaces/commercialsubscription.py b/lib/lp/registry/interfaces/commercialsubscription.py
index 62c1ec1..147138d 100644
--- a/lib/lp/registry/interfaces/commercialsubscription.py
+++ b/lib/lp/registry/interfaces/commercialsubscription.py
@@ -28,7 +28,7 @@ from lp import _
from lp.services.fields import PublicPersonChoice
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class ICommercialSubscription(Interface):
"""A Commercial Subscription for a Product.
diff --git a/lib/lp/registry/interfaces/distribution.py b/lib/lp/registry/interfaces/distribution.py
index 7261a85..46e6e46 100644
--- a/lib/lp/registry/interfaces/distribution.py
+++ b/lib/lp/registry/interfaces/distribution.py
@@ -517,6 +517,7 @@ class IDistributionView(
name=TextLine(title=_("Archive name"), required=True))
@operation_returns_entry(Interface)
@export_read_operation()
+ @operation_for_version("beta")
def getArchive(name):
"""Return the distribution archive with the given name.
@@ -529,6 +530,7 @@ class IDistributionView(
@operation_returns_collection_of(Interface)
@export_operation_as(name="getDevelopmentSeries")
@export_read_operation()
+ @operation_for_version("beta")
def getDevelopmentSeries():
"""Return the DistroSeries which are marked as in development."""
@@ -548,6 +550,7 @@ class IDistributionView(
@operation_returns_entry(Interface)
@call_with(follow_aliases=True)
@export_read_operation()
+ @operation_for_version("beta")
def getSeries(name_or_version, follow_aliases=False):
"""Return the series with the name or version given.
@@ -591,6 +594,7 @@ class IDistributionView(
name=TextLine(title=_("Name"), required=True))
@operation_returns_entry(IDistributionMirror)
@export_read_operation()
+ @operation_for_version("beta")
def getMirrorByName(name):
"""Return the mirror with the given name for this distribution or None
if it's not found.
@@ -601,6 +605,7 @@ class IDistributionView(
mirror_type=copy_field(IDistributionMirror['content'], required=True))
@operation_returns_entry(IDistributionMirror)
@export_read_operation()
+ @operation_for_version("beta")
def getCountryMirror(country, mirror_type):
"""Return the country DNS mirror for a country and content type."""
@@ -644,6 +649,7 @@ class IDistributionView(
# _schema_circular_imports.py.
@operation_returns_entry(Interface)
@export_read_operation()
+ @operation_for_version("beta")
def getSourcePackage(name):
"""Return a DistributionSourcePackage with the given name for this
distribution, or None.
@@ -684,6 +690,7 @@ class IDistributionView(
# _schema_circular_imports.py.
@operation_returns_collection_of(Interface)
@export_read_operation()
+ @operation_for_version("beta")
def searchSourcePackages(
text, has_packaging=None, publishing_distroseries=None):
"""Search for source packages that correspond to the given text.
diff --git a/lib/lp/registry/interfaces/distributionmirror.py b/lib/lp/registry/interfaces/distributionmirror.py
index 482ff26..ab784f7 100644
--- a/lib/lp/registry/interfaces/distributionmirror.py
+++ b/lib/lp/registry/interfaces/distributionmirror.py
@@ -26,6 +26,7 @@ from lazr.restful.declarations import (
exported,
exported_as_webservice_entry,
mutator_for,
+ operation_for_version,
operation_parameters,
)
from lazr.restful.fields import (
@@ -333,7 +334,7 @@ class DistroMirrorRsyncURIField(DistroMirrorURIField):
return getUtility(IDistributionMirrorSet).getByRsyncUrl(url)
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class IDistributionMirror(Interface):
"""A mirror of a given distribution."""
@@ -452,6 +453,7 @@ class IDistributionMirror(Interface):
"visible to admins and the mirror's registrant).")))
@export_read_operation()
+ @operation_for_version("beta")
def canTransitionToCountryMirror():
"""Verify if a mirror can be set as a country mirror or return
False."""
@@ -459,6 +461,7 @@ class IDistributionMirror(Interface):
@mutator_for(country_dns_mirror)
@operation_parameters(country_dns_mirror=copy_field(country_dns_mirror))
@export_write_operation()
+ @operation_for_version("beta")
def transitionToCountryMirror(country_dns_mirror):
"""Method run on changing country_dns_mirror."""
@@ -487,6 +490,7 @@ class IDistributionMirror(Interface):
"""
@export_read_operation()
+ @operation_for_version("beta")
def getOverallFreshness():
"""Return this mirror's overall freshness.
@@ -500,6 +504,7 @@ class IDistributionMirror(Interface):
"""
@export_read_operation()
+ @operation_for_version("beta")
def isOfficial():
"""Return True if this is an official mirror."""
diff --git a/lib/lp/registry/interfaces/distributionsourcepackage.py b/lib/lp/registry/interfaces/distributionsourcepackage.py
index 0301988..1a2b7ad 100644
--- a/lib/lp/registry/interfaces/distributionsourcepackage.py
+++ b/lib/lp/registry/interfaces/distributionsourcepackage.py
@@ -39,7 +39,7 @@ from lp.registry.interfaces.role import IHasDrivers
from lp.soyuz.enums import ArchivePurpose
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class IDistributionSourcePackage(IHeadingContext, IBugTarget, IHasBranches,
IHasMergeProposals, IHasOfficialBugTags,
IStructuralSubscriptionTarget,
diff --git a/lib/lp/registry/interfaces/distroseries.py b/lib/lp/registry/interfaces/distroseries.py
index d8547d9..7573194 100644
--- a/lib/lp/registry/interfaces/distroseries.py
+++ b/lib/lp/registry/interfaces/distroseries.py
@@ -497,6 +497,7 @@ class IDistroSeriesPublic(
title=_("The architecture tag"), required=True))
@operation_returns_entry(Interface)
@export_read_operation()
+ @operation_for_version("beta")
def getDistroArchSeries(archtag):
"""Return the distroarchseries for this distroseries with the
given architecturetag.
@@ -515,6 +516,7 @@ class IDistroSeriesPublic(
title=_("The name of the source package"), required=True))
@operation_returns_entry(ISourcePackage)
@export_read_operation()
+ @operation_for_version("beta")
def getSourcePackage(name):
"""Return a source package in this distro series by name.
@@ -583,6 +585,7 @@ class IDistroSeriesPublic(
# Really IPackageUpload, patched in _schema_circular_imports.py
@operation_returns_collection_of(Interface)
@export_read_operation()
+ @operation_for_version("beta")
def getPackageUploads(status=None, created_since_date=None, archive=None,
pocket=None, custom_type=None, name=None,
version=None, exact_match=False):
@@ -790,11 +793,13 @@ class IDistroSeriesPublic(
@operation_returns_collection_of(Interface)
@export_read_operation()
+ @operation_for_version("beta")
def getDerivedSeries():
"""Get all `DistroSeries` derived from this one."""
@operation_returns_collection_of(Interface)
@export_read_operation()
+ @operation_for_version("beta")
def getParentSeries():
"""Get all parent `DistroSeries`."""
@@ -887,6 +892,7 @@ class IDistroSeriesEditRestricted(Interface):
@rename_parameters_as(dateexpected='date_targeted')
@export_factory_operation(
IMilestone, ['name', 'dateexpected', 'summary', 'code_name'])
+ @operation_for_version("beta")
def newMilestone(name, dateexpected=None, summary=None, code_name=None):
"""Create a new milestone for this DistroSeries."""
@@ -929,6 +935,7 @@ class IDistroSeriesEditRestricted(Interface):
)
@call_with(user=REQUEST_USER)
@export_write_operation()
+ @operation_for_version("beta")
def initDerivedDistroSeries(user, parents, architectures=[],
archindep_archtag=None, packagesets=[],
rebuild=False, overlays=[],
@@ -959,7 +966,7 @@ class IDistroSeriesEditRestricted(Interface):
"""
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class IDistroSeries(IDistroSeriesEditRestricted, IDistroSeriesPublic,
IStructuralSubscriptionTarget):
"""A series of an operating system distribution."""
diff --git a/lib/lp/registry/interfaces/distroseriesdifference.py b/lib/lp/registry/interfaces/distroseriesdifference.py
index 05f706f..66ab583 100644
--- a/lib/lp/registry/interfaces/distroseriesdifference.py
+++ b/lib/lp/registry/interfaces/distroseriesdifference.py
@@ -16,6 +16,7 @@ from lazr.restful.declarations import (
export_write_operation,
exported,
exported_as_webservice_entry,
+ operation_for_version,
operation_parameters,
REQUEST_USER,
)
@@ -230,11 +231,13 @@ class IDistroSeriesDifferenceEdit(Interface):
@operation_parameters(
comment=Text(title=_("Comment text"), required=True))
@export_write_operation()
+ @operation_for_version("beta")
def addComment(commenter, comment):
"""Add a comment on this difference."""
@call_with(requestor=REQUEST_USER)
@export_write_operation()
+ @operation_for_version("beta")
def requestPackageDiffs(requestor):
"""Requests IPackageDiffs for the derived and parent version.
@@ -252,6 +255,7 @@ class IDistroSeriesDifferenceAdmin(Interface):
comment=TextLine(title=_('Comment text'), required=False),
)
@export_write_operation()
+ @operation_for_version("beta")
def blocklist(commenter, all=False, comment=None):
"""Blocklists this version or all versions of this source package and
adds a comment on this difference.
@@ -267,6 +271,7 @@ class IDistroSeriesDifferenceAdmin(Interface):
@operation_parameters(
comment=TextLine(title=_('Comment text'), required=False))
@export_write_operation()
+ @operation_for_version("beta")
def unblocklist(commenter, comment=None):
"""Removes this difference from the blocklist and adds a comment on
this difference.
@@ -279,7 +284,7 @@ class IDistroSeriesDifferenceAdmin(Interface):
"""
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class IDistroSeriesDifference(IDistroSeriesDifferencePublic,
IDistroSeriesDifferenceEdit,
IDistroSeriesDifferenceAdmin):
diff --git a/lib/lp/registry/interfaces/distroseriesdifferencecomment.py b/lib/lp/registry/interfaces/distroseriesdifferencecomment.py
index efbf008..158b285 100644
--- a/lib/lp/registry/interfaces/distroseriesdifferencecomment.py
+++ b/lib/lp/registry/interfaces/distroseriesdifferencecomment.py
@@ -29,7 +29,7 @@ from lp.registry.interfaces.distroseriesdifference import (
from lp.services.messages.interfaces.message import IMessage
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class IDistroSeriesDifferenceComment(Interface):
"""A comment for a distroseries difference record."""
diff --git a/lib/lp/registry/interfaces/gpg.py b/lib/lp/registry/interfaces/gpg.py
index bcc869e..73282cc 100644
--- a/lib/lp/registry/interfaces/gpg.py
+++ b/lib/lp/registry/interfaces/gpg.py
@@ -32,7 +32,7 @@ from lp.services.gpg.interfaces import (
)
-@exported_as_webservice_entry('gpg_key')
+@exported_as_webservice_entry('gpg_key', as_of="beta")
class IGPGKey(IHasOwner):
"""OpenPGP support"""
diff --git a/lib/lp/registry/interfaces/irc.py b/lib/lp/registry/interfaces/irc.py
index 11af933..f36cdd8 100644
--- a/lib/lp/registry/interfaces/irc.py
+++ b/lib/lp/registry/interfaces/irc.py
@@ -23,7 +23,7 @@ from lp import _
from lp.registry.interfaces.role import IHasOwner
-@exported_as_webservice_entry('irc_id')
+@exported_as_webservice_entry("irc_id", as_of="beta")
class IIrcID(IHasOwner):
"""A person's nickname on an IRC network."""
id = Int(title=_("Database ID"), required=True, readonly=True)
diff --git a/lib/lp/registry/interfaces/jabber.py b/lib/lp/registry/interfaces/jabber.py
index 7c66dbb..b371cf3 100644
--- a/lib/lp/registry/interfaces/jabber.py
+++ b/lib/lp/registry/interfaces/jabber.py
@@ -23,7 +23,7 @@ from lp import _
from lp.registry.interfaces.role import IHasOwner
-@exported_as_webservice_entry('jabber_id')
+@exported_as_webservice_entry("jabber_id", as_of="beta")
class IJabberID(IHasOwner):
"""Jabber specific user ID """
id = Int(title=_("Database ID"), required=True, readonly=True)
diff --git a/lib/lp/registry/interfaces/location.py b/lib/lp/registry/interfaces/location.py
index 14192d2..4da67f9 100644
--- a/lib/lp/registry/interfaces/location.py
+++ b/lib/lp/registry/interfaces/location.py
@@ -48,13 +48,13 @@ class IHasLocation(Interface):
Float(title=_("The latitude of this object."),
required=False, readonly=True)),
('devel', dict(exported=False)),
- exported=True)
+ as_of="beta", exported=True)
longitude = exported(
doNotSnapshot(
Float(title=_("The longitude of this object."),
required=False, readonly=True)),
('devel', dict(exported=False)),
- exported=True)
+ as_of="beta", exported=True)
time_zone = exported(doNotSnapshot(
Choice(title=_('The time zone of this object.'),
required=False, readonly=True,
diff --git a/lib/lp/registry/interfaces/milestone.py b/lib/lp/registry/interfaces/milestone.py
index 3450ffc..38c5ef8 100644
--- a/lib/lp/registry/interfaces/milestone.py
+++ b/lib/lp/registry/interfaces/milestone.py
@@ -228,7 +228,7 @@ class IAbstractMilestone(IMilestoneData):
"""
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class IMilestone(IAbstractMilestone):
"""Actual interface for milestones."""
@@ -316,7 +316,7 @@ class IProjectGroupMilestone(IAbstractMilestone):
"""A marker interface for milestones related to a project"""
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class IHasMilestones(Interface):
"""An interface for classes providing milestones."""
diff --git a/lib/lp/registry/interfaces/person.py b/lib/lp/registry/interfaces/person.py
index 51a45c7..2ebbdf5 100644
--- a/lib/lp/registry/interfaces/person.py
+++ b/lib/lp/registry/interfaces/person.py
@@ -1895,7 +1895,7 @@ class IPersonSettings(IPersonSettingsViewRestricted, IPersonSettingsModerate):
"""A person's settings."""
-@exported_as_webservice_entry(plural_name='people')
+@exported_as_webservice_entry(plural_name="people", as_of="beta")
class IPerson(IPersonPublic, IPersonLimitedView, IPersonViewRestricted,
IPersonEditRestricted, IPersonModerate,
IPersonModerateRestricted, IPersonSpecialRestricted,
@@ -2027,7 +2027,7 @@ class ITeamPublic(Interface):
"""
-@exported_as_webservice_entry('team')
+@exported_as_webservice_entry("team", as_of="beta")
class ITeam(IPerson, ITeamPublic):
"""A group of people and other teams.
diff --git a/lib/lp/registry/interfaces/pillar.py b/lib/lp/registry/interfaces/pillar.py
index 22d20db..75d9a63 100644
--- a/lib/lp/registry/interfaces/pillar.py
+++ b/lib/lp/registry/interfaces/pillar.py
@@ -11,6 +11,7 @@ from lazr.restful.declarations import (
export_read_operation,
exported,
exported_as_webservice_entry,
+ operation_for_version,
operation_parameters,
operation_returns_collection_of,
REQUEST_USER,
@@ -51,7 +52,7 @@ __all__ = [
]
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class IPillar(IHeadingContext):
"""An object that might be a project, a project group, or a distribution.
@@ -122,7 +123,7 @@ class IPillarName(Interface):
pillar = Attribute('The pillar object')
-@exported_as_webservice_entry('pillars')
+@exported_as_webservice_entry("pillars", as_of="beta")
class IPillarNameSet(Interface):
"""An object for searching across projects, project groups, and distros.
@@ -162,6 +163,7 @@ class IPillarNameSet(Interface):
required=False))
@operation_returns_collection_of(IPillar)
@export_read_operation()
+ @operation_for_version("beta")
def search(user, text, limit):
"""Return Projects/Project groups/Distros matching :text:.
diff --git a/lib/lp/registry/interfaces/product.py b/lib/lp/registry/interfaces/product.py
index 2d0c179..40a7d10 100644
--- a/lib/lp/registry/interfaces/product.py
+++ b/lib/lp/registry/interfaces/product.py
@@ -328,6 +328,7 @@ class IProductDriverRestricted(Interface):
@export_factory_operation(
IProductSeries, ['name', 'summary', 'branch', 'releasefileglob'])
@export_operation_as('newSeries')
+ @operation_for_version("beta")
def newSeries(owner, name, summary, branch=None, releasefileglob=None):
"""Creates a new `IProductSeries` for this `IProduct`.
@@ -812,6 +813,7 @@ class IProductView(
name=TextLine(title=_("Name"), required=True))
@operation_returns_entry(IProductSeries)
@export_read_operation()
+ @operation_for_version("beta")
def getSeries(name):
"""Return the series for this product for the given name, or None."""
@@ -819,6 +821,7 @@ class IProductView(
version=TextLine(title=_("Version"), required=True))
@operation_returns_entry(IProductRelease)
@export_read_operation()
+ @operation_for_version("beta")
def getRelease(version):
"""Return the release for this product that has the version given."""
@@ -841,6 +844,7 @@ class IProductView(
required=False, default=False))
@export_read_operation()
@export_operation_as('get_timeline')
+ @operation_for_version("beta")
def getTimeline(include_inactive):
"""Return basic timeline data useful for creating a diagram.
@@ -895,7 +899,7 @@ class IProductEditRestricted(IOfficialBugTagTargetRestricted):
"""
-@exported_as_webservice_entry('project')
+@exported_as_webservice_entry("project", as_of="beta")
class IProduct(
IBugTarget, IHasBugSupervisor, IHasDrivers, IProductEditRestricted,
IProductModerateRestricted, IProductDriverRestricted, IProductView,
@@ -988,6 +992,7 @@ class IProductSet(Interface):
'project_reviewed', 'licenses', 'license_info',
'registrant', 'bug_supervisor', 'driver'])
@export_operation_as('new_project')
+ @operation_for_version("beta")
def createProduct(owner, name, display_name, title, summary,
description=None, projectgroup=None, homepageurl=None,
screenshotsurl=None, wikiurl=None,
@@ -1022,6 +1027,7 @@ class IProductSet(Interface):
@export_read_operation()
@export_operation_as('licensing_search')
@call_with(user=REQUEST_USER)
+ @operation_for_version("beta")
def forReview(user,
search_text=None,
active=None,
@@ -1044,6 +1050,7 @@ class IProductSet(Interface):
@operation_parameters(text=TextLine(title=_("Search text")))
@operation_returns_collection_of(IProduct)
@export_read_operation()
+ @operation_for_version("beta")
def search(user, text=None):
"""Search through the Registry database for products that match the
query terms. text is a piece of text in the title / summary /
@@ -1056,6 +1063,7 @@ class IProductSet(Interface):
@operation_returns_collection_of(IProduct)
@call_with(user=REQUEST_USER, quantity=None)
@export_read_operation()
+ @operation_for_version("beta")
def latest(user, quantity=5):
"""Return the latest projects registered in Launchpad.
diff --git a/lib/lp/registry/interfaces/productrelease.py b/lib/lp/registry/interfaces/productrelease.py
index af762f9..e7a8c45 100644
--- a/lib/lp/registry/interfaces/productrelease.py
+++ b/lib/lp/registry/interfaces/productrelease.py
@@ -26,6 +26,7 @@ from lazr.restful.declarations import (
export_write_operation,
exported,
exported_as_webservice_entry,
+ operation_for_version,
operation_parameters,
REQUEST_USER,
)
@@ -173,6 +174,7 @@ class IProductReleaseFileEditRestricted(Interface):
@export_write_operation()
@export_operation_as('delete')
+ @operation_for_version("beta")
def destroySelf():
"""Delete the product release file."""
@@ -213,7 +215,8 @@ class IProductReleaseFilePublic(Interface):
required=True, readonly=True))
-@exported_as_webservice_entry("project_release_file", publish_web_link=False)
+@exported_as_webservice_entry(
+ "project_release_file", publish_web_link=False, as_of="beta")
class IProductReleaseFile(IProductReleaseFileEditRestricted,
IProductReleaseFilePublic):
"""A file associated with a ProductRelease."""
@@ -233,6 +236,7 @@ class IProductReleaseEditRestricted(Interface):
file_type=copy_field(IProductReleaseFile['filetype'], required=False))
@export_factory_operation(IProductReleaseFile, ['description'])
@export_operation_as('add_file')
+ @operation_for_version("beta")
def addReleaseFile(filename, file_content, content_type,
uploader, signature_filename=None,
signature_content=None,
@@ -257,6 +261,7 @@ class IProductReleaseEditRestricted(Interface):
@export_write_operation()
@export_operation_as('delete')
+ @operation_for_version("beta")
def destroySelf():
"""Delete this release.
@@ -373,7 +378,7 @@ class IProductReleaseView(Interface):
"""Does the release have a file that matches the name?"""
-@exported_as_webservice_entry('project_release')
+@exported_as_webservice_entry("project_release", as_of="beta")
class IProductRelease(IProductReleaseEditRestricted, IProductReleaseView,
IProductReleasePublic):
"""A specific release (i.e. version) of a product.
diff --git a/lib/lp/registry/interfaces/productseries.py b/lib/lp/registry/interfaces/productseries.py
index 81df2db..2378216 100644
--- a/lib/lp/registry/interfaces/productseries.py
+++ b/lib/lp/registry/interfaces/productseries.py
@@ -21,6 +21,7 @@ from lazr.restful.declarations import (
export_read_operation,
exported,
exported_as_webservice_entry,
+ operation_for_version,
operation_parameters,
rename_parameters_as,
)
@@ -123,6 +124,7 @@ class IProductSeriesEditRestricted(Interface):
@rename_parameters_as(dateexpected='date_targeted')
@export_factory_operation(
IMilestone, ['name', 'dateexpected', 'summary', 'code_name'])
+ @operation_for_version("beta")
def newMilestone(name, dateexpected=None, summary=None, code_name=None):
"""Create a new milestone for this ProjectSeries."""
@@ -327,6 +329,7 @@ class IProductSeriesView(
required=False, default=False))
@export_read_operation()
@export_operation_as('get_timeline')
+ @operation_for_version("beta")
def getTimeline(include_inactive):
"""Return basic timeline data useful for creating a diagram.
@@ -334,7 +337,7 @@ class IProductSeriesView(
"""
-@exported_as_webservice_entry('project_series')
+@exported_as_webservice_entry("project_series", as_of="beta")
class IProductSeries(IProductSeriesEditRestricted, IProductSeriesPublic,
IProductSeriesView, IProductSeriesLimitedView,
IStructuralSubscriptionTarget, IBugTarget):
@@ -344,7 +347,7 @@ class IProductSeries(IProductSeriesEditRestricted, IProductSeriesPublic,
# XXX: EdwinGrubbs 2010-11-18 bug=677671
# lazr.restful can't batch a DecoratedResultSet returning basic
# python types such as dicts, so this interface is necessary.
-@exported_as_webservice_entry('timeline_project_series')
+@exported_as_webservice_entry("timeline_project_series", as_of="beta")
class ITimelineProductSeries(Interface):
"""Minimal product series info for the timeline."""
diff --git a/lib/lp/registry/interfaces/projectgroup.py b/lib/lp/registry/interfaces/projectgroup.py
index a5be5ac..44d4dc8 100644
--- a/lib/lp/registry/interfaces/projectgroup.py
+++ b/lib/lp/registry/interfaces/projectgroup.py
@@ -16,6 +16,7 @@ from lazr.restful.declarations import (
exported,
exported_as_webservice_collection,
exported_as_webservice_entry,
+ operation_for_version,
operation_parameters,
operation_returns_collection_of,
)
@@ -350,7 +351,7 @@ class IProjectGroupPublic(
product_milestones = Attribute('all the milestones for all the products.')
-@exported_as_webservice_entry('project_group')
+@exported_as_webservice_entry("project_group", as_of="beta")
class IProjectGroup(IProjectGroupPublic,
IProjectGroupModerate,
IStructuralSubscriptionTarget,
@@ -399,6 +400,7 @@ class IProjectGroupSet(Interface):
@operation_parameters(text=TextLine(title=_("Search text")))
@operation_returns_collection_of(IProjectGroup)
@export_read_operation()
+ @operation_for_version("beta")
def search(text=None, search_products=False):
"""Search through the Registry database for projects that match the
query terms. text is a piece of text in the title / summary /
diff --git a/lib/lp/registry/interfaces/sourcepackage.py b/lib/lp/registry/interfaces/sourcepackage.py
index 21d02ca..fcde488 100644
--- a/lib/lp/registry/interfaces/sourcepackage.py
+++ b/lib/lp/registry/interfaces/sourcepackage.py
@@ -251,6 +251,7 @@ class ISourcePackagePublic(IBugTarget, IHasBranches, IHasMergeProposals,
# imports. Correct interface specified in _schema_circular_imports.
@operation_returns_entry(Interface)
@export_read_operation()
+ @operation_for_version("beta")
def getBranch(pocket):
"""Get the official branch for this package in the given pocket.
@@ -289,6 +290,7 @@ class ISourcePackagePublic(IBugTarget, IHasBranches, IHasMergeProposals,
"""
@export_read_operation()
+ @operation_for_version("beta")
def linkedBranches():
"""Get the official branches for this package.
@@ -311,6 +313,7 @@ class ISourcePackageEdit(Interface):
branch=Reference(Interface, title=_("Branch"), required=False))
@call_with(registrant=REQUEST_USER)
@export_write_operation()
+ @operation_for_version("beta")
def setBranch(pocket, branch, registrant):
"""Set the official branch for the given pocket of this package.
@@ -321,7 +324,7 @@ class ISourcePackageEdit(Interface):
"""
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class ISourcePackage(ISourcePackagePublic, ISourcePackageEdit):
"""A source package associated to a particular distribution series."""
diff --git a/lib/lp/registry/interfaces/ssh.py b/lib/lp/registry/interfaces/ssh.py
index d9aef9b..74d7e57 100644
--- a/lib/lp/registry/interfaces/ssh.py
+++ b/lib/lp/registry/interfaces/ssh.py
@@ -74,7 +74,7 @@ SSH_TEXT_TO_KEY_TYPE = {
}
-@exported_as_webservice_entry('ssh_key')
+@exported_as_webservice_entry("ssh_key", as_of="beta")
class ISSHKey(Interface):
"""SSH public key"""
diff --git a/lib/lp/registry/interfaces/teammembership.py b/lib/lp/registry/interfaces/teammembership.py
index 65d38e8..13f08a8 100644
--- a/lib/lp/registry/interfaces/teammembership.py
+++ b/lib/lp/registry/interfaces/teammembership.py
@@ -24,6 +24,7 @@ from lazr.restful.declarations import (
export_write_operation,
exported,
exported_as_webservice_entry,
+ operation_for_version,
operation_parameters,
REQUEST_USER,
)
@@ -116,7 +117,7 @@ class TeamMembershipStatus(DBEnumeratedType):
ACTIVE_STATES = [TeamMembershipStatus.ADMIN, TeamMembershipStatus.APPROVED]
-@exported_as_webservice_entry()
+@exported_as_webservice_entry(as_of="beta")
class ITeamMembership(Interface):
"""TeamMembership for Users.
@@ -198,6 +199,7 @@ class ITeamMembership(Interface):
@call_with(user=REQUEST_USER)
@operation_parameters(date=copy_field(dateexpires))
@export_write_operation()
+ @operation_for_version("beta")
def setExpirationDate(date, user):
"""Set this membership's expiration date.
@@ -242,6 +244,7 @@ class ITeamMembership(Interface):
"For use by Launchpad administrators only."),
required=False, default=False))
@export_write_operation()
+ @operation_for_version("beta")
def setStatus(status, user, comment=None, silent=False):
"""Set the status of this membership.
diff --git a/lib/lp/registry/interfaces/wikiname.py b/lib/lp/registry/interfaces/wikiname.py
index aecbe9d..6d2f534 100644
--- a/lib/lp/registry/interfaces/wikiname.py
+++ b/lib/lp/registry/interfaces/wikiname.py
@@ -22,7 +22,7 @@ from lp.registry.interfaces.role import IHasOwner
from lp.services.fields import URIField
-@exported_as_webservice_entry(publish_web_link=False)
+@exported_as_webservice_entry(publish_web_link=False, as_of="beta")
class IWikiName(IHasOwner):
"""Wiki for Users"""
id = Int(title=_("Database ID"), required=True, readonly=True)