Revision ac156ecd lib/storage/gluster.py
b/lib/storage/gluster.py | ||
---|---|---|
53 | 53 |
|
54 | 54 |
""" |
55 | 55 |
|
56 |
def __init__(self, server_addr, port, volume, _run_cmd=utils.RunCmd): |
|
56 |
def __init__(self, server_addr, port, volume, _run_cmd=utils.RunCmd, |
|
57 |
_mount_point=None): |
|
57 | 58 |
"""Creates a Gluster volume object. |
58 | 59 |
|
59 | 60 |
@type server_addr: str |
... | ... | |
72 | 73 |
port = netutils.ValidatePortNumber(port) |
73 | 74 |
self._port = port |
74 | 75 |
self._volume = volume |
75 |
self.mount_point = io.PathJoin(constants.GLUSTER_MOUNTPOINT, |
|
76 |
self._volume) |
|
76 |
if _mount_point: # tests |
|
77 |
self.mount_point = _mount_point |
|
78 |
else: |
|
79 |
self.mount_point = ssconf.SimpleStore().GetGlusterStorageDir() |
|
77 | 80 |
|
78 | 81 |
self._run_cmd = _run_cmd |
79 | 82 |
|
Also available in: Unified diff