Commit bbd11400 authored by Vivien Alger's avatar Vivien Alger

Path to output file as argument

parent aaf7228a
...@@ -76,13 +76,17 @@ def parseCli(): ...@@ -76,13 +76,17 @@ def parseCli():
""" """
Parser definition for the command line interface Parser definition for the command line interface
""" """
usage = """ %(prog)s <filepath> -s [sections] -opts [options] """ usage = """ %(prog)s <filepath> <xml-path> -s [sections] -opts [options] """
parser = ArgumentParser(prog="test_conso", usage=usage) parser = ArgumentParser(prog="kvm-monitor.py", usage=usage)
parser.add_argument("filepath", parser.add_argument("filepath",
help="Path to the configuration file with the informations" 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, parser.add_argument("-s","--sections", nargs='+', required=True,
help="Sections in which the informations can be found." + help="Sections in which the informations can be found." +
"Each section should be separated by a space." "Each section should be separated by a space."
...@@ -104,6 +108,7 @@ def runMonitor(): ...@@ -104,6 +108,7 @@ def runMonitor():
args = parser.parse_args() args = parser.parse_args()
info_dict = MonitorConfig(args.filepath, info_dict = MonitorConfig(args.filepath,
args.xml_path,
args.sections, args.sections,
args.options, args.options,
).getConfig() ).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