commit 369d5e3ca92b9f071e20ab845089c91d99adf56a
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Mon Sep 10 16:37:01 2012 +0200
MacPool: use pool range from config files
Ranges of mac pool are now defined in config files, by option
'mac_pool_range' in section 'environment'.
Format of this option is
mac_pool_range = <starting_mac_address> <ending_mac_address>
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
NetTest/NetTestController.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/NetTest/NetTestController.py b/NetTest/NetTestController.py
index 4d04e9c..1b6ffbe 100644
--- a/NetTest/NetTestController.py
+++ b/NetTest/NetTestController.py
@@ -28,8 +28,6 @@ from Common.VirtUtils import VirtNetCtl, VirtDomainCtl, BridgeCtl
from Common.Utils import wait_for
from NetTest.MachinePool import MachinePool
-MAC_POOL_RANGE = {"start": "52:54:01:00:00:01", "end":
"52:54:01:FF:FF:FF"}
-
class NetTestError(Exception):
pass
@@ -51,8 +49,10 @@ class NetTestController:
definitions = {"recipe": self._recipe}
self._recipe["networks"] = {}
- self._mac_pool = MacPool(MAC_POOL_RANGE["start"],
- MAC_POOL_RANGE["end"])
+
+ mac_pool_range = config.get_option('environment',
'mac_pool_range')
+ self._mac_pool = MacPool(mac_pool_range[0],
+ mac_pool_range[1])
ntparse = NetTestParse(recipe_path)
ntparse.set_recipe(self._recipe)
Show replies by date