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

[Utilities] Add #disk_usage #155

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

NickLaMuro
Copy link
Member

As one of two things that is still making use of manageiq-gems-pending (the other being PostgresAdmin), this only a single use method that doesn't need to bring then entirety of manageiq-gems-pending along with it in the build.

For #disk_usage, porting over the singular method itself, while removing the linux vs mac differences (only keeping the linux), should be good enough for the use case required by the appliance console.

As one of two things that is still making use of `manageiq-gems-pending`
(the other being `PostgresAdmin`), this only a single use method that
doesn't need to bring then entirety of `manageiq-gems-pending` along
with it in the build.

For `#disk_usage`, porting over the singular method itself, while
removing the `linux` vs `mac` differences (only keeping the linux),
should be good enough for the use case required by the appliance
console.
usage_hash = described_class.disk_usage(file).first
expect(usage_hash[:filesystem]).to be_kind_of String
expect(usage_hash[:filesystem]).to be_present
expect(usage_hash[:total_bytes]).to be > 0
Copy link
Member Author

@NickLaMuro NickLaMuro Mar 10, 2021

Choose a reason for hiding this comment

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

Of note: These tests won't pass on MacOS since the versions of df are different, but for now I am just ignoring that problem, as I hope these tests will pass just fine in CI.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, the specs for this were completely ripped from here:

https://github.com/ManageIQ/manageiq-gems-pending/blob/fbcaf76d5894407dd1b25f58e4f02faac361428e/spec/util/miq-system_spec.rb#L26-L148

So nothing new is added, besides the omission of the :macosx specific specs.

@NickLaMuro
Copy link
Member Author

@Fryguy I think this one is actually good to go. I didn't handle any other case of MiqSystem.disk_usage yet, but this should be able to set us up for removing manageiq-gems-pending from this repo when PostgresAdmin is integrated in #153 (still a bit of work to do on that one though)

@Fryguy Fryguy merged commit 6361582 into ManageIQ:master Mar 11, 2021
@Fryguy Fryguy self-assigned this Mar 11, 2021
bdunne added a commit that referenced this pull request Mar 30, 2021
Enhancements:
- Support a configuring the kafka server with the current IPAddr - #159
- Support moving Kafka Persistent data to a dedicated disk - #158
- Inject postgres admin into the appliance console - #157
- [Utilities] Add #disk_usage - #155
- When configuring the kafka client disable the server - #154
- Pass password to the keytool command using stdin - #152
- Support configuring Kafka through the CLI - #151
- Unify kafka client setup - #149
- use attr_reader only for password - #148
- remove duplicate class attr writer - #145
- Toggle Settings.prototype.messaging_type for Kafka support - #137
- Initial commit of kafka server configuration - #130

Bugs:
- Fix Hakiri errors on activesupport/activerecord - #156
- Fix MAC test failures - #150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants