I've submitted these before, but I don't know if its that I did it
wrong or whatever, but they both disappeared into the nether regions
of the interwebs. no matter. I've just sat and re-read through the
patch and contrib pages of the web site and am going to make another
attempt. wish me luck. (suggestions if I'm wrong are welcome too).
First is a patch to the rpm module. In it I do two things. First, I
restructured the code to minimize duplication of functionality (3
functions were doing very similar things), and made them all rely on
the most verbose function (glob). As I was testing that change, I
discovered that the output of verify was completely different content
from flatten to not flattened. So I made that output match. Maybe
that isn't what was intended, but it did not make sense for verify to
return the NEVRA and nothing else.
The second patch is a module that wraps the command 'df -P [partition]'.
Here is some example usage:
[r...@overlord modules]# func "minion" call disk usage
{'minion': {'/': {'available': 22596344,
'device': '/dev/hda2',
'percentage': 8,
'total': 25822364,
'used': 1914316},
'/boot': {'available': 176701,
'device': '/dev/hda1',
'percentage': 8,
'total': 202220,
'used': 15079},
'/dev/shm': {'available': 1027736,
'device': 'none',
'percentage': 0,
'total': 1027736,
'used': 0},
'/tmp': {'available': 3785508,
'device': '/dev/hda5',
'percentage': 2,
'total': 4032092,
'used': 41760},
'/var': {'available': 3487956,
'device': '/dev/hda3',
'percentage': 9,
'total': 4032124,
'used': 339340}}}
[r...@overlord modules]# func "minion" call disk usage /boot
{'minion': {'/boot': {'available': 176701,
'device': '/dev/hda1',
'percentage': 8,
'total': 202220,
'used': 15079}}}
The optional partition argument accepts the same arguments as the cli
for df. I also checked and standard cli regexp like * and [abc] also
work for the partition name.
2 patch e-mails coming right up.
-greg
_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list