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

Parse XML-RPC result of async XAPI tasks #7622

Merged
merged 2 commits into from
May 28, 2024
Merged

Conversation

julien-f
Copy link
Member

@julien-f julien-f commented Apr 30, 2024

DO NOT SQUASH, review by commit.

Description

Properly parse XML-RPC of async XAPI tasks instead of extracting opaque ref with regexp.

This allows handling more structured results.

Checklist

  • Commit
    • Title follows commit conventions
    • Reference the relevant issue (Fixes #007, See xoa-support#42, See https://...)
    • If bug fix, add Introduced by
  • Changelog
    • If visible by XOA users, add changelog entry
    • Update "Packages to release" in CHANGELOG.unreleased.md
  • PR
    • If UI changes, add screenshots
    • If not finished or not tested, open as Draft

@julien-f julien-f force-pushed the xapi-parse-task.result branch 3 times, most recently from adc15ad to cba1831 Compare May 16, 2024 14:50
@julien-f julien-f marked this pull request as ready for review May 16, 2024 14:52
@julien-f julien-f requested a review from MathieuRA May 16, 2024 14:52
@@ -564,10 +563,10 @@ class Vm {
)
}
try {
const ref = await this.putResource(stream, '/import/', {
const [ref] = await this.putResource(stream, '/import/', {
Copy link
Member

Choose a reason for hiding this comment

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

Why the return of the putResource become an array?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because that's the return value of an import.

IIRC, an XVA can contain multiple VMs.

BREAKING CHANGE

Also impacts `getResource()` and `putResource()`.
BREAKING CHANGE

It's no longer necessary now that task results are properly parsed.
@julien-f julien-f merged commit 61ecc85 into master May 28, 2024
1 check passed
@julien-f julien-f deleted the xapi-parse-task.result branch May 28, 2024 09:42
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.

None yet

3 participants