Created
March 18, 2016 08:43
-
-
Save ancorgs/9c628ef0f4fa717a2817 to your computer and use it in GitHub Desktop.
This file contains 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
query = DevicegraphQuery.new(a_devicegraph) | |
fine_query = query.with_disk(name: ["/dev/sda", "/dev/sdb"]) | |
more_fine_query = fine_query.with_partition(type: :primary) | |
part_query = query.with_partition(name: ["/dev/sda2", "/dev/sdc3"]) | |
# All these calls return arrays | |
query.filesystems # all the file systems in the devicegraph | |
fine_query.filesystems # Filesystems in the chosen disks | |
more_fine_query.filesystems # fs in primary parts of chosen disks | |
part_query.filesystems # Filesystems in sda2 and sdc3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment