craft_providers.lxd.lxd module
LXD command-line interface helpers.
- class craft_providers.lxd.lxd.LXD(*, lxd_path=PosixPath('lxd'))[source]
Bases:
object
Interface to lxd command-line.
- Parameters
lxd_path (
Path
) – Path to lxd.- Variables
minimum_required_version – Minimum lxd version required for compatibility.
- init(*, auto=False, sudo=False)[source]
Initialize LXD.
Sudo is required if user is not in lxd group.
- Parameters
auto (
bool
) – Use default settings.sudo (
bool
) – Use sudo to invoke init.
- Return type
None
- is_supported_version()[source]
Check if LXD version is supported.
A helper to check if LXD meets minimum supported version for craft-providers (currently >= 4.0).
- Return type
bool
- Returns
True if installed version is supported.
- minimum_required_version = '4.0'