Antoni Segura Puimedon has posted comments on this change. Change subject: ethtool_opts: provide a way to apply to all slaves ......................................................................
Patch Set 2: (4 comments) http://gerrit.ovirt.org/#/c/32508/2/vdsm_hooks/ethtool_options/ethtool_options.py File vdsm_hooks/ethtool_options/ethtool_options.py: Line 31: '/sbin/ethtool', # EL6, ubuntu and Debian Line 32: '/usr/bin/ethtool', # Arch Line 33: ) Line 34: Line 35: ALL_SLAVES = '*' # Too long to be a device name, so we're safe > comment is out of date, we need a new excuse. Done Line 36: Line 37: Subcommand = namedtuple('Subcommand', ('name', 'device', 'flags')) Line 38: Line 39: Line 42: 'custom': ethtool_opts, Line 43: 'bootproto': 'dhcp', 'STP': 'no', 'bridged': 'true'} Line 44: Line 45: _validate_dev_ownership( Line 46: nics, 'test_net', > unrelated whitespace changes; preferably done sometime else. This is because now using _parse_into_subcommands does not fit and this is the best fit. I'd say it is related enough this once :P Line 47: (item for item in _parse_into_subcommands( Line 48: net_attrs['custom']['ethtool_opts'].split(' ')) if item)) Line 49: Line 50: Line 49: Line 50: Line 51: def test(): Line 52: opts = {'ethtool_opts': Line 53: '--coalesce em1 rx-usecs 14 sample_interval 3 ' > evil underscore is still in sample_interval. Done Line 54: '--offload em2 rx on lro on tso off ' Line 55: '--change em1 speed 1000 duplex half'} Line 56: # Test subcmd split Line 57: print(opts['ethtool_opts']) Line 108: _set_ethtool_opts(network, [subcmd.name, nic] + Line 109: subcmd.flags) Line 110: else: Line 111: raise RuntimeError( Line 112: 'Trying to apply ethtool opts for mixing all slaves ' > Come to think of this - why is that an issue? Why not allow '*' for one sub It was to avoid modifying the _validate_dev_ownership and doing it here. I'll do that now ;-) Line 113: 'expression and specific slaves is not valid') Line 114: else: # No bonding or specific slaves case Line 115: _validate_dev_ownership(_net_nics(attrs), network, subcommands) Line 116: for subcmd in subcommands: -- To view, visit http://gerrit.ovirt.org/32508 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idddbc167be4ac8ba7c4b4ab10da0275b4caf2a58 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
