Source: factory.deploy/extend.substrate/ObjLxc.py
A controller class for interacting with LXD containers.
| Method | Signature | Description |
|---|---|---|
| connect | connect() -> bool |
|
| list_instances | list_instances() -> List[Dict[str, Any]] |
Lists all LXD containers and their basic status. |
| create_instance | create_instance(config: Dict[str, Any]) -> bool |
Creates a new LXD container. |
| start_instance | start_instance(name: str) -> bool |
Starts an LXD container. |
| stop_instance | stop_instance(name: str, force: bool = False) -> bool |
Stops an LXD container. |
| delete_instance | delete_instance(name: str, force: bool = False) -> bool |
Deletes an LXD container. |
| get_instance | get_instance(name: str) -> Optional[Dict[str, Any]] |
Gets the status and details of a specific container. |
| execute_command | execute_command(name: str, command: List[str]) -> Optional[Dict[str, Any]] |
Executes a command inside a running LXD container. |
List all LXD containers.
Create a new LXD container.
Start an LXD container.
Stop an LXD container.
Delete an LXD container.
Get the status and details of an LXD container.
Execute a command inside a running LXD container.
Verify the LXD daemon connection.