Commit bbd11400 authored by Vivien Alger's avatar Vivien Alger

Path to output file as argument

parent aaf7228a
......@@ -76,12 +76,16 @@ def parseCli():
"""
Parser definition for the command line interface
"""
usage = """ %(prog)s <filepath> -s [sections] -opts [options] """
parser = ArgumentParser(prog="test_conso", usage=usage)
usage = """ %(prog)s <filepath> <xml-path> -s [sections] -opts [options] """
parser = ArgumentParser(prog="kvm-monitor.py", usage=usage)
parser.add_argument("filepath",
help="Path to the configuration file with the informations"
)
parser.add_argument("xml_path",
help="Path to the xml output file"
)
parser.add_argument("-s","--sections", nargs='+', required=True,
help="Sections in which the informations can be found." +
......@@ -104,6 +108,7 @@ def runMonitor():
args = parser.parse_args()
info_dict = MonitorConfig(args.filepath,
args.xml_path,
args.sections,
args.options,
).getConfig()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment