l.a.u.AbstractUploadPolicy : class documentation

Part of lp.archiveuploader.uploadpolicy View In Hierarchy

Known subclasses: lp.archiveuploader.tests.AnythingGoesUploadPolicy, lp.archiveuploader.tests.test_uploadprocessor.BrokenUploadPolicy, lp.archiveuploader.uploadpolicy.BuildDaemonUploadPolicy, lp.archiveuploader.uploadpolicy.InsecureUploadPolicy, lp.archiveuploader.uploadpolicy.SyncUploadPolicy

Encapsulate the policy of an upload to a launchpad archive.

An upload policy consists of a list of attributes which are used to verify an upload is permissible (e.g. whether or not there must be a valid signature on the .changes file). The policy also contains the tests themselves and they operate on NascentUpload instances in order to verify them.

Method __init__ Prepare a policy...
Method validateUploadType Check that the type of the given upload is accepted by this policy.
Method setOptions Store the options for later.
Method setDistroSeriesAndPocket Set the distroseries and pocket from the provided name.
Method checkUpload Mandatory policy checks on NascentUploads.
Method policySpecificChecks Implement any policy-specific checks in child.
Method autoApprove Return whether the upload should be automatically approved.
Method autoApproveNew Return whether the NEW upload should be automatically approved.
def __init__(self):
Prepare a policy...
def validateUploadType(self, upload):
Check that the type of the given upload is accepted by this policy.

When the type (e.g. sourceful, binaryful or mixed) is not accepted, the upload is rejected.

def setOptions(self, options):
Store the options for later.
def setDistroSeriesAndPocket(self, dr_name):
Set the distroseries and pocket from the provided name.

It also sets self.archive to the distroseries main_archive.

def checkUpload(self, upload):
Mandatory policy checks on NascentUploads.
def policySpecificChecks(self, upload):
Implement any policy-specific checks in child.
def autoApprove(self, upload):
Return whether the upload should be automatically approved.

This is called only if the upload is a recognised package; if it is new, autoApproveNew is used instead.

def autoApproveNew(self, upload):
Return whether the NEW upload should be automatically approved.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.