l.s.i.s.ISnapView(Interface) : interface documentation

Part of lp.snappy.interfaces.snap View In Hierarchy

Known subclasses: lp.snappy.interfaces.webservice.ISnap

ISnap attributes that require launchpad.View permission.
Int id Undocumented
Attribute source The source branch for this snap package (VCS-agnostic).
Attribute available_processors The architectures that are available to be enabled or disabled for this snap package.
Method setProcessors Set the architectures for which the snap package should be built.
Method getAllowedArchitectures Return all distroarchseries that this package can build for.
Method requestBuild Request that the snap package be built.
Method requestBuilds Request that the snap package be built for relevant architectures.
Method requestBuildsFromJob Synchronous part of Snap.requestBuilds.
Method getBuildRequest Get an asynchronous build request by ID.
Method getBuildSummariesForSnapBuildIds Return a dictionary containing a summary of the build statuses.
Method getBuildSummaries Return a dictionary containing a summary of build information.
id =
Undocumented
source =
The source branch for this snap package (VCS-agnostic).
available_processors =
The architectures that are available to be enabled or disabled for this snap package.
@call_with(True, REQUEST_USER)
@operation_parameters(List(Reference(IProcessor), True))
@export_write_operation()
@operation_for_version('devel')
def setProcessors(processors, check_permissions=False, user=None):
Set the architectures for which the snap package should be built.
def getAllowedArchitectures():
Return all distroarchseries that this package can build for.
ReturnsSequence of IDistroArchSeries instances.
@call_with(REQUEST_USER)
@operation_parameters(Reference(IArchive), Reference(IDistroArchSeries), Choice(PackagePublishingPocket), Dict(_('Source snap channels to use for this build.'), _("A dictionary mapping snap names to channels to use for this build. Currently only 'core', 'core18', and 'snapcraft' keys are supported."), TextLine(), False))
@export_factory_operation(Interface, )
@operation_for_version('devel')
def requestBuild(requester, archive, distro_arch_series, pocket, channels=None, build_request=None):
Request that the snap package be built.
ParametersrequesterThe person requesting the build.
archiveThe IArchive to associate the build with.
distro_arch_seriesThe architecture to build for.
pocketThe pocket that should be targeted.
channelsA dictionary mapping snap names to channels to use for this build.
build_requestThe ISnapBuildRequest job being processed, if any.
ReturnsISnapBuild.
@call_with(REQUEST_USER)
@operation_parameters(Reference(IArchive), Choice(PackagePublishingPocket), Dict(_('Source snap channels to use for this build.'), _("A dictionary mapping snap names to channels to use for this build. Currently only 'core', 'core18', and 'snapcraft' keys are supported."), TextLine(), False))
@export_factory_operation(ISnapBuildRequest, )
@operation_for_version('devel')
def requestBuilds(requester, archive, pocket, channels=None):
Request that the snap package be built for relevant architectures.

This is an asynchronous operation; once the operation has finished, the resulting build request's C{status} will be "Completed" and its C{builds} collection will return the resulting builds.

ParametersrequesterThe person requesting the builds.
archiveThe IArchive to associate the builds with.
pocketThe pocket that should be targeted.
channelsA dictionary mapping snap names to channels to use for these builds.
ReturnsAn ISnapBuildRequest.
def requestBuildsFromJob(requester, archive, pocket, channels=None, architectures=None, allow_failures=False, fetch_snapcraft_yaml=True, build_request=None, logger=None):
Synchronous part of Snap.requestBuilds.

Request that the snap package be built for relevant architectures.

ParametersrequesterThe person requesting the builds.
archiveThe IArchive to associate the builds with.
pocketThe pocket that should be targeted.
channelsA dictionary mapping snap names to channels to use for these builds.
architecturesIf not None, limit builds to architectures with these architecture tags (in addition to any other applicable constraints).
allow_failuresIf True, log exceptions other than "already pending" from individual build requests; if False, raise them to the caller.
fetch_snapcraft_yamlIf True, fetch snapcraft.yaml from the appropriate branch or repository and use it to decide which builds to request; if False, fall back to building for all supported architectures.
build_requestThe ISnapBuildRequest job being processed, if any.
loggerAn optional logger.
ReturnsA sequence of ISnapBuild instances.
RaisesCannotRequestAutoBuildsif fetch_snapcraft_yaml is False and self.distro_series is not set.
def getBuildRequest(job_id):
Get an asynchronous build request by ID.
Parametersjob_idThe ID of the build request.
ReturnsISnapBuildRequest.
@operation_parameters(List(_('A list of snap build IDs.'), Int()))
@export_read_operation()
@operation_for_version('devel')
def getBuildSummariesForSnapBuildIds(snap_build_ids):
Return a dictionary containing a summary of the build statuses.
Parameterssnap_build_idsA list of snap build IDs.
source_ids (type: list)
ReturnsA dict consisting of the overall status summaries for the given snap builds.
@call_with(REQUEST_USER)
@operation_parameters(List(_('A list of snap build request IDs.'), Int(), False), List(_('A list of snap build IDs.'), Int(), False))
@export_read_operation()
@operation_for_version('devel')
def getBuildSummaries(request_ids=None, build_ids=None, user=None):
Return a dictionary containing a summary of build information.
Parametersrequest_idsA list of snap build request IDs.
build_idsA list of snap build IDs.
userThe IPerson requesting this information.
ReturnsA dict of {"requests", "builds"}, consisting of the overall status summaries for the given snap build requests and snap builds respectively.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.