Commit dfc3afd9 authored by Thomas Thrainer's avatar Thomas Thrainer

Use constant instead of raw string

Use the appropriate constant instead of a raw string.
Signed-off-by: default avatarThomas Thrainer <>
Reviewed-by: default avatarHrvoje Ribicic <>
parent 88a0e24b
......@@ -614,7 +614,7 @@ def InitCluster(cluster_name, mac_prefix, # pylint: disable=R0913, R0914
raise errors.OpPrereqError("Invalid mac prefix given '%s'" % mac_prefix,
if not nicparams.get('mode', None) == "openvswitch":
if not nicparams.get('mode', None) == constants.NIC_MODE_OVS:
# Do not do this check if mode=openvswitch, since the openvswitch is not
# created yet
result = utils.RunCmd(["ip", "link", "show", "dev", master_netdev])
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