Commit 0c9d32c1 authored by Guido Trotter's avatar Guido Trotter

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: default avatarGuido Trotter <ultrotter@google.com>
parent beabf067
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment