l.c.i.w.ICodeImport(Interface) : interface documentation

Part of lp.code.interfaces.webservice View In Hierarchy

A code import to a Bazaar Branch.
Int id Undocumented
Datetime date_created Undocumented
Attribute target The branch/repository produced by the import system (VCS-agnostic).
PublicPersonChoice registrant The person who initially requested this import.
Timedelta update_interval The user-specified time between automatic updates of this import. If this is unspecified, the effective update interval is a default value selected by Launchpad administrators.
Timedelta effective_update_interval The effective time between automatic updates of this import. If the user did not specify an update interval, this is a default value selected by Launchpad administrators.
Method getImportDetailsForDisplay Get a one-line summary of the location this import is from.
Choice import_job The current job for this import, either pending or running.
Attribute results The results for this code import.
Attribute consecutive_failure_count How many times in a row this import has failed.
Method updateFromData Modify attributes of the CodeImport.
Method tryFailingImportAgain Try a failing import again.
Method requestImport Request that an import be tried soon.
id =
Undocumented
date_created =
Undocumented
target =
The branch/repository produced by the import system (VCS-agnostic).
registrant =
The person who initially requested this import.
update_interval =
The user-specified time between automatic updates of this import. If this is unspecified, the effective update interval is a default value selected by Launchpad administrators.
effective_update_interval =
The effective time between automatic updates of this import. If the user did not specify an update interval, this is a default value selected by Launchpad administrators.
def getImportDetailsForDisplay():
Get a one-line summary of the location this import is from.
import_job =
The current job for this import, either pending or running.
results =
The results for this code import.
consecutive_failure_count =
How many times in a row this import has failed.
def updateFromData(data, user):
Modify attributes of the CodeImport.

Creates and returns a MODIFY CodeImportEvent if changes were made.

This method preserves the invariant that a CodeImportJob exists for a given import if and only if its review_status is REVIEWED, creating and deleting jobs as necessary.

Parametersdatadictionary whose keys are attribute names and values are attribute values.
useruser who made the change, to record in the CodeImportEvent. May be None.
ReturnsThe MODIFY CodeImportEvent, if any changes were made, or None if no changes were made.
def tryFailingImportAgain(user):
Try a failing import again.

This method sets the review_status back to REVIEWED and requests the import be attempted as soon as possible.

The import must be in the FAILING state.

Parametersuserthe user who is requesting the import be tried again.
@call_with(REQUEST_USER)
@export_write_operation()
def requestImport(requester, error_if_already_requested=False):
Request that an import be tried soon.

This method will schedule an import to happen soon for this branch.

The import must be in the Reviewed state, if not then a CodeImportNotInReviewedState error will be thrown. If using the API then a status code of 400 will result.

If the import is already running then a CodeImportAlreadyRunning error will be thrown. If using the API then a status code of 400 will result.

The two cases can be distinguished over the API by seeing if the exception names appear in the body of the response.

If used over the API and the request has already been made then this method will silently do nothing. If called internally then the error_if_already_requested parameter controls whether a CodeImportAlreadyRequested exception will be thrown in that situation.

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