Skip to content

Instantly share code, notes, and snippets.

@AdamIsrael AdamIsrael/
Last active Jun 7, 2018

What would you like to do?
pylxd testing

An example of connecting to your local LXD daemon.

#!/usr/bin/env python3
from pylxd import Client
import os
# Use the cert generated the first time `lxc list` is run.
crt = os.path.expanduser('~/.config/lxc/client.crt')
key = os.path.expanduser('~/.config/lxc/client.key')
client = Client(
cert=(crt, key),
containers = client.containers.all()

This comment has been minimized.

Copy link
Owner Author

commented Jun 7, 2018

lxd version: 3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.