aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_cli.py
diff options
context:
space:
mode:
authorSarath Kumar <sarath.kutty@bigswitch.com>2016-07-21 11:14:39 -0700
committerSarath Kumar <sarath.kutty@bigswitch.com>2016-08-02 11:45:46 -0700
commit15974244f6212905540e1daf9ca596c83f510bdd (patch)
tree26bcd9086d93e4501e9387a126725a847ce3f9bb /os_net_config/tests/test_cli.py
parent311df0c3828fe7571079fad9763bca9e2414b51a (diff)
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
Diffstat (limited to 'os_net_config/tests/test_cli.py')
-rw-r--r--os_net_config/tests/test_cli.py18
1 files changed, 18 insertions, 0 deletions
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)