craft_providers.actions.snap_installer module
Helpers for snap commands.
- exception craft_providers.actions.snap_installer.SnapInstallationError(brief: str, details: Optional[str] = None, resolution: Optional[str] = None)[source]
Bases:
craft_providers.errors.ProviderError
Unexpected error during snap installation.
- Parameters
brief (
str
) –details (
Optional
[str
]) –resolution (
Optional
[str
]) –
- brief: str
- craft_providers.actions.snap_installer.get_host_snap_info(snap_name)[source]
Get info about a snap installed on the host.
- Parameters
snap_name (
str
) –- Return type
Dict
[str
,Any
]
- craft_providers.actions.snap_installer.inject_from_host(*, executor, snap_name, classic)[source]
Inject snap from host snap.
- Parameters
executor (
Executor
) – Executor for targetsnap_name (
str
) – Name of snap to injectclassic (
bool
) – Install in classic mode
- Raises
SnapInstallationError – on failure to inject snap
- Return type
None
- craft_providers.actions.snap_installer.install_from_store(*, executor, snap_name, channel, classic)[source]
Install snap from store into target.
Perform installation using method which prevents refreshing.
- Parameters
executor (
Executor
) – Executor for target.snap_name (
str
) – Name of snap to install.channel (
str
) – Channel to install from.classic (
bool
) – Install in classic mode.
- Raises
SnapInstallationError – on unexpected error.
- Return type
None