From: Ondrej Lichtner <olichtne(a)redhat.com>
Works like the function get_slave_option, but returns the entire option
dictionary for the specified slave instead of just a single option.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NetConfigCommon.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lnst/Slave/NetConfigCommon.py b/lnst/Slave/NetConfigCommon.py
index ffcb0b4..30517c7 100644
--- a/lnst/Slave/NetConfigCommon.py
+++ b/lnst/Slave/NetConfigCommon.py
@@ -36,6 +36,13 @@ def get_slave_option(netdev, slave_id, opt_name):
return value
return None
+def get_slave_options(netdev, slave_id):
+ try:
+ options = netdev["slave_options"][slave_id]
+ except KeyError:
+ return None
+ return options
+
def get_netem_option(netem_tag, netem_name, opt_name):
try:
options = netem_tag[netem_name]
--
2.8.2