l.a.u.InsecureUploadPolicy(AbstractUploadPolicy) : class documentation

Part of lp.archiveuploader.uploadpolicy View In Hierarchy

The insecure upload policy is used by the poppy interface.
Method __init__ Prepare a policy...
Method setDistroSeriesAndPocket Set the distroseries and pocket from the provided name.
Method checkArchiveSizeQuota Reject the upload if target archive size quota will be exceeded.
Method policySpecificChecks The insecure policy does not allow SECURITY uploads for now.
Method autoApprove The insecure policy auto-approves RELEASE/PROPOSED pocket stuff.

Inherited from AbstractUploadPolicy:

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

The insecure policy redirects uploads to a different pocket if Distribution.redirect_release_uploads is set.

def checkArchiveSizeQuota(self, upload):
Reject the upload if target archive size quota will be exceeded.

This check will reject source upload exceeding the specified archive size quota.Binary upload will be skipped to avoid unnecessary hassle dealing with FAILEDTOUPLOAD builds.

def policySpecificChecks(self, upload):
The insecure policy does not allow SECURITY uploads for now.

Also check if the upload is within the allowed quota.

def autoApprove(self, upload):
The insecure policy auto-approves RELEASE/PROPOSED pocket stuff.

PPA uploads are always auto-approved. RELEASE and PROPOSED pocket uploads (to main archives) are only auto-approved if the distroseries is in a non-FROZEN state pre-release. (We already performed the IArchive.canModifySuite check in the checkUpload base method, which will deny RELEASE uploads post-release, but it doesn't hurt to repeat this for that case.)

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