Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxd: Update copy op response body when source is snapshot #14139

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

boltmark
Copy link
Contributor

This PR updates the copy operation response body when using a snapshot as the source. Previously, the response body allocated the snapshot to resources.instances and resources.containers. This is not entirely accurate, so we now check to see if the source is a snapshot, and if so, we allocate it to resources.instances_snapshots instead of resources.instances and resources.containers.

Closes #13999.

Previously, when copying an instance using a snapshot
as the source, the response body allocated the snapshot
to resources.instances and resources.containers. This
is not entirely accurate, so in this commit we add a
check to see if the source is a snapshot, and if so, we
allocate it to resources.instances_snapshots instead of
resources.instances and resources.containers.

Signed-off-by: Mark Bolton <mark.bolton@canonical.com>
@tomponline tomponline merged commit 57cc91c into canonical:main Sep 23, 2024
27 of 30 checks passed
mas-who added a commit to canonical/lxd-ui that referenced this pull request Sep 24, 2024
…ration [WD-14541] (#918)

## Done

- previously, an operation for creating an instance from a snapshot
would include the snapshot name in the instances resource field within
the operation response metadata. We had to include a workaround to
filter out the snapshots in order to extract the instance name.
- with this upstream [PR](canonical/lxd#14139)
merged, we can now remove the workaround
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.

Improve resources data for create instance from copy operation
2 participants