This patch fixes a bug with commands. Execution of commands on the
controller is no longer supported, so it is mandatory to pass a
valid machine_id to each command.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
---
lnst/Controller/NetTestParse.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/lnst/Controller/NetTestParse.py b/lnst/Controller/NetTestParse.py
index bb40ed6..40223f5 100644
--- a/lnst/Controller/NetTestParse.py
+++ b/lnst/Controller/NetTestParse.py
@@ -554,12 +554,9 @@ class CommandParse(RecipeParser):
recipe["sequences"][self._seq_num]["commands"].append(command)
self._cmd_num =
len(recipe["sequences"][self._seq_num]["commands"]) - 1
- if self._has_attribute(node, "machine_id"):
- machine_id = self._get_attribute(node, "machine_id")
- if machine_id and not machine_id in recipe["machines"]:
- raise XmlProcessingError("Invalid machine_id", node)
- else:
- machine_id = "0" # controller id
+ machine_id = self._get_attribute(node, "machine_id")
+ if machine_id and not machine_id in recipe["machines"]:
+ raise XmlProcessingError("Invalid machine_id", node)
command["machine_id"] = machine_id
command["type"] = self._get_attribute(node, "type")
--
1.7.7.6
Show replies by date