Skip to content

Fix container endpoint drop#704

Merged
simondeziel merged 3 commits intocanonical:mainfrom
tugbataluy:fix_container_endpoint_drop
Feb 24, 2026
Merged

Fix container endpoint drop#704
simondeziel merged 3 commits intocanonical:mainfrom
tugbataluy:fix_container_endpoint_drop

Conversation

@tugbataluy
Copy link
Contributor

@tugbataluy tugbataluy commented Feb 24, 2026

Overview

Following the removal of the /1.0/containers and /1.0/virtual-machines endpoints in LXD (lxd#17706), update pylxd to use the /1.0/instances endpoint exclusively.

The Container and VirtualMachine models were subclassing Instance but overriding _endpoint with the now-removed legacy endpoints, causing all operations to return 404. The integration test helper was also directly calling the legacy endpoints via the raw API client.

…containers

Signed-off-by: tugbataluy <tugba.taluy@canonical.com>
…cated virtual-machines

Signed-off-by: tugbataluy <tugba.taluy@canonical.com>
The /1.0/containers endpoint was removed in LXD 6.x in favour of
/1.0/instances. Update the integration test helpers to use the correct
endpoint to fix CI failures against latest/edge.

Signed-off-by: tugbataluy <tugba.taluy@canonical.com>
Copy link
Member

@simondeziel simondeziel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@simondeziel simondeziel requested a review from Copilot February 24, 2026 16:11
@tugbataluy tugbataluy marked this pull request as ready for review February 24, 2026 16:14
@simondeziel simondeziel merged commit 7378be6 into canonical:main Feb 24, 2026
16 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates pylxd to use LXD’s consolidated /1.0/instances endpoint after legacy /1.0/containers and /1.0/virtual-machines were removed, fixing 404s caused by outdated endpoints.

Changes:

  • Point Container and VirtualMachine models at the instances endpoint.
  • Update integration test helper to create/delete via instances instead of containers.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
pylxd/models/virtual_machine.py Switches model endpoint from legacy virtual-machines to instances.
pylxd/models/container.py Switches model endpoint from legacy containers to instances.
integration/testing.py Updates raw API calls to use instances for container lifecycle in integration tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants