Skip to content

Conversation

@cgwalters
Copy link
Collaborator

I'm looking at using bcvk to create libvirt VMs
that are targets for tmt, like
bootc-dev/bootc@54f8562#diff-dad7b84674fccc140b0fb2f17af742872a2f5cda5ddd36af501f39b404baf0cbR70 was doing.

@cgwalters cgwalters enabled auto-merge (rebase) October 17, 2025 18:16
@gemini-code-assist
Copy link

Summary of Changes

Hello @cgwalters, 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 significantly enhances the bcvk libvirt list command by enabling the extraction and display of SSH connection details for virtual machines. This functionality is crucial for automating interactions with libvirt VMs, particularly for testing frameworks like tmt, by providing direct access to SSH port and private key information. It also refines the command's usability by allowing queries for specific domains and improving the JSON output format for easier programmatic consumption.

Highlights

  • SSH Data Extraction: The bcvk libvirt list command can now extract SSH connection data, including the SSH port and private key, from libvirt domains. This data is available in the JSON output format.
  • Specific Domain Query: The bcvk libvirt list command now supports an optional DOMAIN_NAME argument, allowing users to query information for a single, specific libvirt domain. When used with --format=json, it returns a single JSON object instead of an array.
  • Enhanced Output: The table output for bcvk libvirt list now includes an 'SSH' column, providing a quick overview of SSH connectivity for each domain. The JSON output for individual domains now explicitly includes ssh_port, has_ssh_key, and ssh_private_key fields.
  • Integration Test: A new integration test (test_libvirt_list_json_ssh_metadata) has been added to verify the correct extraction and parsing of SSH metadata from libvirt domain XML into the JSON output.
  • Documentation Updates: The bcvk-libvirt-list.md man page has been updated to reflect the new DOMAIN_NAME argument and includes examples for extracting SSH credentials using jq for automation purposes.
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

@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 introduces support for extracting SSH connection data in libvirt. It adds a new test case to verify that the libvirt list JSON output includes SSH metadata, modifies the DomainLister to extract SSH port and private key information from the domain XML, and updates the LibvirtListOpts to include an optional domain name parameter. The documentation is also updated to reflect these changes. I have provided comments to address potential issues.

I'm looking at using bcvk to create libvirt VMs
that are targets for tmt, like
bootc-dev/bootc@54f8562#diff-dad7b84674fccc140b0fb2f17af742872a2f5cda5ddd36af501f39b404baf0cbR70
was doing.

Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters force-pushed the libvirt-list-connection branch from c347876 to e34cd8d Compare October 17, 2025 19:30
@cgwalters cgwalters merged commit d2d89c0 into bootc-dev:main Oct 20, 2025
4 checks passed
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.

2 participants