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

feat(storage): config support to delete partitions #1572

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Sep 3, 2024

Allow using delete and deleteIfNeeded for a partition section in the storage JSON config, according to the auto_storage document.

Notes about the schema:

  • delete and deleteIfNeeded cannot be set at the same time.
  • If delete is set, then search is mandatory and no other property is accepted.
  • If deleteIfNeeded is set, then search is mandatory and size is optional. No other property is accepted.

Examples:

  • Delete a partition:
{
  "search": "/dev/vda1",
  "delete": true
}
  • Delete a partition on demand:
{
  "search": "/dev/vda1",
  "deleteIfNeeded": true
}
  • Resize or delete a partition on demand (resize is not implemenetd yet):
{
  "search": "/dev/vda1",
  "size": { "min": 0 },
  "deleteIfNeeded": true
}

@joseivanlopez joseivanlopez marked this pull request as ready for review September 4, 2024 09:53
@coveralls
Copy link

coveralls commented Sep 4, 2024

Coverage Status

coverage: 71.757%. remained the same
when pulling 607b251 on joseivanlopez:storage-delete
into 615f22e on openSUSE:master.

@joseivanlopez joseivanlopez merged commit a6926d6 into agama-project:master Sep 4, 2024
4 checks passed
@imobachgs imobachgs mentioned this pull request Sep 20, 2024
imobachgs added a commit that referenced this pull request Sep 20, 2024
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.

3 participants