[lnst] NetTestSlave: redo mapping of devices that change netns
by Jiří Pírko
commit b3e6b4a754be30844054d8a949c05b425a92f1b1
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Mon Sep 29 16:08:25 2014 +0200
NetTestSlave: redo mapping of devices that change netns
This patch adds a new slave method "unmap_if" that removes the mapping
of the specified interface id.
I also changed how interface mapping and network namespaces work -
previously the mapping was copied from the main process when the
namespace was created, now the mapping gets cleared and each interface
is mapped separately when it's moved to its target netns and unmapped
when it's returning.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Slave/InterfaceManager.py | 3 +++
lnst/Slave/NetTestSlave.py | 27 ++++++++++++---------------
2 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/lnst/Slave/InterfaceManager.py b/lnst/Slave/InterfaceManager.py
index 5353eb8..fb191b0 100644
--- a/lnst/Slave/InterfaceManager.py
+++ b/lnst/Slave/InterfaceManager.py
@@ -47,6 +47,9 @@ class InterfaceManager(object):
self._id_mapping[if_id] = if_index
return
+ def unmap_if(self, if_id):
+ del self._id_mapping[if_id]
+
def clear_if_mapping(self):
self._id_mapping = {}
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index ff29e9e..eeb0337 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -119,6 +119,10 @@ class SlaveMethods:
return devices
+ def unmap_if(self, if_id):
+ self._if_manager.unmap_if(if_id)
+ return True
+
def get_devices(self):
self._if_manager.rescan_devices()
devices = self._if_manager.get_devices()
@@ -191,13 +195,6 @@ class SlaveMethods:
hwaddr = dev1.get_hwaddr()
self.set_if_netns(if_id1, config1["netns"])
- msg = {"type": "command", "method_name": "map_if_by_hwaddr",
- "args": [if_id1, hwaddr]}
- self._server_handler.send_data_to_netns(config1["netns"], msg)
- result = self._slave_server.wait_for_result(config1["netns"])
- if len(result["result"]) != 1:
- raise Exception("Mapping failed.")
-
msg = {"type": "command", "method_name": "configure_interface",
"args": [if_id1, config1]}
self._server_handler.send_data_to_netns(config1["netns"], msg)
@@ -210,13 +207,6 @@ class SlaveMethods:
hwaddr = dev2.get_hwaddr()
self.set_if_netns(if_id2, config2["netns"])
- msg = {"type": "command", "method_name": "map_if_by_hwaddr",
- "args": [if_id2, hwaddr]}
- self._server_handler.send_data_to_netns(config2["netns"], msg)
- result = self._slave_server.wait_for_result(config2["netns"])
- if len(result["result"]) != 1:
- raise Exception("Mapping failed.")
-
msg = {"type": "command", "method_name": "configure_interface",
"args": [if_id2, config2]}
self._server_handler.send_data_to_netns(config2["netns"], msg)
@@ -544,6 +534,7 @@ class SlaveMethods:
self._server_handler.clear_netns_connections()
self._if_manager.reconnect_netlink()
+ self._if_manager.clear_if_mapping()
self._server_handler.add_connection('netlink',
self._if_manager.get_nl_socket())
@@ -581,9 +572,14 @@ class SlaveMethods:
device = self._if_manager.get_mapped_device(if_id)
dev_name = device.get_name()
device.set_netns(netns)
+ hwaddr = device.get_hwaddr()
exec_cmd("ip link set %s netns %d" % (dev_name, netns_pid))
- return True
+ msg = {"type": "command", "method_name": "map_if_by_hwaddr",
+ "args": [if_id, hwaddr]}
+ self._server_handler.send_data_to_netns(netns, msg)
+ result = self._slave_server.wait_for_result(netns)
+ return result
def return_if_netns(self, if_id):
device = self._if_manager.get_mapped_device(if_id)
@@ -591,6 +587,7 @@ class SlaveMethods:
dev_name = device.get_name()
ppid = os.getppid()
exec_cmd("ip link set %s netns %d" % (dev_name, ppid))
+ self._if_manager.unmap_if(if_id)
return True
else:
netns = device.get_netns()
9 years, 6 months
[lnst] lnst-ctl: fix description of -s option
by Jiří Pírko
commit bcff4da267626f962fde23b87519bca66ba123e5
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Mon Sep 29 16:07:50 2014 +0200
lnst-ctl: fix description of -s option
The description of the -s option stayed wrong after I changed what it
meant. This patch fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst-ctl | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/lnst-ctl b/lnst-ctl
index 77b8ec4..0f1f46e 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -49,8 +49,9 @@ def usage(retval=0):
"network communication during the test"
print " -r, --reduce-sync reduces resource synchronization "\
"for python tasks, see documentation"
- print " -s, --xslt-url=URL URL to a XSLT document that the "\
- "result xml will reference, only usefull when -x is used as well"
+ print " -s, --xslt-url=URL URL to a XSLT document that will "\
+ "be used when transforming the xml result file, only useful "\
+ "when -t is used as well"
print " -t, --html=FILE generate a formatted result html"
print " -x, --result=FILE file to write xml_result"
sys.exit(retval)
9 years, 6 months
[PATCH 1/4] NetTestSlave: redo mapping of devices that change netns
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
This patch adds a new slave method "unmap_if" that removes the mapping
of the specified interface id.
I also changed how interface mapping and network namespaces work -
previously the mapping was copied from the main process when the
namespace was created, now the mapping gets cleared and each interface
is mapped separately when it's moved to its target netns and unmapped
when it's returning.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/InterfaceManager.py | 3 +++
lnst/Slave/NetTestSlave.py | 27 ++++++++++++---------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/lnst/Slave/InterfaceManager.py b/lnst/Slave/InterfaceManager.py
index 5353eb8..fb191b0 100644
--- a/lnst/Slave/InterfaceManager.py
+++ b/lnst/Slave/InterfaceManager.py
@@ -47,6 +47,9 @@ class InterfaceManager(object):
self._id_mapping[if_id] = if_index
return
+ def unmap_if(self, if_id):
+ del self._id_mapping[if_id]
+
def clear_if_mapping(self):
self._id_mapping = {}
diff --git a/lnst/Slave/NetTestSlave.py b/lnst/Slave/NetTestSlave.py
index ff29e9e..eeb0337 100644
--- a/lnst/Slave/NetTestSlave.py
+++ b/lnst/Slave/NetTestSlave.py
@@ -119,6 +119,10 @@ class SlaveMethods:
return devices
+ def unmap_if(self, if_id):
+ self._if_manager.unmap_if(if_id)
+ return True
+
def get_devices(self):
self._if_manager.rescan_devices()
devices = self._if_manager.get_devices()
@@ -191,13 +195,6 @@ class SlaveMethods:
hwaddr = dev1.get_hwaddr()
self.set_if_netns(if_id1, config1["netns"])
- msg = {"type": "command", "method_name": "map_if_by_hwaddr",
- "args": [if_id1, hwaddr]}
- self._server_handler.send_data_to_netns(config1["netns"], msg)
- result = self._slave_server.wait_for_result(config1["netns"])
- if len(result["result"]) != 1:
- raise Exception("Mapping failed.")
-
msg = {"type": "command", "method_name": "configure_interface",
"args": [if_id1, config1]}
self._server_handler.send_data_to_netns(config1["netns"], msg)
@@ -210,13 +207,6 @@ class SlaveMethods:
hwaddr = dev2.get_hwaddr()
self.set_if_netns(if_id2, config2["netns"])
- msg = {"type": "command", "method_name": "map_if_by_hwaddr",
- "args": [if_id2, hwaddr]}
- self._server_handler.send_data_to_netns(config2["netns"], msg)
- result = self._slave_server.wait_for_result(config2["netns"])
- if len(result["result"]) != 1:
- raise Exception("Mapping failed.")
-
msg = {"type": "command", "method_name": "configure_interface",
"args": [if_id2, config2]}
self._server_handler.send_data_to_netns(config2["netns"], msg)
@@ -544,6 +534,7 @@ class SlaveMethods:
self._server_handler.clear_netns_connections()
self._if_manager.reconnect_netlink()
+ self._if_manager.clear_if_mapping()
self._server_handler.add_connection('netlink',
self._if_manager.get_nl_socket())
@@ -581,9 +572,14 @@ class SlaveMethods:
device = self._if_manager.get_mapped_device(if_id)
dev_name = device.get_name()
device.set_netns(netns)
+ hwaddr = device.get_hwaddr()
exec_cmd("ip link set %s netns %d" % (dev_name, netns_pid))
- return True
+ msg = {"type": "command", "method_name": "map_if_by_hwaddr",
+ "args": [if_id, hwaddr]}
+ self._server_handler.send_data_to_netns(netns, msg)
+ result = self._slave_server.wait_for_result(netns)
+ return result
def return_if_netns(self, if_id):
device = self._if_manager.get_mapped_device(if_id)
@@ -591,6 +587,7 @@ class SlaveMethods:
dev_name = device.get_name()
ppid = os.getppid()
exec_cmd("ip link set %s netns %d" % (dev_name, ppid))
+ self._if_manager.unmap_if(if_id)
return True
else:
netns = device.get_netns()
--
1.9.3
9 years, 6 months
[PATCH] lnst-ctl: fix description of -s option
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
The description of the -s option stayed wrong after I changed what it
meant. This patch fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst-ctl | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lnst-ctl b/lnst-ctl
index 77b8ec4..cde604e 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -49,8 +49,9 @@ def usage(retval=0):
"network communication during the test"
print " -r, --reduce-sync reduces resource synchronization "\
"for python tasks, see documentation"
- print " -s, --xslt-url=URL URL to a XSLT document that the "\
- "result xml will reference, only usefull when -x is used as well"
+ print " -s, --xslt-url=URL URL to a XSLT document that will "\
+ "be used when transforming the xml result file, only usefull "\
+ "when -t is used as well"
print " -t, --html=FILE generate a formatted result html"
print " -x, --result=FILE file to write xml_result"
sys.exit(retval)
--
1.9.3
9 years, 6 months
[lnst] lnst-ctl: call get_recipe_result from single point and remove unused summary[]
by Jiří Pírko
commit 50e424187a6a2a25a75ae7bae6c65dce2c639d75
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Mon Sep 29 14:07:24 2014 +0200
lnst-ctl: call get_recipe_result from single point and remove unused summary[]
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst-ctl | 32 +++++++++++++-------------------
1 files changed, 13 insertions(+), 19 deletions(-)
---
diff --git a/lnst-ctl b/lnst-ctl
index b4912c0..77b8ec4 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -110,7 +110,7 @@ def get_recipe_result(action, file_path, log_ctl, res_serializer,
if not res["passed"] and retval < RETVAL_FAIL:
retval = RETVAL_FAIL
- return (file_path, res, retval)
+ return retval
def recipe_head_log_entry(filename):
head_str = "\nProcessing recipe file \"%s\"\n" % filename
@@ -237,13 +237,11 @@ def main():
NetTestController.remove_saved_machine_config()
return 0
- summary = []
-
- retval = RETVAL_PASS
- res_serializer = NetTestResultSerializer()
if recipes == []:
logging.error("No recipe specified!")
usage(RETVAL_ERR)
+
+ recipe_files = []
for recipe_path in recipes:
if os.path.isdir(recipe_path):
all_files = []
@@ -255,21 +253,17 @@ def main():
for f in all_files:
recipe_file = os.path.join(recipe_path, f)
if re.match(r'^.*\.xml$', recipe_file):
- fp, res, rv = get_recipe_result(action, recipe_file,
- log_ctl, res_serializer,
- pool_checks, packet_capture,
- defined_aliases,
- overriden_aliases,
- reduce_sync)
+ recipe_files.append(recipe_file)
else:
- fp, res, rv = get_recipe_result(action, recipe_path,
- log_ctl, res_serializer,
- pool_checks, packet_capture,
- defined_aliases,
- overriden_aliases,
- reduce_sync)
-
- summary.append((fp, res))
+ recipe_files.append(recipe_path)
+
+ retval = RETVAL_PASS
+ res_serializer = NetTestResultSerializer()
+ for recipe_file in recipe_files:
+ rv = get_recipe_result(action, recipe_file, log_ctl, res_serializer,
+ pool_checks, packet_capture,
+ defined_aliases, overriden_aliases,
+ reduce_sync)
if rv > retval:
retval = rv
9 years, 6 months
[lnst] lnst-ctl: move NetTestController contruction into get_recipe_result
by Jiří Pírko
commit fe4d49a78a553aedc6f795416c4d2e8ec778296c
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Mon Sep 29 14:07:23 2014 +0200
lnst-ctl: move NetTestController contruction into get_recipe_result
and avoid unnecessary long arg lines
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst-ctl | 24 +++++++++---------------
1 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/lnst-ctl b/lnst-ctl
index 0ee16f1..b4912c0 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -69,17 +69,7 @@ def store_alias(alias_def, aliases_dict):
aliases_dict[name] = value
-def process_recipe(action, file_path, log_ctl, res_serializer,
- pool_checks, packet_capture,
- defined_aliases, overriden_aliases,
- reduce_sync):
- nettestctl = NetTestController(file_path, log_ctl,
- res_serializer=res_serializer,
- pool_checks=pool_checks,
- packet_capture=packet_capture,
- defined_aliases=defined_aliases,
- overriden_aliases=overriden_aliases,
- reduce_sync=reduce_sync)
+def exec_action(action, nettestctl):
if action == "run":
return nettestctl.run_recipe()
elif action == "config_only":
@@ -97,12 +87,16 @@ def get_recipe_result(action, file_path, log_ctl, res_serializer,
retval = RETVAL_PASS
+ nettestctl = NetTestController(file_path, log_ctl,
+ res_serializer=res_serializer,
+ pool_checks=pool_checks,
+ packet_capture=packet_capture,
+ defined_aliases=defined_aliases,
+ overriden_aliases=overriden_aliases,
+ reduce_sync=reduce_sync)
res = {}
try:
- res = process_recipe(action, file_path, log_ctl, res_serializer,
- pool_checks, packet_capture,
- defined_aliases, overriden_aliases,
- reduce_sync):
+ res = exec_action(action, nettestctl)
except Exception as err:
log_exc_traceback()
logging.error(err)
9 years, 6 months
[lnst] NetTestController: make "packet_capture" a constructor parameter
by Jiří Pírko
commit f1f478b8d9f3014ef39aae19302587fa9f25c83e
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Mon Sep 29 14:07:22 2014 +0200
NetTestController: make "packet_capture" a constructor parameter
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst-ctl | 3 ++-
lnst/Controller/NetTestController.py | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/lnst-ctl b/lnst-ctl
index 71d5522..0ee16f1 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -76,11 +76,12 @@ def process_recipe(action, file_path, log_ctl, res_serializer,
nettestctl = NetTestController(file_path, log_ctl,
res_serializer=res_serializer,
pool_checks=pool_checks,
+ packet_capture=packet_capture,
defined_aliases=defined_aliases,
overriden_aliases=overriden_aliases,
reduce_sync=reduce_sync)
if action == "run":
- return nettestctl.run_recipe(packet_capture)
+ return nettestctl.run_recipe()
elif action == "config_only":
return nettestctl.config_only_recipe()
elif action == "match_setup":
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 0848a22..da7df41 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -51,6 +51,7 @@ def ignore_event(**kwarg):
class NetTestController:
def __init__(self, recipe_path, log_ctl,
res_serializer=None, pool_checks=True,
+ packet_capture=False,
defined_aliases=None, overriden_aliases=None,
reduce_sync=False):
self._res_serializer = res_serializer
@@ -58,6 +59,7 @@ class NetTestController:
self._log_ctl = log_ctl
self._recipe_path = recipe_path
self._msg_dispatcher = MessageDispatcher(log_ctl)
+ self._packet_capture = packet_capture
self._reduce_sync = reduce_sync
self._parser = RecipeParser(recipe_path)
@@ -593,7 +595,7 @@ class NetTestController:
self._cleanup_slaves(deconfigure=False)
return {"passed": True}
- def run_recipe(self, packet_capture=False):
+ def run_recipe(self):
try:
self._prepare_provisioning()
self._prepare_tasks()
@@ -604,7 +606,7 @@ class NetTestController:
self._cleanup_slaves()
raise
- if packet_capture:
+ if self._packet_capture:
self._start_packet_capture()
err = None
@@ -614,7 +616,7 @@ class NetTestController:
logging.error("Recipe execution terminated by unexpected exception")
raise
finally:
- if packet_capture:
+ if self._packet_capture:
self._stop_packet_capture()
self._gather_capture_files()
self._cleanup_slaves()
9 years, 6 months
[lnst] lnst-ctl: remove unneed initialization of recipe_path variable
by Jiří Pírko
commit 66ae0c369249ab3548bddcee9628618783acc585
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Mon Sep 29 14:07:21 2014 +0200
lnst-ctl: remove unneed initialization of recipe_path variable
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst-ctl | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/lnst-ctl b/lnst-ctl
index 1a119b2..71d5522 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -172,7 +172,6 @@ def main():
f.write(lnst_config.dump_config())
debug = 0
- recipe_path = None
result_path = None
html_result_path = None
xslt_url = None
9 years, 6 months
[lnst] lnst-ctl: unite get_recipe_result and process_recipe param order with NetTestController constructor
by Jiří Pírko
commit 62513f7f3bb9bf2c08f56e627d7b7dc83d0f85bb
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Mon Sep 29 14:07:20 2014 +0200
lnst-ctl: unite get_recipe_result and process_recipe param order with NetTestController constructor
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst-ctl | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/lnst-ctl b/lnst-ctl
index fc8349d..1a119b2 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -69,9 +69,10 @@ def store_alias(alias_def, aliases_dict):
aliases_dict[name] = value
-def process_recipe(action, file_path, res_serializer,
- packet_capture, log_ctl, pool_checks,
- defined_aliases, overriden_aliases, reduce_sync):
+def process_recipe(action, file_path, log_ctl, res_serializer,
+ pool_checks, packet_capture,
+ defined_aliases, overriden_aliases,
+ reduce_sync):
nettestctl = NetTestController(file_path, log_ctl,
res_serializer=res_serializer,
pool_checks=pool_checks,
@@ -85,8 +86,9 @@ def process_recipe(action, file_path, res_serializer,
elif action == "match_setup":
return nettestctl.match_setup()
-def get_recipe_result(args, file_path, res_serializer, packet_capture, log_ctl,
- pool_checks, defined_aliases, overriden_aliases,
+def get_recipe_result(action, file_path, log_ctl, res_serializer,
+ pool_checks, packet_capture,
+ defined_aliases, overriden_aliases,
reduce_sync):
res_serializer.add_recipe(file_path)
log_ctl.set_recipe(file_path)
@@ -96,9 +98,10 @@ def get_recipe_result(args, file_path, res_serializer, packet_capture, log_ctl,
res = {}
try:
- res = process_recipe(args, file_path, res_serializer,
- packet_capture, log_ctl, pool_checks,
- defined_aliases, overriden_aliases, reduce_sync)
+ res = process_recipe(action, file_path, log_ctl, res_serializer,
+ pool_checks, packet_capture,
+ defined_aliases, overriden_aliases,
+ reduce_sync):
except Exception as err:
log_exc_traceback()
logging.error(err)
@@ -259,18 +262,17 @@ def main():
recipe_file = os.path.join(recipe_path, f)
if re.match(r'^.*\.xml$', recipe_file):
fp, res, rv = get_recipe_result(action, recipe_file,
- res_serializer,
- packet_capture,
- log_ctl, pool_checks,
+ log_ctl, res_serializer,
+ pool_checks, packet_capture,
defined_aliases,
overriden_aliases,
reduce_sync)
else:
fp, res, rv = get_recipe_result(action, recipe_path,
- res_serializer,
- packet_capture,
- log_ctl, pool_checks,
- defined_aliases, overriden_aliases,
+ log_ctl, res_serializer,
+ pool_checks, packet_capture,
+ defined_aliases,
+ overriden_aliases,
reduce_sync)
summary.append((fp, res))
9 years, 6 months
[lnst] lnst-ctl: sort help message and getopt input data and parsing
by Jiří Pírko
commit 80c7235c37818ff7977c96369cbbec63415eb079
Author: Jiri Pirko <jiri(a)resnulli.us>
Date: Mon Sep 29 14:07:19 2014 +0200
lnst-ctl: sort help message and getopt input data and parsing
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst-ctl | 30 ++++++++++++++++++++----------
1 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/lnst-ctl b/lnst-ctl
index 282bfe3..fc8349d 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -36,9 +36,9 @@ def usage(retval=0):
print "ACTION = [ run | config_only | deconfigure | match_setup ]"
print ""
print "OPTIONS"
- print " -a, --define-alias name=value define top-level alias"
print " -A, --override-alias name=value define top-level alias that " \
"will override any other definitions in the recipe"
+ print " -a, --define-alias name=value define top-level alias"
print " -c, --config=FILE load additional config file"
print " -d, --debug emit debugging messages"
print " -h, --help print this message"
@@ -47,12 +47,12 @@ def usage(retval=0):
"machines in the pool"
print " -p, --packet-capture capture and log all ongoing " \
"network communication during the test"
- print " -x, --result=FILE file to write xml_result"
- print " -t, --html=FILE generate a formatted result html"
- print " -s, --xslt-url=URL URL to a XSLT document that the "\
- "result xml will reference, only usefull when -x is used as well"
print " -r, --reduce-sync reduces resource synchronization "\
"for python tasks, see documentation"
+ print " -s, --xslt-url=URL URL to a XSLT document that the "\
+ "result xml will reference, only usefull when -x is used as well"
+ print " -t, --html=FILE generate a formatted result html"
+ print " -x, --result=FILE file to write xml_result"
sys.exit(retval)
def store_alias(alias_def, aliases_dict):
@@ -127,11 +127,21 @@ def main():
try:
opts, args = getopt.getopt(
sys.argv[1:],
- "dhrc:x:t:s:poma:A:",
- ["debug", "help", "config", "result=",
- "packet-capture", "disable-pool-checks", "no-colours",
- "define_alias", "override_alias", "reduce-sync", "xslt-url",
- "html"]
+ "A:a:c:dhmoprs:t:x:",
+ [
+ "override_alias",
+ "define_alias",
+ "config",
+ "debug",
+ "help",
+ "no-colours",
+ "disable-pool-checks",
+ "packet-capture",
+ "reduce-sync",
+ "xslt-url",
+ "html"
+ "result=",
+ ]
)
except getopt.GetoptError as err:
print str(err)
9 years, 6 months