craft_providers.lxd.installer module
LXD Provider.
- craft_providers.lxd.installer.ensure_lxd_is_ready(*, remote='local', lxc=<craft_providers.lxd.lxc.LXC object>, lxd=<craft_providers.lxd.lxd.LXD object>)[source]
Ensure LXD is ready for use.
- craft_providers.lxd.installer.install(sudo=True)[source]
Install LXD.
Install application, using sudo if specified.
- Return type
str
- Returns
LXD version.
- Raises
LXDInstallationError – on installation error.
LXDError – on unexpected error.
- Parameters
sudo (
bool
) –
- craft_providers.lxd.installer.is_initialized(*, remote, lxc)[source]
Verify that LXD has been initialized and configuration looks valid.
If LXD has been installed but the user has not initialized it (lxd init), the default profile won’t have devices configured. Trying to launch an instance or create a project using this profile will result in failures.
- Return type
bool
- Returns
True if initialized, else False.
- Parameters
remote (
str
) –lxc (
LXC
) –