Change in vdsm[master]: net: models: drop implicitBonding leftover

phoracek at redhat.com phoracek at redhat.com
Fri Feb 26 15:27:13 UTC 2016


Petr Horáček has uploaded a new change for review.

Change subject: net: models: drop implicitBonding leftover
......................................................................

net: models: drop implicitBonding leftover

We can drop implicit bonding handling. `if nic` checking is not
needed anymore as it is done in network/api.py:setupNetworks()
validation.

Change-Id: I42a152c378570c900791a9272f3022f462ccb8d5
Signed-off-by: Petr Horáček <phoracek at redhat.com>
---
M lib/vdsm/network/models.py
1 file changed, 5 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/54084/1

diff --git a/lib/vdsm/network/models.py b/lib/vdsm/network/models.py
index 9f5564b..e87a8af 100644
--- a/lib/vdsm/network/models.py
+++ b/lib/vdsm/network/models.py
@@ -276,27 +276,14 @@
     def objectivize(cls, name, configurator, options, nics, mtu, _netinfo,
                     destroyOnMasterRemoval=None):
 
-        if nics:  # New bonding or edit bonding.
-            slaves = cls._objectivizeSlaves(name, configurator, _nicSort(nics),
-                                            mtu, _netinfo)
-            if name in _netinfo.bondings:
-                if _netinfo.ifaceUsers(name):
-                    mtu = max(mtu, mtus.getMtu(name))
-
-                if not options:
-                    options = _netinfo.bondings[name]['cfg'].get(
-                        'BONDING_OPTS')
-        elif name in _netinfo.bondings:  # Implicit bonding.
+        slaves = cls._objectivizeSlaves(name, configurator, _nicSort(nics),
+                                        mtu, _netinfo)
+        if name in _netinfo.bondings:
             if _netinfo.ifaceUsers(name):
                 mtu = max(mtu, mtus.getMtu(name))
 
-            slaves = [Nic(nic, configurator, mtu=mtu, _netinfo=_netinfo)
-                      for nic in _netinfo.getNicsForBonding(name)]
-            options = _netinfo.bondings[name]['cfg'].get('BONDING_OPTS')
-        else:
-            raise ConfigNetworkError(ne.ERR_BAD_PARAMS,
-                                     'Missing required nics on a bonding %s '
-                                     'that is unknown to Vdsm ' % name)
+            if not options:
+                options = _netinfo.bondings[name]['cfg'].get('BONDING_OPTS')
 
         return cls(name, configurator, slaves=slaves, options=options, mtu=mtu,
                    destroyOnMasterRemoval=destroyOnMasterRemoval)


-- 
To view, visit https://gerrit.ovirt.org/54084
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42a152c378570c900791a9272f3022f462ccb8d5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>


More information about the vdsm-patches mailing list