From 15974244f6212905540e1daf9ca596c83f510bdd Mon Sep 17 00:00:00 2001 From: Sarath Kumar Date: Thu, 21 Jul 2016 11:14:39 -0700 Subject: Enable os-net-config to support and configure NFVSwitch These changes are to generate /etc/sysconf/network-scripts/ifcfg-* and /etc/sysconfig/nfvswitch configuration files for nfvswitch and its interfaces. NFVSwitch is a virtual switch implementation based on DPDK for datacenter workloads with very high throughput needs. Change-Id: If02edb9c4c54c014f67290fe0c34e2fc73cb95bd --- os_net_config/tests/test_cli.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'os_net_config/tests/test_cli.py') diff --git a/os_net_config/tests/test_cli.py b/os_net_config/tests/test_cli.py index 98477fc..e598dcb 100644 --- a/os_net_config/tests/test_cli.py +++ b/os_net_config/tests/test_cli.py @@ -146,3 +146,21 @@ class TestCli(base.TestCase): stdout_yaml, stderr = self.run_cli('ARG0 --provider=ifcfg --noop ' '-c %s --detailed-exit-codes' % interface_yaml, exitcodes=(0,)) + + def test_nfvswitch_noop_output(self): + nfvswitch_yaml = os.path.join(SAMPLE_BASE, 'nfvswitch.yaml') + nfvswitch_json = os.path.join(SAMPLE_BASE, 'nfvswitch.json') + stdout_yaml, stderr = self.run_cli('ARG0 --provider=ifcfg --noop ' + '-c %s' % nfvswitch_yaml) + self.assertEqual('', stderr) + stdout_json, stderr = self.run_cli('ARG0 --provider=ifcfg --noop ' + '-c %s' % nfvswitch_json) + self.assertEqual('', stderr) + sanity_devices = ['DEVICE=nic2', + 'DEVICE=nic3', + 'DEVICE=api201', + 'DEVICE=storage202', + 'DEVICETYPE=nfvswitch'] + for dev in sanity_devices: + self.assertIn(dev, stdout_yaml) + self.assertEqual(stdout_yaml, stdout_json) -- cgit 1.2.3-korg