From: Ondrej Lichtner olichtne@redhat.com
If the 'bg' parameter was specified with value False the task would crash with "Argument not recognised", causing problems when the value is passed as a variable. This commit fixes that by parsing and ignoring the 'bg' argument when it's value is False.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Controller/Task.py | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py index 51a0333..178d774 100644 --- a/lnst/Controller/Task.py +++ b/lnst/Controller/Task.py @@ -254,6 +254,8 @@ class HostAPI(object): if arg == "bg" and argval == True: self._bg_id_seq += 1 cmd["bg_id"] = bg_id = self._bg_id_seq + elif arg == "bg" and argval == False: + continue elif arg == "expect": if str(argval) not in ["pass", "fail"]: msg = "Unrecognised value of the expect attribute (%s)." \
From: Ondrej Lichtner olichtne@redhat.com
In case there are no slave options, the get_slave_options function should return an empty list instead of None so that the function is usable "for x in ..." loops.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- lnst/Slave/NetConfigCommon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Slave/NetConfigCommon.py b/lnst/Slave/NetConfigCommon.py index 30517c7..d6fec98 100644 --- a/lnst/Slave/NetConfigCommon.py +++ b/lnst/Slave/NetConfigCommon.py @@ -40,7 +40,7 @@ def get_slave_options(netdev, slave_id): try: options = netdev["slave_options"][slave_id] except KeyError: - return None + return [] return options
def get_netem_option(netem_tag, netem_name, opt_name):
From: Ondrej Lichtner olichtne@redhat.com
The typo was introduced when I split the vxlan_test.py task into 2 spefic to their recipes.
Signed-off-by: Ondrej Lichtner olichtne@redhat.com --- recipes/regression_tests/phase3/vxlan_multicast.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/recipes/regression_tests/phase3/vxlan_multicast.xml b/recipes/regression_tests/phase3/vxlan_multicast.xml index 176b3d8..f22610f 100644 --- a/recipes/regression_tests/phase3/vxlan_multicast.xml +++ b/recipes/regression_tests/phase3/vxlan_multicast.xml @@ -88,5 +88,5 @@ </host> </network>
- <task python="vxlan_multicast_test.py" /> + <task python="vxlan_multicast.py" /> </lnstrecipe>
lnst-developers@lists.fedorahosted.org