-
Notifications
You must be signed in to change notification settings - Fork 11
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
Saptune gatherer #256
Saptune gatherer #256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rtorrero Some few things.
Besides that, i don't still see any "caching" system.
I mean, we must only run the commands for each argument once, so you need to check if they were executed, and store the output
31239f5
to
41bf2a9
Compare
@@ -0,0 +1,2 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for purity we could remove this first empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it because I noticed the output of saptune
adds it, but it shouldn't make any difference
41bf2a9
to
9d0c176
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good!
Once we have this minor things fixed we are ready to merge.
You can start working in the documentation of the gatherer in wanda if you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @rtorrero
Ready to merge from my side.
PD: added last nitpick comment if you want to have a look 🙈
@@ -70,22 +70,21 @@ func (s *SaptuneGatherer) Gather(factsRequests []entities.FactRequest) ([]entiti | |||
facts := []entities.Fact{} | |||
log.Infof("Starting %s facts gathering process", SaptuneGathererName) | |||
saptuneRetriever, err := saptune.NewSaptune(s.executor) | |||
|
|||
if err != nil { | |||
return facts, &SaptuneNotInstalled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could return nil, &SaptuneNotInstalled
as well (the same for the next)
And even SaptuneNotInstalled.Wrap(err.Error())
in this case, as we have the rpm command error
This PR adds a new Saptune gatherer using the same saptune core code as the #253 (
saptune_discovery
). The whitelisted saptune arguments are the following: