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

Implement ALL target for snapshot, snaplist and snapremove #32

Merged
merged 2 commits into from
Sep 28, 2024

Conversation

Defenso-QTH
Copy link
Contributor

Hello,

Okay so this is a proposal to close #18.

It brings:

  • iocage snaplist ALL to list snapshots from all jails at once
  • iocage snapshot ALL -n <name> to take a snapshot of all jails at once, with a common name. Intended for mass backup, upgrade or migration scenarios.
  • iocage snapremove ALL -n <name> to remove such a common snapshot from all jails.
  • iocage snapremove <jail> -n ALL -f to remove all snapshots from a jail. It requires -f or --force.
  • These last two can be combined into iocage snapremove ALL -n ALL -f to remove all snapshots from all jails.

I provided some tests for all these features and an update for the documentation.


Make sure to follow and check these boxes before submitting a PR! Thank you.

@Defenso-QTH Defenso-QTH changed the title Implement ALL target for snapshot and snapremove Implement ALL target for snapshot, snaplist and snapremove Sep 11, 2024
@coveralls
Copy link

coveralls commented Sep 11, 2024

Pull Request Test Coverage Report for Build 10965406135

Details

  • 0 of 58 (0.0%) changed or added relevant lines in 4 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.06%) to 7.738%

Changes Missing Coverage Covered Lines Changed/Added Lines %
iocage_cli/snapshot.py 0 2 0.0%
iocage_cli/snaplist.py 0 6 0.0%
iocage_cli/snapremove.py 0 7 0.0%
iocage_lib/iocage.py 0 43 0.0%
Files with Coverage Reduction New Missed Lines %
iocage_cli/snapremove.py 1 0.0%
iocage_lib/iocage.py 2 0.0%
Totals Coverage Status
Change from base Build 10917819529: -0.06%
Covered Lines: 798
Relevant Lines: 7804

💛 - Coveralls

tests/functional_tests/0019_list_snapshot_test.py Outdated Show resolved Hide resolved
tests/functional_tests/0019_list_snapshot_test.py Outdated Show resolved Hide resolved
iocage_cli/snaplist.py Show resolved Hide resolved
iocage_lib/iocage.py Show resolved Hide resolved
Use isinstance() instead of type()

Co-authored-by: Vincent Barbaresi <vincent.barbaresi@datadoghq.com>
@dgeo
Copy link
Contributor

dgeo commented Sep 28, 2024

Thank you @Defenso-QTH and @vbarbaresi for review !

@dgeo dgeo merged commit 704ad7c into freebsd:master Sep 28, 2024
2 checks passed
@Defenso-QTH Defenso-QTH deleted the snapall-PR branch September 28, 2024 11:11
dgeo pushed a commit to criecm/iocage that referenced this pull request Nov 29, 2024
* Implement ALL target for snapshot, snaplist and snapremove

* Apply suggestions from code review

Use isinstance() instead of type()

Co-authored-by: Vincent Barbaresi <vincent.barbaresi@datadoghq.com>
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.

snapremove ALL does not work
4 participants