Antoni Segura Puimedon has uploaded a new change for review. Change subject: custom_net_props: blacklist 'custom' for ifcfg configurator ......................................................................
custom_net_props: blacklist 'custom' for ifcfg configurator The ifcfg configurator has a pass network options through that makes those options that are not blacklisted reach the ifcfg files. However these options must be textual and valid to initscripts to be of any use. This patch blacklists custom as it is neither textual nor valid initscripts. Change-Id: Ifb4eba375ed64333b960c1cdb5e77bbd1c998c2d Signed-off-by: Antoni S. Puimedon <[email protected]> --- M tests/functional/networkTests.py M vdsm/network/configurators/ifcfg.py 2 files changed, 16 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/55/26655/1 diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py index cf21ff1..839cf23 100644 --- a/tests/functional/networkTests.py +++ b/tests/functional/networkTests.py @@ -1928,3 +1928,18 @@ bonds['BONDING_NAME'] = {'remove': True} status, msg = self.vdsm_net.setupNetworks(networks, {}, NOCHK) self.assertEquals(status, SUCCESS, msg) + + @cleanupNet + @RequireDummyMod + @ValidateRunningAsRoot + def testSetupNetworkAcceptsCustomProps(self): + """oVirt 3.5 adds custom network properties that are set in the + setupNetworks dictionary. This patch tests that even if no hook handles + them the call succeeds.""" + with dummyIf(1) as nics: + nic, = nics + network = {NETWORK_NAME: {'nic': nic, 'vlan': VLAN_ID, + 'custom': {'linux': 'rules', 'vdsm': 'as well'}}} + status, msg = self.vdsm_net.setupNetworks(network, {}, + NOCHK) + self.assertEqual(status, SUCCESS, msg) diff --git a/vdsm/network/configurators/ifcfg.py b/vdsm/network/configurators/ifcfg.py index 135bb96..352d78e 100644 --- a/vdsm/network/configurators/ifcfg.py +++ b/vdsm/network/configurators/ifcfg.py @@ -584,7 +584,7 @@ else: cfg += 'IPV6_AUTOCONF=%s\n' % 'no' BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'VLAN', 'bondingOptions', - 'force', 'blockingdhcp', + 'force', 'blockingdhcp', 'custom', 'connectivityCheck', 'connectivityTimeout', 'implicitBonding', 'delay', 'onboot', 'forward_delay', 'DELAY', 'ONBOOT'] -- To view, visit http://gerrit.ovirt.org/26655 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb4eba375ed64333b960c1cdb5e77bbd1c998c2d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
