Pylxd - list all instances of a project

Hello,

I try to list all instances on a specific LXD project, but I only see the instance of the “default” project.
The all() method not seems to accept a “project” attribute.

Can you help me to the code to use to list all instance?
Thanks,
Best regards

I have found the solution on the source code of pylxd.

On the client we can specify the project, it’s working :slight_smile:

client = Client(
        endpoint=remote_endpoint,
        cert=(cert),
        verify=False,
        project=project
    )

Maybe the pylxd doc should be update to specify the params we can pass on the client.

I added the pylxd tag to try to get the attention of the folks maintaining the python binding. I agree better documentation would be good to have!

Maybe @sdeziel can send a quick PR?

PR sent https://github.com/lxc/pylxd/pull/498

1 Like