l.r.i.w.IDistributionMirror(Interface) : interface documentation

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

A mirror of a given distribution.
Int id Undocumented
Attribute displayname Display name (deprecated)
Attribute title The title of this mirror
Attribute cdimage_series All MirrorCDImageDistroSeries of this mirror
Attribute source_series All MirrorDistroSeriesSources of this mirror
Attribute arch_series All MirrorDistroArchSeries of this mirror
Attribute last_probe_record The last MirrorProbeRecord for this mirror.
Attribute all_probe_records All MirrorProbeRecords for this mirror.
Attribute arch_mirror_freshness The freshness of this mirror's archive mirrors
Attribute source_mirror_freshness The freshness of this mirror's source mirrors
Attribute base_url The HTTP or FTP base URL of this mirror
Method canTransitionToCountryMirror Verify if a mirror can be set as a country mirror or return
Method transitionToCountryMirror Method run on changing country_dns_mirror.
Method mirrorMustHaveHTTPOrFTPURL Undocumented
Method getSummarizedMirroredSourceSeries Return a summarized list of this distribution_mirror's
Method getSummarizedMirroredArchSeries Return a summarized list of this distribution_mirror's
Method getOverallFreshness Return this mirror's overall freshness.
Method isOfficial Return True if this is an official mirror.
Method shouldDisable Should this mirror be marked disabled?
Method disable Disable this mirror and notify the distro's mirror admins by email.
Method resubmitForReview Allow the owner (launchpad.Edit) to resubmit for review.
Method newProbeRecord Create and return a new MirrorProbeRecord for this mirror.
Method deleteMirrorDistroArchSeries Delete the MirrorDistroArchSeries with the given arch series and
Method ensureMirrorDistroArchSeries Check if we have a MirrorDistroArchSeries with the given arch
Method ensureMirrorDistroSeriesSource Check if we have a MirrorDistroSeriesSource with the given distro
Method deleteMirrorDistroSeriesSource Delete the MirrorDistroSeriesSource with the given distro series,
Method ensureMirrorCDImageSeries Check if we have a MirrorCDImageDistroSeries with the given
Method deleteMirrorCDImageSeries Delete the MirrorCDImageDistroSeries with the given arch
Method deleteAllMirrorCDImageSeries Delete all MirrorCDImageDistroSeriess of this mirror.
Method getExpectedPackagesPaths Get all paths where we can find Packages.gz files on this mirror.
Method getExpectedSourcesPaths Get all paths where we can find Sources.gz files on this mirror.
id =
Undocumented
displayname =
Display name (deprecated)
title =
The title of this mirror
cdimage_series =
All MirrorCDImageDistroSeries of this mirror
source_series =
All MirrorDistroSeriesSources of this mirror
arch_series =
All MirrorDistroArchSeries of this mirror
last_probe_record =
The last MirrorProbeRecord for this mirror.
all_probe_records =
All MirrorProbeRecords for this mirror.
arch_mirror_freshness =
The freshness of this mirror's archive mirrors
source_mirror_freshness =
The freshness of this mirror's source mirrors
base_url =
The HTTP or FTP base URL of this mirror
@export_read_operation()
def canTransitionToCountryMirror():
Verify if a mirror can be set as a country mirror or return False.
@mutator_for(country_dns_mirror)
@operation_parameters(copy_field(country_dns_mirror))
@export_write_operation()
def transitionToCountryMirror(country_dns_mirror):
Method run on changing country_dns_mirror.
@invariant
def mirrorMustHaveHTTPOrFTPURL(mirror):
Undocumented
def getSummarizedMirroredSourceSeries():
Return a summarized list of this distribution_mirror's MirrorDistroSeriesSource objects.

Summarized, in this case, means that it ignores pocket and components and returns the MirrorDistroSeriesSource with the worst freshness for each distroseries of this distribution mirror.

