Antoni Segura Puimedon has posted comments on this change. Change subject: NetReload: netmodels for addNetwork ......................................................................
Patch Set 4: (5 inline comments) .................................................... File vdsm/configNetwork.py Line 47: MAX_BRIDGE_NAME_LEN = 15 Line 48: ILLEGAL_BRIDGE_CHARS = frozenset(':. \t') Line 49: Line 50: Line 51: def objectivizeNetwork(net, bridged=None, vlan=None, bonding=None, Done Line 52: bondingOptions=None, nics=None, mtu=None, ipaddr=None, Line 53: netmask=None, gateway=None, bootproto=None, Line 54: _netinfo=None, configurator=None, **opts): Line 55: if configurator is None: Line 71: if bridged: Line 72: topObj = Bridge(net, configurator, ports=[topObj] if topObj else [], Line 73: mtu=mtu, stp=opts.get('stp'), Line 74: forwardDelay=opts.get('forward_delay', 0)) Line 75: topObj.ip = IpConfig(inet=IPv4(ipaddr, netmask, gateway), Done Line 76: bootproto=bootproto) Line 77: return topObj Line 78: Line 79: Line 76: bootproto=bootproto) Line 77: return topObj Line 78: Line 79: Line 80: def objectivizeBond(bonding, bondingOptions, nics, mtu, _netinfo, Done Line 81: configurator): Line 82: if bonding and nics: Line 83: slaves = [] Line 84: bondMtu = netinfo.getMaxMtu(nics, mtu) Line 115: raise ConfigNetworkError(ne.ERR_BAD_BONDING, 'Multiple nics require a ' Line 116: 'bonding device') Line 117: nic = nics[0] Line 118: nicBond = _netinfo.getBondingForNic(nic) Line 119: if nic not in _netinfo.nics: Done Line 120: raise ConfigNetworkError(ne.ERR_BAD_NIC, 'unknown nic: %r' % nic) Line 121: elif nicBond and nicBond != bonding: Line 122: raise ConfigNetworkError(ne.ERR_USED_NIC, 'nic %s already enslaved to ' Line 123: '%s' % (nic, nicBond)) Line 119: if nic not in _netinfo.nics: Line 120: raise ConfigNetworkError(ne.ERR_BAD_NIC, 'unknown nic: %r' % nic) Line 121: elif nicBond and nicBond != bonding: Line 122: raise ConfigNetworkError(ne.ERR_USED_NIC, 'nic %s already enslaved to ' Line 123: '%s' % (nic, nicBond)) Done Line 124: return Nic(nic, configurator, mtu=mtu) Line 125: Line 126: Line 127: def _validateInterNetworkCompatibility(ni, vlan, iface, bridged): -- To view, visit http://gerrit.ovirt.org/14303 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iba5c5b84760e27245cbe34c3b290c54e51278e72 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon <asegu...@redhat.com> Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Giuseppe Vallarelli <gvall...@redhat.com> Gerrit-Reviewer: Mark Wu <wu...@linux.vnet.ibm.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches