From 1177d70e5ed79b01291308e8bfa3d8c012745bed Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Mon, 6 Dec 2010 12:06:44 +0100
Subject: [PATCH] Remove bridge NIC slot

This has been deprecated and unused since 2.1.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/objects.py | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/lib/objects.py b/lib/objects.py
index 6e7c33f39..3d0951725 100644
--- a/lib/objects.py
+++ b/lib/objects.py
@@ -389,7 +389,7 @@ class ConfigData(ConfigObject):
 
 class NIC(ConfigObject):
   """Config object representing a network card."""
-  __slots__ = ["mac", "ip", "bridge", "nicparams"]
+  __slots__ = ["mac", "ip", "nicparams"]
 
   @classmethod
   def CheckParameterSyntax(cls, nicparams):
@@ -409,21 +409,6 @@ class NIC(ConfigObject):
       err = "Missing bridged nic link"
       raise errors.ConfigurationError(err)
 
-  def UpgradeConfig(self):
-    """Fill defaults for missing configuration values.
-
-    """
-    if self.nicparams is None:
-      self.nicparams = {}
-      if self.bridge is not None:
-        self.nicparams[constants.NIC_MODE] = constants.NIC_MODE_BRIDGED
-        self.nicparams[constants.NIC_LINK] = self.bridge
-    # bridge is no longer used it 2.1. The slot is left there to support
-    # upgrading, but can be removed once upgrades to the current version
-    # straight from 2.0 are deprecated.
-    if self.bridge is not None:
-      self.bridge = None
-
 
 class Disk(ConfigObject):
   """Config object representing a block device."""
-- 
GitLab