Part of lp.snappy.interfaces.snap View In Hierarchy
Known subclasses: lp.snappy.interfaces.webservice.ISnap
ISnap
methods that require launchpad.Edit permission.Method | requestAutoBuilds | Create and return automatic builds for this snap package. |
Method | beginAuthorization | Begin authorizing uploads of this snap package to the store. |
Method | completeAuthorization | Complete authorizing uploads of this snap package to the store. |
Method | destroySelf | Delete this snap package, provided that it has no builds. |
Inherited from IWebhookTarget:
List | valid_webhook_event_types | Valid event types for this object type. |
List | default_webhook_event_types | Default event types for new webhooks attached to this object type. |
Method | newWebhook | Create a new webhook. |
This webservice API method is deprecated. It is normally better to
use the requestBuilds
method instead, which can make dispatching
decisions based on the contents of snapcraft.yaml.
Parameters | allow_failures | If True, log exceptions other than "already pending" from individual build requests; if False, raise them to the caller. |
fetch_snapcraft_yaml | If 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. | |
logger | An optional logger. | |
Returns | A sequence of ISnapBuild instances. | |
Raises | CannotRequestAutoBuilds | if no auto_build_archive or auto_build_pocket is set. |
IncompatibleArguments | if no distro_series is set. |
This is intended for use by third-party sites integrating with Launchpad. Most users should visit <snap URL>/+authorize instead.
Parameters | success_url | The URL to redirect to when authorization is complete. If None (only allowed for internal use), defaults to the canonical URL of the snap. |
Returns | The SSO caveat ID from the package_upload macaroon returned
by the store. The third-party site should acquire a discharge
macaroon for this caveat using OpenID and then call
completeAuthorization . | |
Raises | CannotAuthorizeStoreUploads | if the snap package is not properly configured for store uploads. |
BadRequestPackageUploadResponse | if the store returns an error or a response without a macaroon when asked to issue a package_upload macaroon. | |
SnapAuthorizationBadMacaroon | if the package_upload macaroon returned by the store has unsuitable SSO caveats. |
This is intended for use by third-party sites integrating with Launchpad.
Parameters | root_macaroon | A serialized root macaroon returned by the store. Only required if not already set by beginAuthorization. |
discharge_macaroon | The serialized discharge macaroon returned by SSO via OpenID. Only required if the root macaroon has a third-party caveat addressed to SSO. | |
Raises | CannotAuthorizeStoreUploads | if the snap package is not properly configured for store uploads. |