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

add support for directories and checking for free space #51385

Merged
merged 4 commits into from Feb 15, 2019

Conversation

maxim-sermin
Copy link
Contributor

@maxim-sermin maxim-sermin commented Jan 29, 2019

What does this PR do?

Expand the capabilities of the disk state.

What issues does this PR fix or reference?

None

Previous Behavior

The disk state was previously only capable of evaluating disk mounts and one could only specify the amount of used space to verify.

New Behavior

Now first the mounts are searched for the given name (previous behavior) and if no match is found, a directory with the specified name is checked as a fallback.
Additionally added the free parameter (which is false by default - backwards compatible) which treats the minimum and maximum parameters as the range of unutilized space.

Tests written?

Yes

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@dwoz
Copy link
Contributor

@dwoz dwoz commented Feb 13, 2019

@maxim-sermin The failing tests seem to be related to this change, can you look into them please?

@maxim-sermin
Copy link
Contributor Author

@maxim-sermin maxim-sermin commented Feb 15, 2019

@dwoz I fixed the tests

dwoz
dwoz approved these changes Feb 15, 2019
@dwoz dwoz merged commit a8d7c0c into saltstack:develop Feb 15, 2019
10 checks passed
garethgreenaway added a commit to garethgreenaway/salt that referenced this issue Sep 19, 2019
@waynew waynew added this to PR needs port to master in PRs to port to master Oct 24, 2019
dwoz added a commit that referenced this issue Nov 14, 2019
@garethgreenaway garethgreenaway moved this from PR needs port to master to PR merged in PRs to port to master Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants