Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

(FACT-2231) Add AIX mountpoints fact #398

Merged
merged 1 commit into from
Mar 31, 2020
Merged

(FACT-2231) Add AIX mountpoints fact #398

merged 1 commit into from
Mar 31, 2020

Conversation

oanatmaria
Copy link
Contributor

No description provided.

lib/facts/aix/mountpoints.rb Outdated Show resolved Hide resolved

def execute_df_command(fact_name)
@fact_list[:sizes] = {}
output, _status = Open3.capture2('df -P 2>/dev/null')
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we process the status value? Same for mountpoints resolver

lib/resolvers/aix/filesystems_sizes.rb Outdated Show resolved Hide resolved
@fact_list.fetch(fact_name) { execute_df_command(fact_name) }
end

def execute_df_command(fact_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

you are extracting the file system sizes, not just executing the df command. Probably you should have another 2 methods for executing the command and extracting the file systems.

lib/resolvers/aix/filesystems_sizes.rb Outdated Show resolved Hide resolved
lib/resolvers/aix/filesystems_sizes.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@Filipovici-Andrei Filipovici-Andrei left a comment

Choose a reason for hiding this comment

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

Could you have used something from FileSystemHelper from Resolvers Utils?

@Filipovici-Andrei Filipovici-Andrei merged commit 0830e75 into master Mar 31, 2020
@oanatmaria oanatmaria deleted the FACT-2231 branch April 2, 2020 11:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants