aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_impl_ifcfg.py
diff options
context:
space:
mode:
authorPierre Blanc <pblanc@redhat.com>2016-11-02 08:55:54 -0400
committerPierre Blanc <pblanc@redhat.com>2016-11-11 13:06:36 -0500
commit469c0ab91ae550945eb4d0a18ebd284994fde384 (patch)
tree690eb1b487eb5e02324fc687b7935b6e0d00b82f /os_net_config/tests/test_impl_ifcfg.py
parent4fdb0a6a2b355750ae8071e53a74b9257b18eeee (diff)
Add support for ethtool_opts option
This patch add an optional option to specify the ETHTOOL_OPTS for each interface. ETHTOOL_OPTS option will be written to the ifcfg file. Change-Id: I6b594e89ba6b4c17e8df79def997f6c9ea427a3a
Diffstat (limited to 'os_net_config/tests/test_impl_ifcfg.py')
-rw-r--r--os_net_config/tests/test_impl_ifcfg.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/os_net_config/tests/test_impl_ifcfg.py b/os_net_config/tests/test_impl_ifcfg.py
index 0c14418..2e79aa1 100644
--- a/os_net_config/tests/test_impl_ifcfg.py
+++ b/os_net_config/tests/test_impl_ifcfg.py
@@ -742,6 +742,21 @@ DHCLIENTARGS=--foobar
"""
self.assertEqual(em1_config, self.get_interface_config('em1'))
+ def test_interface_ethtool_opts(self):
+ interface1 = objects.Interface('em1',
+ ethtool_opts='speed 1000 duplex full')
+ self.provider.add_interface(interface1)
+ em1_config = """# This file is autogenerated by os-net-config
+DEVICE=em1
+ONBOOT=yes
+HOTPLUG=no
+NM_CONTROLLED=no
+PEERDNS=no
+BOOTPROTO=none
+ETHTOOL_OPTS=\"speed 1000 duplex full\"
+"""
+ self.assertEqual(em1_config, self.get_interface_config('em1'))
+
def test_interface_single_dns_server(self):
interface1 = objects.Interface('em1', dns_servers=['1.2.3.4'])
self.provider.add_interface(interface1)