Commit 72f0ef8e authored by Guido Trotter's avatar Guido Trotter
Browse files

Remove deprecated 'bridge' nic parameter



This has been a synonym for "link" since a few major versions.
Add a NEWS entry so we won't forget to mention it at release time.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 717920a0
......@@ -11,6 +11,8 @@ Version 2.5.0 beta1
to match the underlying LUXI interface
- When creating file-based instances via RAPI, the ``file_driver``
parameter no longer defaults to ``loop`` and must be specified
- The deprecated "bridge" nic parameter is no longer supported. Use
"link" instead.
Version 2.4.0 rc2
......
......@@ -7473,18 +7473,8 @@ class LUInstanceCreate(LogicalUnit):
" in cluster" % mac,
errors.ECODE_NOTUNIQUE)
# bridge verification
bridge = nic.get("bridge", None)
link = nic.get("link", None)
if bridge and link:
raise errors.OpPrereqError("Cannot pass 'bridge' and 'link'"
" at the same time", errors.ECODE_INVAL)
elif bridge and nic_mode == constants.NIC_MODE_ROUTED:
raise errors.OpPrereqError("Cannot pass 'bridge' on a routed nic",
errors.ECODE_INVAL)
elif bridge:
link = bridge
# Build nic parameters
link = nic.get(constants.INIC_LINK, None)
nicparams = {}
if nic_mode_req:
nicparams[constants.NIC_MODE] = nic_mode_req
......
......@@ -746,9 +746,7 @@ INIC_MAC = "mac"
INIC_IP = "ip"
INIC_MODE = "mode"
INIC_LINK = "link"
INIC_BRIDGE = "bridge"
INIC_PARAMS_TYPES = {
INIC_BRIDGE: VTYPE_STRING,
INIC_IP: VTYPE_MAYBE_STRING,
INIC_LINK: VTYPE_STRING,
INIC_MAC: VTYPE_STRING,
......
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