virt.virt_test_utils: run_autotest - 'tar' needs relative paths to strip the leading '/'
[autotest-zwu.git] / client / bin / fsdev_mgr.py
blob26c18b5a28d425646af9232a82153a88d57ac4fe
1 """
2 This module defines the BaseFsdevManager Class which provides an
3 implementation of the 'fsdev' helper API; site specific extensions
4 to any of these methods should inherit this class.
5 """
7 from autotest_lib.client.bin import utils
9 class BaseFsdevManager(object):
11 def __init__(self):
12 pass
15 def include_partition(self, part_name):
16 # Client to fill in logic that will pick the right partitions
17 return False
20 def map_drive_name(self, part_name):
21 return part_name
24 def check_mount_point(self, part_name, mount_point):
25 """
26 @param part_name: A partition name such as 'sda3' or similar.
27 @param mount_point: A mount point such as '/usr/local' or an empty
28 string if no mount point is known.
30 @returns The expected mount point for part_name or a false value
31 (None or '') if the client should not mount this partition.
32 """
33 return mount_point
36 def use_partition(self, part_name):
37 """
38 @param part_name: A partition name such as 'sda3' or similar.
40 @returns bool, should we use this partition for testing?
41 """
42 return True
45 SiteFsdevManager = utils.import_site_class(
46 __file__, "autotest_lib.client.bin.site_fsdev", "SiteFsdevManager",
47 BaseFsdevManager)
49 # Wrap whatever SiteFsdevManager class we've found above in a class
50 class FsdevManager(SiteFsdevManager):
51 pass