-
Notifications
You must be signed in to change notification settings - Fork 259
Collect all VM disk target device names from dumpxml #4231
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
base: master
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughAdds a new public helper function get_all_disks_target(vm_name, options="") in virttest/utils_libvirt/libvirt_disk.py that loads a VM XML by vm_name, collects disk target device names (disk.target.dev) from disk devices, and returns them as a list. Returns an empty list if VM XML is None. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
virttest/utils_libvirt/libvirt_disk.py (1)
166-169: Optional: align with existing device access patternElsewhere in this module, devices are accessed via
vmxml.devices.by_device_tag("disk"). Consider using that for consistency withget_mirror_part_in_xml(). Functionality is the same.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
virttest/utils_libvirt/libvirt_disk.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
virttest/utils_libvirt/libvirt_disk.py (1)
virttest/libvirt_xml/vm_xml.py (4)
VMXML(753-2082)new_from_dumpxml(788-803)get_devices(550-565)append(40-43)
🪛 Ruff (0.12.2)
virttest/utils_libvirt/libvirt_disk.py
165-165: Undefined name vm_name
(F821)
🔇 Additional comments (1)
virttest/utils_libvirt/libvirt_disk.py (1)
163-171: No callers found for_all_disk_targets(); ignore signature‐break concern.Likely an incorrect or invalid review comment.
9f40114 to
a53340b
Compare
|
@BulaYoungR please check https://github.com/avocado-framework/avocado-vt/actions/runs/18555530700/job/52993748304?pr=4231 for the CI failure |
Summary by CodeRabbit