From 0c9d32c10546031c76853c3caa35a2cb562ef526 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Thu, 12 Nov 2009 17:08:25 +0000 Subject: [PATCH] NIC.CheckParameterSyntax: fix bridged check We should match for the strings to be the same "==" not to point to the same memory location with is, or we skip the actual check. Signed-off-by: Guido Trotter <ultrotter@google.com> --- lib/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/objects.py b/lib/objects.py index 2f3b4f6ee..9d0493649 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -354,7 +354,7 @@ class NIC(ConfigObject): err = "Invalid nic mode: %s" % nicparams[constants.NIC_MODE] raise errors.ConfigurationError(err) - if (nicparams[constants.NIC_MODE] is constants.NIC_MODE_BRIDGED and + if (nicparams[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED and not nicparams[constants.NIC_LINK]): err = "Missing bridged nic link" raise errors.ConfigurationError(err) -- GitLab