Created
August 11, 2015 15:08
-
-
Save moali87/6aa41055c8871a341b16 to your computer and use it in GitHub Desktop.
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
| 'This grain is to retrieve the drive list from /proc/scsi/scsi' | |
| import subprocess | |
| from subprocess import stdout | |
| def get_drives(): | |
| grains = {} | |
| grains['drive_list'] = True | |
| execString = ('grep', '-E', '\"TOSHIBA|SEAGATE|ATA|HGST\"', '/proc/scsi/scsi') | |
| process = subprocess.call((execString), stdout=STDOUT) | |
| grains['drive_list'] = NEED SOMETHING HERE | |
| return grains['drive_list'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment