Options
=======
+.. option:: -b, --batch FILE
+
+ Path to batch file.
+
.. option:: -c, --config FILE
Path to cephfs-shell.conf
-.. option:: -b, --batch FILE
+.. option:: -f, --fs FS
- Path to batch file.
+ Name of filesystem to mount.
.. option:: -t, --test FILE
#
#####################################################
-def setup_cephfs():
+def setup_cephfs(args):
"""
Mounting a cephfs
"""
global cephfs
try:
cephfs = libcephfs.LibCephFS(conffile='')
- cephfs.mount()
+ cephfs.mount(filesystem_name=args.fs)
except libcephfs.ObjectNotFound as e:
print('couldn\'t find ceph configuration not found')
sys.exit(e.get_error_code())
def manage_args():
main_parser = argparse.ArgumentParser(description='')
- main_parser.add_argument('-c', '--config', action='store',
- help='Path to Ceph configuration file.',
- type=str)
main_parser.add_argument('-b', '--batch', action='store',
help='Path to CephFS shell script/batch file'
'containing CephFS shell commands',
type=str)
+ main_parser.add_argument('-c', '--config', action='store',
+ help='Path to Ceph configuration file.',
+ type=str)
+ main_parser.add_argument('-f', '--fs', action='store',
+ help='Name of filesystem to mount.',
+ type=str)
main_parser.add_argument('-t', '--test', action='store',
help='Test against transcript(s) in FILE',
nargs='+')
sys.argv.append(exe)
sys.argv.extend([i.strip() for i in ' '.join(args.commands).split(',')])
- setup_cephfs()
+ setup_cephfs(args)
def execute_cmd_args(args):