This should help when a user needs to bypass a parameter in requirements. For example the default value of interface's driver parameter is ixgbe and the user wants to run on any interface no matter what's in slave pool. Without this fix it's impossible to do that other than editing the slave pool xml files directly.
Signed-off-by: Jan Tluka jtluka@redhat.com --- lnst/Controller/SlavePool.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py index 13cc34e..67ccd63 100644 --- a/lnst/Controller/SlavePool.py +++ b/lnst/Controller/SlavePool.py @@ -599,6 +599,9 @@ class SetupMapper(object): req_machine = self._mreqs[req_id] pool_machine = self._pool[pool_id] for param, value in req_machine["params"].iteritems(): + # skip empty parameters + if len(value) == 0: + continue if param not in pool_machine["params"] or\ value != pool_machine["params"][param]: return False @@ -614,6 +617,9 @@ class SetupMapper(object): req_label != req_if["network"]: return False for param, value in req_if["params"].iteritems(): + # skip empty parameters + if len(value) == 0: + continue if param not in pool_if["params"] or\ value != pool_if["params"][param]: return False
On Thu, Sep 15, 2016 at 03:51:09PM +0200, Jan Tluka wrote:
This should help when a user needs to bypass a parameter in requirements. For example the default value of interface's driver parameter is ixgbe and the user wants to run on any interface no matter what's in slave pool. Without this fix it's impossible to do that other than editing the slave pool xml files directly.
Signed-off-by: Jan Tluka jtluka@redhat.com
lnst/Controller/SlavePool.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py index 13cc34e..67ccd63 100644 --- a/lnst/Controller/SlavePool.py +++ b/lnst/Controller/SlavePool.py @@ -599,6 +599,9 @@ class SetupMapper(object): req_machine = self._mreqs[req_id] pool_machine = self._pool[pool_id] for param, value in req_machine["params"].iteritems():
# skip empty parameters
if len(value) == 0:
continue if param not in pool_machine["params"] or\ value != pool_machine["params"][param]: return False
@@ -614,6 +617,9 @@ class SetupMapper(object): req_label != req_if["network"]: return False for param, value in req_if["params"].iteritems():
# skip empty parameters
if len(value) == 0:
continue if param not in pool_if["params"] or\ value != pool_if["params"][param]: return False
-- 2.4.11 _______________________________________________ LNST-developers mailing list lnst-developers@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/lnst-developers@lists.fedorahoste...
Acked-by: Ondrej Lichtner olichtne@redhat.com
On Thu, Sep 15, 2016 at 03:51:09PM +0200, Jan Tluka wrote:
This should help when a user needs to bypass a parameter in requirements. For example the default value of interface's driver parameter is ixgbe and the user wants to run on any interface no matter what's in slave pool. Without this fix it's impossible to do that other than editing the slave pool xml files directly.
Signed-off-by: Jan Tluka jtluka@redhat.com
lnst/Controller/SlavePool.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/lnst/Controller/SlavePool.py b/lnst/Controller/SlavePool.py index 13cc34e..67ccd63 100644 --- a/lnst/Controller/SlavePool.py +++ b/lnst/Controller/SlavePool.py @@ -599,6 +599,9 @@ class SetupMapper(object): req_machine = self._mreqs[req_id] pool_machine = self._pool[pool_id] for param, value in req_machine["params"].iteritems():
# skip empty parameters
if len(value) == 0:
continue if param not in pool_machine["params"] or\ value != pool_machine["params"][param]: return False
@@ -614,6 +617,9 @@ class SetupMapper(object): req_label != req_if["network"]: return False for param, value in req_if["params"].iteritems():
# skip empty parameters
if len(value) == 0:
continue if param not in pool_if["params"] or\ value != pool_if["params"][param]: return False
-- 2.4.11 _______________________________________________ LNST-developers mailing list lnst-developers@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/lnst-developers@lists.fedorahoste...
pushed, thanks
lnst-developers@lists.fedorahosted.org