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: Guido Trotter <[email protected]> --- NEWS | 2 ++ lib/cmdlib.py | 14 ++------------ lib/constants.py | 1 - 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 2668383..c0658c8 100644 --- a/NEWS +++ b/NEWS @@ -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 beta1 diff --git a/lib/cmdlib.py b/lib/cmdlib.py index bd2751b..bb13d8e 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -7389,18 +7389,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 diff --git a/lib/constants.py b/lib/constants.py index 4886595..ca6c525 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -738,7 +738,6 @@ 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, -- 1.7.2.3
