Example #1
0
 def test_is_ovs_interface_recursive(self):
     interfaces = dict()
     interfaces['patchx'] = {'peer': 'patchy', 'openvswitch': {}}
     interfaces['patchy'] = {'peer': 'patchx', 'openvswitch': {}}
     interfaces['ovs0'] = {'interfaces': ['bond0']}
     interfaces['bond0'] = {'interfaces': ['patchx', 'patchy']}
     self.assertTrue(ovs.is_ovs_interface('ovs0', interfaces))
Example #2
0
 def test_is_ovs_interface_special_key(self):
     interfaces = dict()
     interfaces['renderer'] = 'NetworkManager'
     self.assertFalse(ovs.is_ovs_interface('renderer', interfaces))
Example #3
0
 def test_is_ovs_interface_invalid_key(self):
     interfaces = dict()
     interfaces['ovs0'] = {'openvswitch': {'set-fail-mode': 'secure'}}
     self.assertFalse(ovs.is_ovs_interface('gretap1', interfaces))
Example #4
0
 def test_is_ovs_interface_false(self):
     interfaces = dict()
     interfaces['br0'] = {'interfaces': ['eth0', 'eth1']}
     interfaces['eth0'] = {}
     interfaces['eth1'] = {}
     self.assertFalse(ovs.is_ovs_interface('br0', interfaces))
Example #5
0
 def test_is_ovs_interface(self):
     interfaces = dict()
     interfaces['ovs0'] = {'openvswitch': {'set-fail-mode': 'secure'}}
     self.assertTrue(ovs.is_ovs_interface('ovs0', interfaces))