-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.py
34 lines (26 loc) · 985 Bytes
/
cli.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import argparse
import unittest
from unittest.suite import TestSuite
from runner import execute
import subprocess
parser = argparse.ArgumentParser()
parser.add_argument("--fs", help = "filesystem to mount",action='store')
parser.add_argument("--dtr", help = "Disk to remove", action='store')
parser.add_argument("--disk",nargs='+', help = "disk name", action='store')
parser.add_argument('--lvname', help="name of the logical volume",action='store')
parser.add_argument('--size', help="size of the lv",action='store')
parser.add_argument('--vgname', help="volume group name to allocate lv",action='store')
args = parser.parse_args()
fs = args.fs
dtr = args.dtr
disk_name = args.disk
lvname = args.lvname
size = args.size
vgname = args.vgname
if __name__ == '__main__':
import testfile
suite = TestSuite()
loader = unittest.TestLoader()
suite.addTests(loader.loadTestsFromTestCase(testfile.Task))
runner = unittest.TextTestRunner()
runner.run(suite)