[PATCH v2 1/2] Common: Add print_log_dir method
by Jiri Prochazka
This method prints location of logs in logging INFO message
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Common/Logs.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lnst/Common/Logs.py b/lnst/Common/Logs.py
index 23aaf05..80bedf3 100644
--- a/lnst/Common/Logs.py
+++ b/lnst/Common/Logs.py
@@ -249,3 +249,6 @@ class LoggingCtl:
self._origin_name = name
if self.transmit_handler != None:
self.transmit_handler.set_origin_name(name)
+
+ def print_log_dir(self):
+ logging.info("Logs are stored in '%s'" % self.log_folder)
--
2.4.3
8 years, 6 months
[PATCH 1/2] Common: Add print_log_dir method
by Jiri Prochazka
This method prints location of logs in logging INFO message
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Common/Logs.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lnst/Common/Logs.py b/lnst/Common/Logs.py
index 23aaf05..80bedf3 100644
--- a/lnst/Common/Logs.py
+++ b/lnst/Common/Logs.py
@@ -249,3 +249,6 @@ class LoggingCtl:
self._origin_name = name
if self.transmit_handler != None:
self.transmit_handler.set_origin_name(name)
+
+ def print_log_dir(self):
+ logging.info("Logs are stored in '%s'" % self.log_folder)
--
2.4.3
8 years, 6 months
[PATCH v3 01/15] RecipePath: rename to Path
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
Renaming the module and the contained methods/classes to just Path since
it's implemented in a general way and can be used in othe parts of LNST,
not directly related to Recipes.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Common/Path.py | 155 +++++++++++++++++++++++++++++++++++
lnst/Common/RecipePath.py | 155 -----------------------------------
lnst/Controller/NetTestController.py | 6 +-
lnst/Controller/RecipeParser.py | 4 +-
4 files changed, 160 insertions(+), 160 deletions(-)
create mode 100644 lnst/Common/Path.py
delete mode 100644 lnst/Common/RecipePath.py
diff --git a/lnst/Common/Path.py b/lnst/Common/Path.py
new file mode 100644
index 0000000..fe7f709
--- /dev/null
+++ b/lnst/Common/Path.py
@@ -0,0 +1,155 @@
+"""
+This module contains code code for paths and references.
+
+Copyright 2012 Red Hat, Inc.
+Licensed under the GNU General Public License, version 2 as
+published by the Free Software Foundation; see COPYING for details.
+"""
+
+__author__ = """
+jtluka(a)redhat.com (Jan Tluka)
+"""
+
+import os
+from urlparse import urljoin
+from urllib2 import urlopen, HTTPError
+from tempfile import NamedTemporaryFile
+
+def get_path_class(root, path):
+ if root == None:
+ if path.startswith('http'):
+ return HttpPath(root, path)
+ else:
+ if os.access(path, os.R_OK):
+ return FilePath(None, os.path.realpath(path))
+ else:
+ raise Exception("Path does not exist \"%s\"!" % path)
+
+ if root.startswith('http'):
+ return HttpPath(root, path)
+ elif os.access(root, os.R_OK):
+ return FilePath(root, path)
+ else:
+ raise Exception("Could not recognize path type \"%s\"" % path)
+
+class Path:
+ def __init__(self, root, path):
+ self._path_class = get_path_class(root, path)
+
+ def get_root(self):
+ return self._path_class.get_root()
+
+ def abs_path(self):
+ return self._path_class.abs_path()
+
+ def to_str(self):
+ return self._path_class.to_str()
+
+ def exists(self):
+ return self._path_class.exists()
+
+ def resolve(self):
+ return self._path_class.resolve()
+
+class PathGeneric:
+ def __init__(self, root, path):
+ self._root = root
+ self._path = path
+ self._data = None
+
+ def get_root(self):
+ pass
+
+ def abs_path(self):
+ pass
+
+ def to_str(self):
+ pass
+
+ def exists(self):
+ pass
+
+ def resolve(self):
+ pass
+
+class FilePath(PathGeneric):
+ def _load_file(self):
+ f = open(self.abs_path(),'r')
+ self._data = f.read()
+ f.close()
+
+ def to_str(self):
+ if not self._data:
+ self._load_file()
+
+ return self._data
+
+ def _append_path(self, path):
+ basedir = os.path.dirname(self._path)
+ return os.path.join(basedir, path)
+
+ def abs_path(self):
+ if self._root:
+ return os.path.normpath(os.path.join(self._root,
+ os.path.expanduser(self._path)))
+ else:
+ return os.path.normpath(os.path.expanduser(self._path))
+
+ def get_root(self):
+ return os.path.dirname(self.abs_path())
+
+ def exists(self):
+ return os.path.isfile(self.abs_path())
+
+ def resolve(self):
+ return self.abs_path()
+
+class HttpPath(PathGeneric):
+ _file = None
+ def _get_url(self):
+ url = self.abs_path()
+
+ try:
+ f = urlopen(url)
+ self._data = f.read()
+ except IOError as err:
+ msg = "Unable to resolve path: %s (%s)" % (url, str(err))
+ raise Exception(msg)
+
+ f.close()
+
+ def to_str(self):
+ if not self._data:
+ self._get_url()
+
+ return self._data
+
+ def abs_path(self):
+ if self._root:
+ return urljoin(self._root + '/', self._path)
+ else:
+ return self._path
+
+ def get_root(self):
+ url = self.abs_path()
+ return url.rpartition('/')[0]
+
+ def exists(self):
+ url = self.abs_path()
+ try:
+ f = urlopen(url)
+ except HTTPError:
+ return False
+
+ f.close()
+ return True
+
+ def resolve(self):
+ if self._file:
+ return self._file.name
+
+ self._file = NamedTemporaryFile(delete=True)
+ self._file.write(self.to_str())
+ self._file.flush()
+
+ return self._file.name
diff --git a/lnst/Common/RecipePath.py b/lnst/Common/RecipePath.py
deleted file mode 100644
index 3199a1a..0000000
--- a/lnst/Common/RecipePath.py
+++ /dev/null
@@ -1,155 +0,0 @@
-"""
-This module contains code code for LNST recipe paths and references.
-
-Copyright 2012 Red Hat, Inc.
-Licensed under the GNU General Public License, version 2 as
-published by the Free Software Foundation; see COPYING for details.
-"""
-
-__author__ = """
-jtluka(a)redhat.com (Jan Tluka)
-"""
-
-import os
-from urlparse import urljoin
-from urllib2 import urlopen, HTTPError
-from tempfile import NamedTemporaryFile
-
-def get_recipepath_class(root, path):
- if root == None:
- if path.startswith('http'):
- return HttpRecipePath(root, path)
- else:
- if os.access(path, os.R_OK):
- return FileRecipePath(None, os.path.realpath(path))
- else:
- raise Exception("Recipe path does not exist \"%s\"!" % path)
-
- if root.startswith('http'):
- return HttpRecipePath(root, path)
- elif os.access(root, os.R_OK):
- return FileRecipePath(root, path)
- else:
- raise Exception("Could not recognize recipe path type \"%s\"" % path)
-
-class RecipePath:
- def __init__(self, root, path):
- self._recipepath_class = get_recipepath_class(root, path)
-
- def get_root(self):
- return self._recipepath_class.get_root()
-
- def abs_path(self):
- return self._recipepath_class.abs_path()
-
- def to_str(self):
- return self._recipepath_class.to_str()
-
- def exists(self):
- return self._recipepath_class.exists()
-
- def resolve(self):
- return self._recipepath_class.resolve()
-
-class RecipePathGeneric:
- def __init__(self, root, path):
- self._root = root
- self._path = path
- self._data = None
-
- def get_root(self):
- pass
-
- def abs_path(self):
- pass
-
- def to_str(self):
- pass
-
- def exists(self):
- pass
-
- def resolve(self):
- pass
-
-class FileRecipePath(RecipePathGeneric):
- def _load_file(self):
- f = open(self.abs_path(),'r')
- self._data = f.read()
- f.close()
-
- def to_str(self):
- if not self._data:
- self._load_file()
-
- return self._data
-
- def _append_path(self, path):
- basedir = os.path.dirname(self._path)
- return os.path.join(basedir, path)
-
- def abs_path(self):
- if self._root:
- return os.path.normpath(os.path.join(self._root,
- os.path.expanduser(self._path)))
- else:
- return os.path.normpath(os.path.expanduser(self._path))
-
- def get_root(self):
- return os.path.dirname(self.abs_path())
-
- def exists(self):
- return os.path.isfile(self.abs_path())
-
- def resolve(self):
- return self.abs_path()
-
-class HttpRecipePath(RecipePathGeneric):
- _file = None
- def _get_url(self):
- url = self.abs_path()
-
- try:
- f = urlopen(url)
- self._data = f.read()
- except IOError as err:
- msg = "Unable to resolve path: %s (%s)" % (url, str(err))
- raise Exception(msg)
-
- f.close()
-
- def to_str(self):
- if not self._data:
- self._get_url()
-
- return self._data
-
- def abs_path(self):
- if self._root:
- return urljoin(self._root + '/', self._path)
- else:
- return self._path
-
- def get_root(self):
- url = self.abs_path()
- return url.rpartition('/')[0]
-
- def exists(self):
- url = self.abs_path()
- try:
- f = urlopen(url)
- except HTTPError:
- return False
-
- f.close()
- return True
-
- def resolve(self):
- if self._file:
- return self._file.name
-
- self._file = NamedTemporaryFile(suffix='.py',delete=True)
- self._file.write(self.to_str())
- self._file.flush()
-
- return self._file.name
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index ec0db54..2208346 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -31,7 +31,7 @@ from lnst.Controller.Machine import StaticInterface
from lnst.Common.ConnectionHandler import send_data, recv_data
from lnst.Common.ConnectionHandler import ConnectionHandler
from lnst.Common.Config import lnst_config
-from lnst.Common.RecipePath import RecipePath
+from lnst.Common.Path import Path
from lnst.Common.Colours import decorate_with_preset
from lnst.Common.NetUtils import test_tcp_connection
import lnst.Controller.Task as Task
@@ -357,8 +357,8 @@ class NetTestController:
task["tools_dir"] = task_data["tools_dir"]
if "python" in task_data:
- root = RecipePath(None, self._recipe_path).get_root()
- path = RecipePath(root, task_data["python"])
+ root = Path(None, self._recipe_path).get_root()
+ path = Path(root, task_data["python"])
task["python"] = path
if not path.exists():
diff --git a/lnst/Controller/RecipeParser.py b/lnst/Controller/RecipeParser.py
index 8be52fb..318b231 100644
--- a/lnst/Controller/RecipeParser.py
+++ b/lnst/Controller/RecipeParser.py
@@ -11,7 +11,7 @@ rpazdera(a)redhat.com (Radek Pazdera)
"""
import os
-from lnst.Common.RecipePath import RecipePath
+from lnst.Common.Path import Path
from lnst.Controller.XmlParser import XmlParser
from lnst.Controller.XmlProcessing import XmlProcessingError, XmlData
from lnst.Controller.XmlProcessing import XmlCollection
@@ -21,7 +21,7 @@ class RecipeError(XmlProcessingError):
class RecipeParser(XmlParser):
def __init__(self, recipe_path):
- recipe_path = RecipePath(None, recipe_path).abs_path()
+ recipe_path = Path(None, recipe_path).abs_path()
super(RecipeParser, self).__init__("schema-recipe.rng", recipe_path)
def _process(self, lnst_recipe):
--
2.6.1
8 years, 6 months
[PATCH v2 00/14] PerfRepo-LNST integration patchset
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
Resending patchset with fixed patch 11/14 - caught exceptions will now be
reraised as PerfRepoTemplateError.
Ondrej Lichtner (14):
RecipePath: rename to Path
NetTestController: recipe path stored in absolute format
PerfRepo: only add not None tags that are stringable
PerfRepo: add parameter log to REST API methods
add PerfRepoMapping module
PerfRepo: disable requests logs
PerfRepoUtils: remove mapping helper functions
Utils: add Noop class
PerfRepo: modify log level for some messages
perfrepo-cli: fix report baseline addition
PerfRepoUtils: add template functions for netperf
NetTestController: fix spacing in log message
Task: refactor PerfRepo support for Python Tasks
regression-recipes: update LNST-PerfRepo integration
lnst/Common/Path.py | 155 +++++++
lnst/Common/RecipePath.py | 155 -------
lnst/Common/Utils.py | 6 +
lnst/Controller/NetTestController.py | 18 +-
lnst/Controller/PerfRepo.py | 119 +++---
lnst/Controller/PerfRepoMapping.py | 74 ++++
lnst/Controller/PerfRepoUtils.py | 51 ++-
lnst/Controller/RecipeParser.py | 4 +-
lnst/Controller/Task.py | 179 +++++++-
perfrepo | 4 +-
recipes/regression_tests/phase1/3_vlans.py | 235 ++++-------
.../regression_tests/phase1/3_vlans_over_bond.py | 236 ++++-------
recipes/regression_tests/phase1/bonding_test.py | 215 ++++------
.../phase1/virtual_bridge_2_vlans_over_bond.py | 213 +++-------
.../phase1/virtual_bridge_vlan_in_guest.py | 216 +++-------
.../phase1/virtual_bridge_vlan_in_host.py | 216 +++-------
.../regression_tests/phase2/3_vlans_over_team.py | 231 ++++-------
recipes/regression_tests/phase2/team_test.py | 451 +++++++--------------
...l_ovs_bridge_2_vlans_over_active_backup_bond.py | 214 +++-------
.../phase2/virtual_ovs_bridge_vlan_in_guest.py | 214 +++-------
.../phase2/virtual_ovs_bridge_vlan_in_host.py | 215 ++++------
21 files changed, 1365 insertions(+), 2056 deletions(-)
create mode 100644 lnst/Common/Path.py
delete mode 100644 lnst/Common/RecipePath.py
create mode 100644 lnst/Controller/PerfRepoMapping.py
--
2.6.1
8 years, 6 months
[PATCH 01/14] RecipePath: rename to Path
by Ondrej Lichtner
From: Ondrej Lichtner <olichtne(a)redhat.com>
Renaming the module and the contained methods/classes to just Path since
it's implemented in a general way and can be used in othe parts of LNST,
not directly related to Recipes.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Common/Path.py | 155 +++++++++++++++++++++++++++++++++++
lnst/Common/RecipePath.py | 155 -----------------------------------
lnst/Controller/NetTestController.py | 6 +-
lnst/Controller/RecipeParser.py | 4 +-
4 files changed, 160 insertions(+), 160 deletions(-)
create mode 100644 lnst/Common/Path.py
delete mode 100644 lnst/Common/RecipePath.py
diff --git a/lnst/Common/Path.py b/lnst/Common/Path.py
new file mode 100644
index 0000000..fe7f709
--- /dev/null
+++ b/lnst/Common/Path.py
@@ -0,0 +1,155 @@
+"""
+This module contains code code for paths and references.
+
+Copyright 2012 Red Hat, Inc.
+Licensed under the GNU General Public License, version 2 as
+published by the Free Software Foundation; see COPYING for details.
+"""
+
+__author__ = """
+jtluka(a)redhat.com (Jan Tluka)
+"""
+
+import os
+from urlparse import urljoin
+from urllib2 import urlopen, HTTPError
+from tempfile import NamedTemporaryFile
+
+def get_path_class(root, path):
+ if root == None:
+ if path.startswith('http'):
+ return HttpPath(root, path)
+ else:
+ if os.access(path, os.R_OK):
+ return FilePath(None, os.path.realpath(path))
+ else:
+ raise Exception("Path does not exist \"%s\"!" % path)
+
+ if root.startswith('http'):
+ return HttpPath(root, path)
+ elif os.access(root, os.R_OK):
+ return FilePath(root, path)
+ else:
+ raise Exception("Could not recognize path type \"%s\"" % path)
+
+class Path:
+ def __init__(self, root, path):
+ self._path_class = get_path_class(root, path)
+
+ def get_root(self):
+ return self._path_class.get_root()
+
+ def abs_path(self):
+ return self._path_class.abs_path()
+
+ def to_str(self):
+ return self._path_class.to_str()
+
+ def exists(self):
+ return self._path_class.exists()
+
+ def resolve(self):
+ return self._path_class.resolve()
+
+class PathGeneric:
+ def __init__(self, root, path):
+ self._root = root
+ self._path = path
+ self._data = None
+
+ def get_root(self):
+ pass
+
+ def abs_path(self):
+ pass
+
+ def to_str(self):
+ pass
+
+ def exists(self):
+ pass
+
+ def resolve(self):
+ pass
+
+class FilePath(PathGeneric):
+ def _load_file(self):
+ f = open(self.abs_path(),'r')
+ self._data = f.read()
+ f.close()
+
+ def to_str(self):
+ if not self._data:
+ self._load_file()
+
+ return self._data
+
+ def _append_path(self, path):
+ basedir = os.path.dirname(self._path)
+ return os.path.join(basedir, path)
+
+ def abs_path(self):
+ if self._root:
+ return os.path.normpath(os.path.join(self._root,
+ os.path.expanduser(self._path)))
+ else:
+ return os.path.normpath(os.path.expanduser(self._path))
+
+ def get_root(self):
+ return os.path.dirname(self.abs_path())
+
+ def exists(self):
+ return os.path.isfile(self.abs_path())
+
+ def resolve(self):
+ return self.abs_path()
+
+class HttpPath(PathGeneric):
+ _file = None
+ def _get_url(self):
+ url = self.abs_path()
+
+ try:
+ f = urlopen(url)
+ self._data = f.read()
+ except IOError as err:
+ msg = "Unable to resolve path: %s (%s)" % (url, str(err))
+ raise Exception(msg)
+
+ f.close()
+
+ def to_str(self):
+ if not self._data:
+ self._get_url()
+
+ return self._data
+
+ def abs_path(self):
+ if self._root:
+ return urljoin(self._root + '/', self._path)
+ else:
+ return self._path
+
+ def get_root(self):
+ url = self.abs_path()
+ return url.rpartition('/')[0]
+
+ def exists(self):
+ url = self.abs_path()
+ try:
+ f = urlopen(url)
+ except HTTPError:
+ return False
+
+ f.close()
+ return True
+
+ def resolve(self):
+ if self._file:
+ return self._file.name
+
+ self._file = NamedTemporaryFile(delete=True)
+ self._file.write(self.to_str())
+ self._file.flush()
+
+ return self._file.name
diff --git a/lnst/Common/RecipePath.py b/lnst/Common/RecipePath.py
deleted file mode 100644
index 3199a1a..0000000
--- a/lnst/Common/RecipePath.py
+++ /dev/null
@@ -1,155 +0,0 @@
-"""
-This module contains code code for LNST recipe paths and references.
-
-Copyright 2012 Red Hat, Inc.
-Licensed under the GNU General Public License, version 2 as
-published by the Free Software Foundation; see COPYING for details.
-"""
-
-__author__ = """
-jtluka(a)redhat.com (Jan Tluka)
-"""
-
-import os
-from urlparse import urljoin
-from urllib2 import urlopen, HTTPError
-from tempfile import NamedTemporaryFile
-
-def get_recipepath_class(root, path):
- if root == None:
- if path.startswith('http'):
- return HttpRecipePath(root, path)
- else:
- if os.access(path, os.R_OK):
- return FileRecipePath(None, os.path.realpath(path))
- else:
- raise Exception("Recipe path does not exist \"%s\"!" % path)
-
- if root.startswith('http'):
- return HttpRecipePath(root, path)
- elif os.access(root, os.R_OK):
- return FileRecipePath(root, path)
- else:
- raise Exception("Could not recognize recipe path type \"%s\"" % path)
-
-class RecipePath:
- def __init__(self, root, path):
- self._recipepath_class = get_recipepath_class(root, path)
-
- def get_root(self):
- return self._recipepath_class.get_root()
-
- def abs_path(self):
- return self._recipepath_class.abs_path()
-
- def to_str(self):
- return self._recipepath_class.to_str()
-
- def exists(self):
- return self._recipepath_class.exists()
-
- def resolve(self):
- return self._recipepath_class.resolve()
-
-class RecipePathGeneric:
- def __init__(self, root, path):
- self._root = root
- self._path = path
- self._data = None
-
- def get_root(self):
- pass
-
- def abs_path(self):
- pass
-
- def to_str(self):
- pass
-
- def exists(self):
- pass
-
- def resolve(self):
- pass
-
-class FileRecipePath(RecipePathGeneric):
- def _load_file(self):
- f = open(self.abs_path(),'r')
- self._data = f.read()
- f.close()
-
- def to_str(self):
- if not self._data:
- self._load_file()
-
- return self._data
-
- def _append_path(self, path):
- basedir = os.path.dirname(self._path)
- return os.path.join(basedir, path)
-
- def abs_path(self):
- if self._root:
- return os.path.normpath(os.path.join(self._root,
- os.path.expanduser(self._path)))
- else:
- return os.path.normpath(os.path.expanduser(self._path))
-
- def get_root(self):
- return os.path.dirname(self.abs_path())
-
- def exists(self):
- return os.path.isfile(self.abs_path())
-
- def resolve(self):
- return self.abs_path()
-
-class HttpRecipePath(RecipePathGeneric):
- _file = None
- def _get_url(self):
- url = self.abs_path()
-
- try:
- f = urlopen(url)
- self._data = f.read()
- except IOError as err:
- msg = "Unable to resolve path: %s (%s)" % (url, str(err))
- raise Exception(msg)
-
- f.close()
-
- def to_str(self):
- if not self._data:
- self._get_url()
-
- return self._data
-
- def abs_path(self):
- if self._root:
- return urljoin(self._root + '/', self._path)
- else:
- return self._path
-
- def get_root(self):
- url = self.abs_path()
- return url.rpartition('/')[0]
-
- def exists(self):
- url = self.abs_path()
- try:
- f = urlopen(url)
- except HTTPError:
- return False
-
- f.close()
- return True
-
- def resolve(self):
- if self._file:
- return self._file.name
-
- self._file = NamedTemporaryFile(suffix='.py',delete=True)
- self._file.write(self.to_str())
- self._file.flush()
-
- return self._file.name
diff --git a/lnst/Controller/NetTestController.py b/lnst/Controller/NetTestController.py
index ec0db54..2208346 100644
--- a/lnst/Controller/NetTestController.py
+++ b/lnst/Controller/NetTestController.py
@@ -31,7 +31,7 @@ from lnst.Controller.Machine import StaticInterface
from lnst.Common.ConnectionHandler import send_data, recv_data
from lnst.Common.ConnectionHandler import ConnectionHandler
from lnst.Common.Config import lnst_config
-from lnst.Common.RecipePath import RecipePath
+from lnst.Common.Path import Path
from lnst.Common.Colours import decorate_with_preset
from lnst.Common.NetUtils import test_tcp_connection
import lnst.Controller.Task as Task
@@ -357,8 +357,8 @@ class NetTestController:
task["tools_dir"] = task_data["tools_dir"]
if "python" in task_data:
- root = RecipePath(None, self._recipe_path).get_root()
- path = RecipePath(root, task_data["python"])
+ root = Path(None, self._recipe_path).get_root()
+ path = Path(root, task_data["python"])
task["python"] = path
if not path.exists():
diff --git a/lnst/Controller/RecipeParser.py b/lnst/Controller/RecipeParser.py
index 8be52fb..318b231 100644
--- a/lnst/Controller/RecipeParser.py
+++ b/lnst/Controller/RecipeParser.py
@@ -11,7 +11,7 @@ rpazdera(a)redhat.com (Radek Pazdera)
"""
import os
-from lnst.Common.RecipePath import RecipePath
+from lnst.Common.Path import Path
from lnst.Controller.XmlParser import XmlParser
from lnst.Controller.XmlProcessing import XmlProcessingError, XmlData
from lnst.Controller.XmlProcessing import XmlCollection
@@ -21,7 +21,7 @@ class RecipeError(XmlProcessingError):
class RecipeParser(XmlParser):
def __init__(self, recipe_path):
- recipe_path = RecipePath(None, recipe_path).abs_path()
+ recipe_path = Path(None, recipe_path).abs_path()
super(RecipeParser, self).__init__("schema-recipe.rng", recipe_path)
def _process(self, lnst_recipe):
--
2.6.0
8 years, 6 months
[PATCH] recipes: add nperf_max_runs alias instead of improper retrieval from confidence parameter
by Jan Tluka
This patch fixes the improper retrieval of maximal number of iterations
when running netperf with confidence level and interval set. The second number
of this parameter specifies the confidence interval in percents rather than
runs. If a user wants to specify maximal number of iterations he can do so by
specifying nperf_max_runs alias.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
recipes/regression_tests/phase1/3_vlans.py | 2 +-
recipes/regression_tests/phase1/3_vlans.xml | 1 +
recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml | 1 +
recipes/regression_tests/phase1/3_vlans_over_bond.py | 2 +-
recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml | 1 +
recipes/regression_tests/phase1/active_backup_bond.xml | 1 +
recipes/regression_tests/phase1/active_backup_double_bond.xml | 1 +
recipes/regression_tests/phase1/bonding_test.py | 2 +-
recipes/regression_tests/phase1/round_robin_bond.xml | 1 +
recipes/regression_tests/phase1/round_robin_double_bond.xml | 1 +
.../phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml | 1 +
recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py | 2 +-
recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py | 2 +-
recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml | 1 +
recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py | 2 +-
recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml | 1 +
recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml | 1 +
recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml | 1 +
recipes/regression_tests/phase2/3_vlans_over_team.py | 2 +-
recipes/regression_tests/phase2/active_backup_double_team.xml | 1 +
recipes/regression_tests/phase2/active_backup_team.xml | 1 +
.../phase2/active_backup_team_vs_active_backup_bond.xml | 1 +
.../regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml | 1 +
recipes/regression_tests/phase2/round_robin_double_team.xml | 1 +
recipes/regression_tests/phase2/round_robin_team.xml | 1 +
.../regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml | 1 +
.../regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml | 1 +
recipes/regression_tests/phase2/team_test.py | 2 +-
.../phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py | 2 +-
.../phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml | 1 +
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py | 2 +-
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml | 1 +
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py | 2 +-
recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml | 1 +
34 files changed, 34 insertions(+), 11 deletions(-)
diff --git a/recipes/regression_tests/phase1/3_vlans.py b/recipes/regression_tests/phase1/3_vlans.py
index 6e04f67..b3c3966 100644
--- a/recipes/regression_tests/phase1/3_vlans.py
+++ b/recipes/regression_tests/phase1/3_vlans.py
@@ -44,7 +44,7 @@ mtu = ctl.get_alias("mtu")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
m1_phy1 = m1.get_interface("eth1")
m1_phy1.set_mtu(mtu)
diff --git a/recipes/regression_tests/phase1/3_vlans.xml b/recipes/regression_tests/phase1/3_vlans.xml
index 86b82b6..18fc539 100644
--- a/recipes/regression_tests/phase1/3_vlans.xml
+++ b/recipes/regression_tests/phase1/3_vlans.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mapping_file" value="3_vlans.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
index aabf2c6..a412adc 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_active_backup_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mapping_file" value="3_vlans_over_active_backup_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase1/3_vlans_over_bond.py b/recipes/regression_tests/phase1/3_vlans_over_bond.py
index 95936d1..0fb6356 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/3_vlans_over_bond.py
@@ -44,7 +44,7 @@ mtu = ctl.get_alias("mtu")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
m1_bond = m1.get_interface("test_bond")
m1_bond.set_mtu(mtu)
diff --git a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
index fda2f1b..35786fb 100644
--- a/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
+++ b/recipes/regression_tests/phase1/3_vlans_over_round_robin_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mapping_file" value="3_vlans_over_round_robin_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase1/active_backup_bond.xml b/recipes/regression_tests/phase1/active_backup_bond.xml
index 08f8718..c9b3883 100644
--- a/recipes/regression_tests/phase1/active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/active_backup_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mapping_file" value="active_backup_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase1/active_backup_double_bond.xml b/recipes/regression_tests/phase1/active_backup_double_bond.xml
index 256ebfc..45258e9 100644
--- a/recipes/regression_tests/phase1/active_backup_double_bond.xml
+++ b/recipes/regression_tests/phase1/active_backup_double_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mapping_file" value="active_backup_double_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase1/bonding_test.py b/recipes/regression_tests/phase1/bonding_test.py
index a343b9e..2e2e041 100644
--- a/recipes/regression_tests/phase1/bonding_test.py
+++ b/recipes/regression_tests/phase1/bonding_test.py
@@ -43,7 +43,7 @@ mtu = ctl.get_alias("mtu")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
test_if1 = m1.get_interface("test_if")
test_if1.set_mtu(mtu)
diff --git a/recipes/regression_tests/phase1/round_robin_bond.xml b/recipes/regression_tests/phase1/round_robin_bond.xml
index cc055ec..9c2b716 100644
--- a/recipes/regression_tests/phase1/round_robin_bond.xml
+++ b/recipes/regression_tests/phase1/round_robin_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mapping_file" value="round_robin_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase1/round_robin_double_bond.xml b/recipes/regression_tests/phase1/round_robin_double_bond.xml
index 0f5a98b..896404c 100644
--- a/recipes/regression_tests/phase1/round_robin_double_bond.xml
+++ b/recipes/regression_tests/phase1/round_robin_double_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mapping_file" value="round_robin_double_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml
index a9646d8..04de618 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_active_backup_bond.xml
@@ -4,6 +4,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mtu" value="1500" />
<alias name="mapping_file" value="virtual_bridge_2_vlans_over_active_backup_bond.mapping" />
</define>
diff --git a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
index 8226fc4..d96eaec 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_2_vlans_over_bond.py
@@ -49,7 +49,7 @@ ipv = ctl.get_alias("ipv")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
mtu = ctl.get_alias("mtu")
enable_udp_perf = ctl.get_alias("enable_udp_perf")
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
index 0c7ffa4..daba9f0 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.py
@@ -43,7 +43,7 @@ ipv = ctl.get_alias("ipv")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
mtu = ctl.get_alias("mtu")
enable_udp_perf = ctl.get_alias("enable_udp_perf")
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml
index 63e23fe..7d36ba5 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_guest.xml
@@ -4,6 +4,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mtu" value="1500" />
<alias name="mapping_file" value="virtual_bridge_vlan_in_guest.mapping" />
</define>
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
index 509ea57..10d0696 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.py
@@ -43,7 +43,7 @@ ipv = ctl.get_alias("ipv")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
mtu = ctl.get_alias("mtu")
enable_udp_perf = ctl.get_alias("enable_udp_perf")
diff --git a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml
index 4f8f1e2..ae351b2 100644
--- a/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml
+++ b/recipes/regression_tests/phase1/virtual_bridge_vlan_in_host.xml
@@ -4,6 +4,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5"/>
<alias name="mtu" value="1500" />
<alias name="mapping_file" value="virtual_bridge_vlan_in_host.mapping" />
</define>
diff --git a/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml b/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
index 8937bef..2d2d6bf 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
+++ b/recipes/regression_tests/phase2/3_vlans_over_active_backup_team.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="3_vlans_over_active_backup_team.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml b/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
index cab3d7a..7bbf9a2 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
+++ b/recipes/regression_tests/phase2/3_vlans_over_round_robin_team.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="3_vlans_over_round_robin_team.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/3_vlans_over_team.py b/recipes/regression_tests/phase2/3_vlans_over_team.py
index 157da14..361f497 100644
--- a/recipes/regression_tests/phase2/3_vlans_over_team.py
+++ b/recipes/regression_tests/phase2/3_vlans_over_team.py
@@ -43,7 +43,7 @@ mtu = ctl.get_alias("mtu")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
m1_team = m1.get_interface("test_if")
m1_team.set_mtu(mtu)
diff --git a/recipes/regression_tests/phase2/active_backup_double_team.xml b/recipes/regression_tests/phase2/active_backup_double_team.xml
index a3f0549..34ed65e 100644
--- a/recipes/regression_tests/phase2/active_backup_double_team.xml
+++ b/recipes/regression_tests/phase2/active_backup_double_team.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="active_backup_double_team.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/active_backup_team.xml b/recipes/regression_tests/phase2/active_backup_team.xml
index 30fe553..ac3eb6f 100644
--- a/recipes/regression_tests/phase2/active_backup_team.xml
+++ b/recipes/regression_tests/phase2/active_backup_team.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="active_backup_team.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml b/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
index 1badb1f..d20348e 100644
--- a/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/active_backup_team_vs_active_backup_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="active_backup_team_vs_active_backup_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml b/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
index c921037..08a2d1e 100644
--- a/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
+++ b/recipes/regression_tests/phase2/active_backup_team_vs_round_robin_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="active_backup_team_vs_round_robin_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/round_robin_double_team.xml b/recipes/regression_tests/phase2/round_robin_double_team.xml
index 585e446..0d6cb6f 100644
--- a/recipes/regression_tests/phase2/round_robin_double_team.xml
+++ b/recipes/regression_tests/phase2/round_robin_double_team.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="round_robin_double_team.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/round_robin_team.xml b/recipes/regression_tests/phase2/round_robin_team.xml
index c257851..4d6a3c7 100644
--- a/recipes/regression_tests/phase2/round_robin_team.xml
+++ b/recipes/regression_tests/phase2/round_robin_team.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="round_robin_team.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml b/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
index b59188a..6b5f065 100644
--- a/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/round_robin_team_vs_active_backup_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="round_robin_team_vs_active_backup_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml b/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
index 88c2617..aeb6e7e 100644
--- a/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
+++ b/recipes/regression_tests/phase2/round_robin_team_vs_round_robin_bond.xml
@@ -5,6 +5,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="round_robin_team_vs_round_robin_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/team_test.py b/recipes/regression_tests/phase2/team_test.py
index 4e7aed6..e132be9 100644
--- a/recipes/regression_tests/phase2/team_test.py
+++ b/recipes/regression_tests/phase2/team_test.py
@@ -43,7 +43,7 @@ mtu = ctl.get_alias("mtu")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
test_if1 = m1.get_interface("test_if")
test_if1.set_mtu(mtu)
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
index 6e6aa10..fa7961c 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.py
@@ -49,7 +49,7 @@ ipv = ctl.get_alias("ipv")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
ping_mod = ctl.get_module("IcmpPing",
options={
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml
index 71f4778..97f9b6e 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_2_vlans_over_active_backup_bond.xml
@@ -4,6 +4,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="virtual_ovs_bridge_2_vlans_over_active_backup_bond.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
index 1ce8b36..d953ab7 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.py
@@ -43,7 +43,7 @@ ipv = ctl.get_alias("ipv")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
ping_mod = ctl.get_module("IcmpPing",
options={
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
index bbd0902..80ad328 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_guest.xml
@@ -4,6 +4,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="virtual_ovs_bridge_vlan_in_guest.mapping" />
</define>
<network>
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
index 43381da..058f9ea 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.py
@@ -43,7 +43,7 @@ ipv = ctl.get_alias("ipv")
netperf_duration = int(ctl.get_alias("netperf_duration"))
nperf_reserve = int(ctl.get_alias("nperf_reserve"))
nperf_confidence = ctl.get_alias("nperf_confidence")
-nperf_max_runs = int(nperf_confidence.split(",")[1])
+nperf_max_runs = int(ctl.get_alias("nperf_max_runs"))
ping_mod = ctl.get_module("IcmpPing",
options={
diff --git a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
index e41aa26..9995891 100644
--- a/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
+++ b/recipes/regression_tests/phase2/virtual_ovs_bridge_vlan_in_host.xml
@@ -4,6 +4,7 @@
<alias name="netperf_duration" value="60" />
<alias name="nperf_reserve" value="20" />
<alias name="nperf_confidence" value="99,5" />
+ <alias name="nperf_max_runs" value="5" />
<alias name="mapping_file" value="virtual_ovs_bridge_vlan_in_host.mapping" />
</define>
<network>
--
2.1.0
8 years, 6 months
[PATCH] PacketAssert: log composed tcpdump command to debug output
by Jan Tluka
This patch adds tcpdump command that will be executed into debug log.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
test_modules/PacketAssert.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/test_modules/PacketAssert.py b/test_modules/PacketAssert.py
index b0a7101..49790b9 100644
--- a/test_modules/PacketAssert.py
+++ b/test_modules/PacketAssert.py
@@ -65,6 +65,7 @@ class PacketAssert(TestGeneric):
pcap_filter = ""
cmd = "tcpdump -p -nn -i %s \"%s\"" % (interface, pcap_filter)
+ logging.debug("PacketAssert tcpdump command: %s" % cmd)
self._cmd = cmd
def _execute_tcpdump(self):
--
2.1.0
8 years, 6 months
[PATCH] Wizard: Add missing new line
by Jiri Prochazka
In _query_libvirt_domain() method in error output newline was missing
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Controller/Wizard.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Controller/Wizard.py b/lnst/Controller/Wizard.py
index 74f2691..ddd461a 100644
--- a/lnst/Controller/Wizard.py
+++ b/lnst/Controller/Wizard.py
@@ -426,7 +426,7 @@ class Wizard:
if lease["hostname"] == libvirt_domain:
return (libvirt_domain, lease["ipaddr"])
except:
- sys.stderr.write("Failed getting DHCPLeases from hypervisor")
+ sys.stderr.write("Failed getting DHCPLeases from hypervisor\n")
sys.stderr.write("Couldn't find any IP associated with "
"libvirt_domain '%s'\n" % libvirt_domain)
--
2.4.3
8 years, 6 months
[PATCH] lnst-ctl: Print where logs are stored on the end of lnst-ctl output
by Jiri Prochazka
This may come in handy for user so he can immediately find correct log dir
Closes issue #140
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst-ctl | 1 +
1 file changed, 1 insertion(+)
diff --git a/lnst-ctl b/lnst-ctl
index 947f3ad..d92eaed 100755
--- a/lnst-ctl
+++ b/lnst-ctl
@@ -333,6 +333,7 @@ def main():
log_ctl.set_recipe("", clean=False)
res_serializer.print_summary()
+ logging.info("Saving logs to: %s" % log_ctl.log_folder)
if result_path:
result_path = os.path.expanduser(result_path)
--
2.4.3
8 years, 6 months