From: Ondrej Lichtner <olichtne(a)redhat.com>
The --pools option now also accepts a directory path instead of just
pool names. Pool names still have the priority now so if you want to
specify a directory the path you specify can't be the same as the name
of some pool. An easy way to do this is to just include the final '/'
character.
Expands on issue #157
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst-ctl | 3 ++-
lnst/Controller/NetTestController.py | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/lnst-ctl b/lnst-ctl
index c991247..bf97c1f 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -52,7 +52,8 @@ def usage(retval=0):
print " -p, --packet-capture capture and log all ongoing " \
"network communication during the test"
print " --pools=NAME[,...] restricts which pools to use "\
- "for matching"
+ "for matching, value can be a comma separated list of values or"
+ print " --pools=PATH a single path to a pool
directory"
print " -r, --reduce-sync reduces resource synchronization
"\
"for python tasks, see documentation"
print " -s, --xslt-url=URL URL to a XSLT document that will
"\
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 2afa992..fd029cb 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -83,6 +83,8 @@ class NetTestController:
for pool_name in restrict_pools:
if pool_name in conf_pools:
pools[pool_name] = conf_pools[pool_name]
+ elif len(restrict_pools) == 1 and os.path.isdir(pool_name):
+ pools = {"cmd_line_pool": pool_name}
else:
raise NetTestError("Pool %s does not exist!" % pool_name)
else:
--
2.6.4
Show replies by date