l.r.i.p.IProductReleaseEditRestricted(Interface) : interface documentation

Part of lp.registry.interfaces.productrelease View In Hierarchy

Known subclasses: lp.registry.interfaces.webservice.IProductRelease

IProductRelease properties which require launchpad.Edit.
Method addReleaseFile Add file to the library and link to this IProductRelease.
Method destroySelf Delete this release.
@call_with(REQUEST_USER, True)
@operation_parameters(TextLine(), TextLine(), TextLine(), Bytes(productrelease_file_size_constraint), Bytes(productrelease_signature_size_constraint), copy_field(IProductReleaseFile['filetype'], False))
@export_factory_operation(IProductReleaseFile, 'description')
@export_operation_as('add_file')
def addReleaseFile(filename, file_content, content_type, uploader, signature_filename=None, signature_content=None, file_type=UpstreamFileType.CODETARBALL, description=None, from_api=False):
Add file to the library and link to this IProductRelease.

The signature file will also be added if available.

ParametersfilenameName of the file being uploaded.
file_contentStringIO or file object.
content_typeA MIME content type string.
uploaderThe person who uploaded the file.
signature_filenameName of the uploaded gpg signature file.
signature_contentStringIO or file object.
file_typeAn UpstreamFileType enum value.
descriptionInfo about the file.
ReturnsIProductReleaseFile object.
RaisesInvalidFilename if the filename is invalid or a duplicate of a file previously added to the release.
@export_write_operation()
@export_operation_as('delete')
def destroySelf():
Delete this release.

This method must not be used if this release has any release files associated with it.

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