Part of lp.snappy.interfaces.snapstoreclient View In Hierarchy
Method | requestPackageUploadPermission | Request permission from the store to upload builds of a snap. |
Method | upload | Upload a snap build to the store. |
Method | refreshDischargeMacaroon | Refresh a snap's discharge macaroon. |
Method | refreshIfNecessary | Call a function, refreshing macaroons if necessary. |
Method | checkStatus | Poll the store once for upload scan status. |
Method | listChannels | Fetch the current list of channels from the store. |
The returned macaroon will include a third-party caveat that must be discharged by the login service. This method does not acquire that discharge; it must be acquired separately.
Parameters | snappy_series | The ISnappySeries in which this snap should
be published on the store. |
snap_name | The registered name of this snap on the store. | |
Returns | A serialized macaroon appropriate for uploading builds of this snap. |
Parameters | snapbuild | The ISnapBuild to upload. |
Returns | A URL to poll for upload processing status. | |
Raises | BadRefreshResponse | if the authorising macaroons need to be refreshed, but attempting to do so fails. |
UnauthorizedUploadResponse | if the user who authorised this upload is not themselves authorised to upload the snap in question. | |
UploadFailedResponse | if uploading the build to the store failed. |
Parameters | snap | An ISnap whose discharge macaroon needs to be refreshed. |
If the called function raises NeedsRefreshResponse
, then this
calls refreshDischargeMacaroon
and tries again.
Parameters | snap | An ISnap whose discharge macaroon may need to be
refreshed. |
f | The function to call. | |
args | Positional arguments to f . | |
kwargs | Keyword arguments to f . |
Parameters | status_url | A URL as returned by upload . |
Returns | A tuple of (url , revision ), where url is a URL on the
store with further information about this upload, and revision
is the store revision number for the upload or None. | |
Raises | UploadNotScannedYetResponse | if the store has not yet scanned the upload. |
BadScanStatusResponse | if the store failed to scan the upload. |