Antoni Segura Puimedon has posted comments on this change.
Change subject: NetReload: netmodels for delNetwork
......................................................................
Patch Set 13: (5 inline comments)
....................................................
File vdsm/configNetwork.py
Line 77: topNetDev = None
Line 78: if bonding:
Line 79: topNetDev = Bond.objectivize(bonding, configurator,
bondingOptions,
Line 80: nics, mtu, _netinfo,
Line 81: opts.get('implicitBonding'))
Done
Line 82: elif nics:
Line 83: try:
Line 84: nic, = nics
Line 85: except ValueError:
....................................................
File vdsm/netconf/ifcfg.py
Line 175: if iface.master is None:
Line 176: self.configWriter.removeIpConfig(iface.name)
Line 177: elif isinstance(iface.master, Bridge):
Line 178: self.configWriter.removeBridgeMaster(iface.name)
Line 179: multiple_usage = _netinfo.ifaceUsers(iface.name)
Done
Line 180: yield not multiple_usage
Line 181:
Line 182: if multiple_usage or not hasattr(iface, 'destroy'):
Line 183: ifup(iface.name)
Line 638: cf = netinfo.NET_CONF_PREF + iface
Line 639: for key in ('IPADDR', 'NETMASK', 'GATEWAY', 'BOOTPROTO'):
Line 640: self._updateConfigValue(cf, key, '', True)
Line 641:
Line 642: def removeBridgeMaster(self, iface):
Your suggestion is fine.
Line 643: cf = netinfo.NET_CONF_PREF + iface
Line 644: self._updateConfigValue(cf, 'BRIDGE', '', True)
Line 645:
Line 646: def _getConfigValue(self, conffile, entry):
....................................................
File vdsm/netmodels.py
Line 166: self.configurator.removeBond(self)
Line 167:
Line 168: @classmethod
Line 169: def objectivize(cls, name, configurator, options, nics, mtu,
_netinfo,
Line 170: destroy=None):
Done
Line 171: if name and nics:
Line 172: slaves = []
Line 173: for nic in nics:
Line 174: nicVlans = tuple(_netinfo.getVlansForIface(nic))
Line 195:
Line 196: bondObj = cls(name, configurator, slaves=slaves,
options=options,
Line 197: mtu=mtu)
Line 198: if destroy:
Line 199: bondObj.destroy = True
Done
Line 200: return bondObj
Line 201:
Line 202: @staticmethod
Line 203: def validateName(name):
--
To view, visit http://gerrit.ovirt.org/14873
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9e11fd923a4f5d07d069193278f3eadc94f327ec
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches