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

install_vm.py: add new option for disk size specification #9479

Merged

Conversation

matusmarhefka
Copy link
Member

Added a new option --disk-size to specify a size of the installed VM qcow2 disk.

@matusmarhefka matusmarhefka added this to the 0.1.64 milestone Sep 6, 2022
@github-actions
Copy link

github-actions bot commented Sep 6, 2022

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@codeclimate
Copy link

codeclimate bot commented Sep 6, 2022

Code Climate has analyzed commit d4bdda6 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 40.4% (0.0% change).

View more on Code Climate.

"--disk-size",
dest="disk_size",
default=20,
help="Size of the VM qcow2 disk, default is 20 GiB (ignored when --disk is specified)."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of ignoring you can try marking them as mutually exclusive group: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_mutually_exclusive_group

Copy link
Member Author

Choose a reason for hiding this comment

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

The --disk-dir and --disk-size options can be used together, but when --disk option is specified it will have higher priority and will overwrite the other two. This is not possible to implement using ArgumentParser.add_mutually_exclusive_group, as it would need to work with subgroup of arguments (because of --disk-dir and --disk-size not being mutually exclusive).

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok

@jan-cerny jan-cerny self-assigned this Sep 6, 2022
@jan-cerny jan-cerny merged commit 5056844 into ComplianceAsCode:master Sep 7, 2022
@Mab879 Mab879 added the Test Suite Update in Test Suite. label Sep 7, 2022
@matusmarhefka matusmarhefka deleted the install_vm_disk_size branch September 8, 2022 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test Suite Update in Test Suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants