(FACT-2220) Add Aix disks fact#1987
Merged
BogdanIrimie merged 1 commit intopuppetlabs:4.xfrom Jul 23, 2020
Merged
Conversation
|
CLA signed by all contributors. |
lib/facter/resolvers/aix/disks.rb
Outdated
| class << self | ||
| private | ||
|
|
||
| MEGABYTES_EXPONENT = 1024**2 |
Contributor
There was a problem hiding this comment.
These should be extracted in a common util class, as it it already defined in aix/disks.rb
lib/facter/resolvers/aix/disks.rb
Outdated
|
|
||
| result.each_line do |line| | ||
| disk_name = line.split(' ')[0].strip | ||
| info = find_size(disk_name) |
Contributor
There was a problem hiding this comment.
Could you please rename info to size or size_hash?
lib/facter/resolvers/aix/disks.rb
Outdated
| Hash[*lsl_content] | ||
| end | ||
|
|
||
| def compute_size(info_hash) |
Contributor
There was a problem hiding this comment.
This is pretty similar to the one implemented in aix/utils/partitions.rb maybe it could be reused.
lib/facter/resolvers/aix/disks.rb
Outdated
| end | ||
|
|
||
| def extract_info(lsl_content) | ||
| lsl_content = lsl_content.strip.split("\n").map do |line| |
Contributor
There was a problem hiding this comment.
Will strip.split("\n") work properly? str.strip will also remove "\n"
Maybe you could replace it with .each_line
3e2cd8b to
d2ee78d
Compare
Contributor
Author
|
jenkins please test this on aix61-POWERa |
Contributor
Author
|
jenkins please test this on aix61-POWERa |
BogdanIrimie
approved these changes
Jul 23, 2020
sebastian-miclea
approved these changes
Jul 23, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.