l.s.i.a.IArchiveAppend(Interface) : interface documentation

Part of lp.soyuz.interfaces.archive View In Hierarchy

Known subclasses: lp.soyuz.interfaces.webservice.IArchive

Archive interface for operations restricted by append privilege.
Method syncSources Synchronise (copy) named sources into this archive from another.
Method syncSource Synchronise (copy) a single named source into this archive.
Method newSubscription Create a new subscribtion to this archive.
Method removeCopyNotification Remove a copy notification that's displayed on the +packages page.
@call_with(REQUEST_USER)
@operation_parameters(List(_('Source package names'), TextLine()), Reference(Interface), TextLine(_('Pocket name')), TextLine(_('Distroseries name'), _('The distro series to copy packages into.'), False), TextLine(_('Distroseries name'), _('The distro series to copy packages from.'), False), Bool(_('Include Binaries'), _('Whether or not to copy binaries already built for this source'), False))
@export_write_operation()
def syncSources(source_names, from_archive, to_pocket, to_series=None, from_series=None, include_binaries=False, person=None):
Synchronise (copy) named sources into this archive from another.

DEPRECATED: syncSource and syncSources are deprecated, and will be removed entirely in the future. Use the asynchronous copyPackage method instead, and poll getPublishedSources if you need to await completion.

It will copy the most recent PUBLISHED versions of the named sources to the destination archive if necessary.

This operation will only succeeds when all requested packages are synchronised between the archives. If any of the requested copies cannot be performed, the whole operation will fail. There will be no partial changes of the destination archive.

If the source or target distribution has a development series alias, then it may be used as the source or target distroseries name respectively; but note that this will always be resolved to the true development series of that distribution, which may not match the alias in the respective published archives.

Parameterssource_namesa list of string names of packages to copy.
from_archivethe source archive from which to copy.
to_pocketthe target pocket (as a string).
to_seriesthe target distroseries (as a string).
from_seriesthe source distroseries (as a string).
include_binariesoptional boolean, controls whether or not the published binaries for each given source should also be copied along with the source.
personthe IPerson who requests the sync.
RaisesNoSuchSourcePackageNameif the source name is invalid
PocketNotFoundif the pocket name is invalid
NoSuchDistroSeriesif the distro series name is invalid
CannotCopyif there is a problem copying.
@call_with(REQUEST_USER)
@operation_parameters(TextLine(_('Source package name')), TextLine(_('Version')), Reference(Interface), TextLine(_('Pocket name')), TextLine(_('Distroseries name'), False), Bool(_('Include Binaries'), _('Whether or not to copy binaries already built for this source'), False))
@export_write_operation()
def syncSource(source_name, version, from_archive, to_pocket, to_series=None, include_binaries=False, person=None):
Synchronise (copy) a single named source into this archive.

DEPRECATED: syncSource and syncSources are deprecated, and will be removed entirely in the future. Use the asynchronous copyPackage method instead, and poll getPublishedSources if you need to await completion.

Copy a specific version of a named source to the destination archive if necessary.

If the source distribution has a development series alias, then it may be used as the source distroseries name; but note that this will always be resolved to the true development series of that distribution, which may not match the alias in the published source archive.

Parameterssource_namea string name of the package to copy.
versionthe version of the package to copy.
from_archivethe source archive from which to copy.
to_pocketthe target pocket (as a string).
to_seriesthe target distroseries (as a string).
include_binariesoptional boolean, controls whether or not the published binaries for each given source should also be copied along with the source.
personthe IPerson who requests the sync.
RaisesNoSuchSourcePackageNameif the source name is invalid
PocketNotFoundif the pocket name is invalid
NoSuchDistroSeriesif the distro series name is invalid
CannotCopyif there is a problem copying.
@call_with(REQUEST_USER)
@operation_parameters(PublicPersonChoice(_('Subscriber'), True, 'ValidPersonOrTeam', _('The person who is subscribed.')), Datetime(_('Date of Expiration'), False, _('The timestamp when the subscription will expire.')), Text(_('Description'), False, _('Free text describing this subscription.')))
@export_factory_operation(Interface, )
def newSubscription(subscriber, registrant, date_expires=None, description=None):
Create a new subscribtion to this archive.

Create an ArchiveSubscriber record which allows an IPerson to access a private repository.

ParameterssubscriberAn IPerson who is allowed to access the repository for this archive.
registrantAn IPerson who created this subscription.
date_expiresWhen the subscription should expire; None if it should not expire (default).
descriptionAn option textual description of the subscription being created.
ReturnsThe IArchiveSubscriber that was created.
@operation_parameters(Int())
@export_write_operation()
@operation_for_version('devel')
def removeCopyNotification(job_id):
Remove a copy notification that's displayed on the +packages page.

Copy notifications are shown on the +packages page when a PlainPackageCopyJob is in progress or failed. Calling this method will delete failed jobs so they no longer appear on the page.

You need to have upload privileges on the PPA to use this.

Parametersjob_idThe ID of the PlainPackageCopyJob to be removed.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.