Skip to content

cli: Add command to create base disk#254

Open
Johan-Liebert1 wants to merge 1 commit intobootc-dev:mainfrom
Johan-Liebert1:base-disk-create-cli
Open

cli: Add command to create base disk#254
Johan-Liebert1 wants to merge 1 commit intobootc-dev:mainfrom
Johan-Liebert1:base-disk-create-cli

Conversation

@Johan-Liebert1
Copy link
Copy Markdown
Contributor

For bootc-dev/bootc#2172 it would be useful for us to create the base disk manually and not delegate it to the bcvk libvirt run command

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 adds a create subcommand to the base-disks CLI to facilitate the creation of base disk images. The implementation introduces a CreateBaseDiskOpts struct and integrates image inspection and disk creation logic. Feedback suggests consolidating imports for consistency and making the fields of the new options struct public with descriptive documentation for the CLI help output.

Comment thread crates/kit/src/libvirt/base_disks_cli.rs Outdated
Comment thread crates/kit/src/libvirt/base_disks_cli.rs
For bootc-dev/bootc#2172 it would be useful
for us to create the base disk manually and not delegate it to the
`bcvk libvirt run` command

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Copy link
Copy Markdown
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

This one deserves an integration test too.

/// Prune unreferenced base disk images
Prune(PruneOpts),
/// Create a base disk
Create(CreateBaseDiskOpts),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe call it to-base-disk? Matching bcvk to-disk, but for libvirt and clearly noting that it becomes a base.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you mean as a libvirt subcommand? Like bcvk libvirt to-base-disk or as a top level command bcvk to-base-disk?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just as a libvirt subcommand - if it changes libvirt stuff it should be under that right?

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