Skip to content

libvirt_xml: add acpi and apic features to VMFeaturesXML#4330

Open
dzhengfy wants to merge 1 commit intoavocado-framework:masterfrom
dzhengfy:support_new_feature_vmxml
Open

libvirt_xml: add acpi and apic features to VMFeaturesXML#4330
dzhengfy wants to merge 1 commit intoavocado-framework:masterfrom
dzhengfy:support_new_feature_vmxml

Conversation

@dzhengfy
Copy link
Copy Markdown
Contributor

@dzhengfy dzhengfy commented Mar 1, 2026

Added support for <acpi/> and <apic/> elements inside <features> of domain XML parsing using accessors.XMLElementBool.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request expands the libvirt_xml library's capabilities by integrating support for ACPI and APIC features into its virtual machine XML parsing logic. This enhancement allows the system to correctly interpret and manage these common VM hardware features, providing more robust and complete configuration handling.

Highlights

  • New VM Features: Added support for parsing <acpi/> and <apic/> elements within the <features> section of the domain XML for virtual machines.
  • XML Accessor Implementation: Implemented the parsing of these new features using accessors.XMLElementBool, ensuring proper boolean interpretation of their presence.
Changelog
  • virttest/libvirt_xml/vm_xml.py
    • Added 'acpi' and 'apic' to the _FEATURES list within VMFeaturesXML.
    • Initialized XMLElementBool accessors for 'acpi' and 'apic' elements in the VMFeaturesXML constructor.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds support for <acpi/> and <apic/> elements within the <features> section of the domain XML by using accessors.XMLElementBool. The implementation is sound and follows the existing patterns in the codebase. I have one minor suggestion to improve code formatting for better readability and adherence to PEP 8 standards.

Comment on lines +3931 to +3940
accessors.XMLElementBool(
property_name="acpi",
libvirtxml=self,
parent_xpath="/",
tag_name="acpi")
accessors.XMLElementBool(
property_name="apic",
libvirtxml=self,
parent_xpath="/",
tag_name="apic")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The formatting of these XMLElementBool calls can be improved for better readability and consistency with PEP 8 style guidelines. When a function call is split across multiple lines, the closing parenthesis should be on a new line and aligned with the first character of the line that starts the multi-line construct.

        accessors.XMLElementBool(
            property_name="acpi",
            libvirtxml=self,
            parent_xpath="/",
            tag_name="acpi",
        )
        accessors.XMLElementBool(
            property_name="apic",
            libvirtxml=self,
            parent_xpath="/",
            tag_name="apic",
        )
References
  1. According to PEP 8, for multi-line constructs, the closing bracket/brace/parenthesis should be on a new line, aligned with the first character of the line that starts the multi-line construct. (link)

Signed-off-by: Dan Zheng <dzheng@redhat.com>
@dzhengfy dzhengfy force-pushed the support_new_feature_vmxml branch from b40e32d to a833404 Compare March 1, 2026 02:58
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.

1 participant