def test_driver_load_fail_validate_network_name_format( self, mock_validate): mock_validate.side_effect = exc.GenericSwitchConfigException() device_cfg = {'device_type': 'netmiko_ovs_linux'} device = None with self.assertRaises(exc.GenericSwitchEntrypointLoadError): device = devices.device_manager(device_cfg) self.assertIsNone(device)
def on_invalid_switchmode(): raise exc.GenericSwitchConfigException( option="ngs_switchport_mode", allowed_options=switchport_mode.keys())