diff --git a/lib/objects.py b/lib/objects.py index 6e7c33f39347bfcc781edd46c0706d40ba4df24f..3d0951725efb08d764f2c4d5d48cfbb8489c28bf 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."""