def getSummarizedMirroredArchSeries():
Return a summarized list of this distribution_mirror's MirrorDistroArchSeries objects.

Summarized, in this case, means that it ignores pocket and components and returns the MirrorDistroArchSeries with the worst freshness for each distro_arch_series of this distribution mirror.

@export_read_operation()
def getOverallFreshness():
Return this mirror's overall freshness.

For ARCHIVE mirrors, the overall freshness is the worst freshness of all of this mirror's content objects (MirrorDistroArchSeries, MirrorDistroSeriesSource or MirrorCDImageDistroSeriess).

For RELEASE mirrors, the overall freshness is either UPTODATE, if the mirror contains all ISO images that it should or UNKNOWN if it doesn't contain one or more ISO images.

@export_read_operation()
def isOfficial():
Return True if this is an official mirror.
def shouldDisable(expected_file_count=None):
Should this mirror be marked disabled?

If this is a RELEASE mirror then expected_file_count must not be None, and it should be disabled if the number of cdimage_series it contains is smaller than the given expected_file_count.

If this is an ARCHIVE mirror, then it should be disabled only if it has no content at all.

We could use len(get_expected_cdimage_paths()) to obtain the expected_file_count, but that's not a good idea because that method gets the expected paths from releases.ubuntu.com, which is something we don't have control over.

def disable(notify_owner, log):
Disable this mirror and notify the distro's mirror admins by email.

:param notify_owner: If True, an identical notification is sent to the
mirror owner.

:param log: The log of requests/responses from the last time this
mirror was probed.  This is only necessary because we want to include
a snippet of the log in the email notification but the content can
only be read back from the librarian after we commit the transaction
(and we really don't want to do it here).

This method can't be called before a probe record has been created
because we'll link to the latest probe record in the email we send to
notify the owner.

The notification(s) are actually sent only if this mirror was
previously enabled or if it was probed only once.
def resubmitForReview():
Allow the owner (launchpad.Edit) to resubmit for review.

Only allows the transition state from 'Broken' to 'Pending Review'.

def newProbeRecord(log_file):
Create and return a new MirrorProbeRecord for this mirror.
def deleteMirrorDistroArchSeries(distro_arch_series, pocket, component):
Delete the MirrorDistroArchSeries with the given arch series and pocket, in case it exists.
def ensureMirrorDistroArchSeries(distro_arch_series, pocket, component):
Check if we have a MirrorDistroArchSeries with the given arch series and pocket, creating one if not.

Return that MirrorDistroArchSeries.

def ensureMirrorDistroSeriesSource(distroseries, pocket, component):
Check if we have a MirrorDistroSeriesSource with the given distro series, creating one if not.

Return that MirrorDistroSeriesSource.

def deleteMirrorDistroSeriesSource(distroseries, pocket, component):
Delete the MirrorDistroSeriesSource with the given distro series, in case it exists.
def ensureMirrorCDImageSeries(arch_series, flavour):
Check if we have a MirrorCDImageDistroSeries with the given arch series and flavour, creating one if not.

Return that MirrorCDImageDistroSeries.

def deleteMirrorCDImageSeries(arch_series, flavour):
Delete the MirrorCDImageDistroSeries with the given arch series and flavour, in case it exists.
def deleteAllMirrorCDImageSeries():
Delete all MirrorCDImageDistroSeriess of this mirror.
def getExpectedPackagesPaths():
Get all paths where we can find Packages.gz files on this mirror.

Return a list containing, for each path, the DistroArchSeries, the PackagePublishingPocket and the Component to which that given Packages.gz file refer to and the path to the file itself.

def getExpectedSourcesPaths():
Get all paths where we can find Sources.gz files on this mirror.

Return a list containing, for each path, the DistroSeries, the PackagePublishingPocket and the Component to which that given Sources.gz file refer to and the path to the file itself.

API Documentation for Launchpad, generated by pydoctor at 2019-11-13 00:00:10.