l.s.i.a.IArchiveEdit(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 edit privilege.
Method newPackageUploader Add permisson for a person to upload a package to this archive.
Method newComponentUploader Add permission for a person to upload to a component.
Method newPocketUploader Add permission for a person to upload to a pocket.
Method newQueueAdmin Add permission for a person to administer a distroseries queue.
Method newPocketQueueAdmin Add permission for a person to administer a distroseries queue.
Method newPackagesetUploader Add a package set based permission for a person.
Method deletePackageUploader Revoke permission for the person to upload the package.
Method deleteComponentUploader Revoke permission for the person to upload to the component.
Method deletePocketUploader Revoke permission for the person to upload to the pocket.
Method deleteQueueAdmin Revoke permission for the person to administer distroseries queues.
Method deletePocketQueueAdmin Revoke permission for the person to administer distroseries queues.
Method deletePackagesetUploader Revoke upload permissions for a person.
Method enable Enable the archive.
Method disable Disable the archive.
Method addArchiveDependency Record an archive dependency record for the context archive.
Method removeArchiveDependency Remove the IArchiveDependency record for the given dependency.
Method newNamedAuthToken Create a new named authorization token.
Method newNamedAuthTokens Create named authorization tokens in bulk.
Method getNamedAuthToken Return a named authorization token for the given name in this
Method getNamedAuthTokens Return a subset of active named authorization tokens for this
Method revokeNamedAuthToken Deactivate a named authorization token.
Method revokeNamedAuthTokens Deactivate named authorization tokens in bulk.
Method markSuiteDirty Mark a suite as dirty in this archive.
Method _addArchiveDependency Record an archive dependency record for the context archive.
@operation_parameters(Reference(IPerson), TextLine(_('Source Package Name'), True))
@export_factory_operation(Interface, )
def newPackageUploader(person, source_package_name):
Add permisson for a person to upload a package to this archive.
ParameterspersonAn IPerson whom should be given permission.
source_package_nameAn ISourcePackageName or textual package name.
ReturnsAn IArchivePermission which is the newly-created permission.
@operation_parameters(Reference(IPerson), TextLine(_('Component Name'), True))
@export_factory_operation(Interface, )
def newComponentUploader(person, component_name):
Add permission for a person to upload to a component.
ParameterspersonAn IPerson whom should be given permission.
componentAn IComponent or textual component name.
ReturnsAn IArchivePermission which is the newly-created permission.
RaisesInvalidComponentif this archive is a PPA and the component is not 'main'.
@operation_parameters(Reference(IPerson), Choice(_('Pocket'), PackagePublishingPocket, True))
@export_factory_operation(Interface, )
@operation_for_version('devel')
def newPocketUploader(person, pocket):
Add permission for a person to upload to a pocket.
ParameterspersonAn IPerson whom should be given permission.
pocketA PackagePublishingPocket.
ReturnsAn IArchivePermission which is the newly-created permission.
RaisesInvalidPocketForPartnerArchiveif this archive is a partner archive and the pocket is not RELEASE or PROPOSED.
InvalidPocketForPPAif this archive is a PPA and the pocket is not RELEASE.
@operation_parameters(Reference(IPerson), TextLine(_('Component Name'), True))
@export_factory_operation(Interface, )
def newQueueAdmin(person, component_name):
Add permission for a person to administer a distroseries queue.

The supplied person will gain permission to administer the distroseries queue for packages in the supplied component.

ParameterspersonAn IPerson whom should be given permission.
componentAn IComponent or textual component name.
ReturnsAn IArchivePermission which is the newly-created permission.
@operation_parameters(Reference(IPerson), Choice(_('Pocket'), PackagePublishingPocket, True), Reference(IDistroSeries, _('Distro series'), True))
@export_factory_operation(Interface, )
@operation_for_version('devel')
def newPocketQueueAdmin(person, pocket, distroseries=None):
Add permission for a person to administer a distroseries queue.

The supplied person will gain permission to administer the distroseries queue for packages in the supplied series and pocket.

ParameterspersonAn IPerson whom should be given permission.
pocketA PackagePublishingPocket.
distroseriesAn optional IDistroSeries.
ReturnsAn IArchivePermission which is the newly-created permission.
@operation_parameters(Reference(IPerson), Reference(Interface, _('Package set'), True), Bool(_('Explicit'), False))
@export_factory_operation(Interface, )
def newPackagesetUploader(person, packageset, explicit=False):
Add a package set based permission for a person.
ParameterspersonAn IPerson for whom you want to add permission.
packagesetAn IPackageset.
explicitTrue if the package set in question requires specialist skills for proper handling.
ReturnsThe new ArchivePermission, or the existing one if it already exists.
@operation_parameters(Reference(IPerson), TextLine(_('Source Package Name'), True))
@export_write_operation()
def deletePackageUploader(person, source_package_name):
Revoke permission for the person to upload the package.
ParameterspersonAn IPerson whose permission should be revoked.
source_package_nameAn ISourcePackageName or textual package name.
@operation_parameters(Reference(IPerson), TextLine(_('Component Name'), True))
@export_write_operation()
def deleteComponentUploader(person, component_name):
Revoke permission for the person to upload to the component.
ParameterspersonAn IPerson whose permission should be revoked.
componentAn IComponent or textual component name.
@operation_parameters(Reference(IPerson), Choice(_('Pocket'), PackagePublishingPocket, True))
@export_write_operation()
@operation_for_version('devel')
def deletePocketUploader(person, pocket):
Revoke permission for the person to upload to the pocket.
ParameterspersonAn IPerson whose permission should be revoked.
distroseriesAn IDistroSeries.
pocketA PackagePublishingPocket.
@operation_parameters(Reference(IPerson), TextLine(_('Component Name'), True))
@export_write_operation()
def deleteQueueAdmin(person, component_name):
Revoke permission for the person to administer distroseries queues.

The supplied person will lose permission to administer the distroseries queue for packages in the supplied component.

ParameterspersonAn IPerson whose permission should be revoked.
componentAn IComponent or textual component name.
@operation_parameters(Reference(IPerson), Choice(_('Pocket'), PackagePublishingPocket, True), Reference(IDistroSeries, _('Distro series'), True))
@export_write_operation()
@operation_for_version('devel')
def deletePocketQueueAdmin(person, pocket, distroseries=None):
Revoke permission for the person to administer distroseries queues.

The supplied person will lose permission to administer the distroseries queue for packages in the supplied series and pocket.

ParameterspersonAn IPerson whose permission should be revoked.
pocketA PackagePublishingPocket.
distroseriesAn optional IDistroSeries.
@operation_parameters(Reference(IPerson), Reference(Interface, _('Package set'), True), Bool(_('Explicit'), False))
@export_write_operation()
def deletePackagesetUploader(person, packageset, explicit=False):
Revoke upload permissions for a person.
ParameterspersonAn IPerson for whom you want to revoke permission.
packagesetAn IPackageset.
explicitThe value of the 'explicit' flag for the permission to be revoked.
def enable():
Enable the archive.
def disable():
Disable the archive.
def addArchiveDependency(dependency, pocket, component=None):
Record an archive dependency record for the context archive.
Parametersdependencyis an IArchive object.
pocketis an PackagePublishingPocket enum.
componentis an optional IComponent object, if not given the archive dependency will be tied to the component used for a corresponding source in primary archive.
Returnsa IArchiveDependency object targeted to the context IArchive requiring 'dependency' IArchive.
RaisesArchiveDependencyError if given 'dependency' does not fit the context archive.
@operation_parameters(Reference(Interface, True), Choice(_('Pocket'), _('The pocket into which this entry is published'), PackagePublishingPocket, True), TextLine(_('Component'), False))
@export_operation_as('addArchiveDependency')
@export_factory_operation(Interface, )
@operation_for_version('devel')
def _addArchiveDependency(dependency, pocket, component=None):
Record an archive dependency record for the context archive.
Parametersdependencyis an IArchive object.
pocketis an PackagePublishingPocket enum.
componentis the name of a component. If not given, the archive dependency will be tied to the component used for a corresponding source in primary archive.
Returnsa IArchiveDependency object targeted to the context IArchive requiring 'dependency' IArchive.
RaisesArchiveDependencyError if given 'dependency' does not fit the context archive.
@operation_parameters(Reference(Interface, True))
@export_write_operation()
@operation_for_version('devel')
def removeArchiveDependency(dependency):
Remove the IArchiveDependency record for the given dependency.
Parametersdependencyis an IArchive object.
@call_with(True)
@operation_parameters(TextLine(_('Authorization token name'), True), TextLine(_('Optional secret for this named token'), False))
@export_write_operation()
@operation_for_version('devel')
def newNamedAuthToken(name, token=None, as_dict=False):
Create a new named authorization token.
ParametersnameAn identifier string for this token.
tokenOptional unicode text to use as the token. One will be generated if not given.
as_dictOptional boolean, controls whether the return value is a dictionary or a full object.
ReturnsAn ArchiveAuthToken object or a dictionary where the value of token is the secret and the value of archive_url is the externally-usable archive URL including basic auth.
@call_with(True)
@operation_parameters(List(_('Authorization token names'), TextLine(), True))
@export_write_operation()
@operation_for_version('devel')
def newNamedAuthTokens(names, as_dict=False):
Create named authorization tokens in bulk.
ParametersnamesA list of token names.
as_dictOptional boolean, controls whether the return value is a list of dictionaries or a list of full objects.
ReturnsA list of ArchiveAuthToken objects or a dictionary of {name: {token, archive_url} where name is a token name, token is the secret and archive_url is the externally-usable archive URL including basic auth.
@call_with(True)
@operation_parameters(TextLine(_('Authorization token name'), True))
@export_read_operation()
@operation_for_version('devel')
def getNamedAuthToken(name, as_dict=False):
Return a named authorization token for the given name in this
archive.
ParametersnameThe identifier string for a token.
as_dictOptional boolean, controls whether the return value is a dictionary or a full object.
ReturnsAn ArchiveAuthToken object or a dictionary where the value of token is the secret and the value of archive_url is the externally-usable archive URL including basic auth.
RaisesNotFoundErrorif no matching token could be found.
@call_with(True)
@operation_parameters(List(_('Authorization token names'), TextLine(), False))
@export_read_operation()
@operation_for_version('devel')
def getNamedAuthTokens(names=None, as_dict=False):
Return a subset of active named authorization tokens for this archive if names is specified, or all active named authorization tokens for this archive is names is null.
ParametersnamesAn optional list of token names.
as_dictOptional boolean, controls whether the return value is a list of dictionares or a list of full objects.
ReturnsA list of ArchiveAuthToken objects or a list of dictionaries where token is the secret and archive_url is the externally-usable archive URL including basic auth.
@operation_parameters(TextLine(_('Authorization token name'), True))
@export_write_operation()
@operation_for_version('devel')
def revokeNamedAuthToken(name):
Deactivate a named authorization token.
ParametersnameThe identifier string for a token.
RaisesNotFoundErrorif no matching token could be found.
@operation_parameters(List(_('Authorization token names'), TextLine(), True))
@export_write_operation()
@operation_for_version('devel')
def revokeNamedAuthTokens(names):
Deactivate named authorization tokens in bulk.
ParametersnamesA list of token names.
@operation_parameters(Reference(IDistroSeries, _('Distro series'), True), Choice(_('Pocket'), PackagePublishingPocket, True))
@export_write_operation()
@operation_for_version('devel')
def markSuiteDirty(distroseries, pocket):
Mark a suite as dirty in this archive.

The next publisher run will publish this suite regardless of whether it has any pending publications.

ParametersdistroseriesAn IDistroSeries.
pocketA PackagePublishingPocket.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.