commit a541f8ef4617cfa1bfb095cf6e031c9e838d97f7
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Fri Sep 6 12:58:37 2013 +0200
lnst-ctl: Removing the 'dump' action
Due to the refactoring of the NetTestController class that was done
recently, the 'dump' action is no longer relevant (as the resources it
uses no longer exist in a proper form).
This patch removes the action altogether.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
install/lnst-ctl.1.in | 14 +++++++-------
lnst-ctl | 6 ++----
lnst/Controller/NetTestController.py | 8 --------
3 files changed, 9 insertions(+), 19 deletions(-)
---
diff --git a/install/lnst-ctl.1.in b/install/lnst-ctl.1.in
index fb5add9..d29ebab 100644
--- a/install/lnst-ctl.1.in
+++ b/install/lnst-ctl.1.in
@@ -58,10 +58,10 @@ available at LNST wiki (link is listed on
bellow).
.I ACTION
-can be one from
+can be one of
.BR "run",
.BR "config_only" ", and"
-.BR "dump".
+.BR "match_setup".
When it is set to
.BR "run",
@@ -79,12 +79,12 @@ the configuration specified in a recipe file.
At last, when the
.I ACTION
-chosen is
-.BR "dump",
-the network will be configured as specified in the recipe.
+is set to
+.BR "match_setup",
.B lnst-ctl
-will then dump contents of its internal data structures to the standard
-output. This feature can be used for debugging recipes or network setups.
+will only try to match the configuration in the recipe with its local
+pools and print the resulting match, in case it was successful or an
+appropriate error message, in case it was not.
.SH CONFIGURATION
.B lnst-ctl
will look for configuration in the following locations:
diff --git a/lnst-ctl b/lnst-ctl
index 43770b2..46969c6 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -29,7 +29,7 @@ def usage():
"""
print "Usage: %s [OPTION...] [RECIPE...] ACTION" % sys.argv[0]
print ""
- print "ACTION = [run | dump | config_only | match_setup]"
+ print "ACTION = [run | config_only | match_setup]"
print ""
print "OPTIONS"
print " -d, --debug emit debugging messages"
@@ -52,8 +52,6 @@ def process_recipe(action, file_path, cleanup, res_serializer,
pool_checks=pool_checks)
if action == "run":
return nettestctl.run_recipe(packet_capture)
- elif action == "dump":
- return nettestctl.dump_recipe()
elif action == "config_only":
return nettestctl.config_only_recipe()
elif action == "match_setup":
@@ -146,7 +144,7 @@ def main():
usage()
action = args.pop()
- if not action in ['run', 'dump', 'config_only',
'match_setup']:
+ if not action in ['run', 'config_only', 'match_setup']:
logging.error("Action '%s' not recognised" % action)
usage()
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index 30f5599..5404284 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -20,7 +20,6 @@ import tempfile
import imp
from time import sleep
from xmlrpclib import Binary
-from pprint import pprint, pformat
from lnst.Common.XmlRpc import ServerProxy, ServerException
from lnst.Common.NetUtils import MacPool
from lnst.Common.VirtUtils import VirtNetCtl, VirtDomainCtl, BridgeCtl
@@ -411,13 +410,6 @@ class NetTestController:
for bridge in self._network_bridges.itervalues():
bridge.cleanup()
- # TODO: This should go away.
- def dump_recipe(self):
- self._prepare_network()
- pprint(self._recipe)
- self._cleanup_slaves()
- return {"passed": True}
-
def match_setup(self):
mreq = self._get_machine_requirements()
self._prepare_provisioning(mreq)
Show replies by date