def test_FaucetProxy(): """ Tests Faucet """ controller = Config().get_config() proxy = FaucetProxy(controller) proxy.shutdown_ip('10.0.0.9') proxy.shutdown_endpoint() proxy.mirror_mac('00:00:00:00:00:00', None, None) proxy.mirror_mac('00:00:00:00:00:01', None, None) proxy.unmirror_mac('00:00:00:00:00:00', None, None) proxy.update_acls() proxy = FaucetProxy(controller) proxy.rabbit_enabled = False proxy.shutdown_ip('10.0.0.9') proxy.shutdown_endpoint() proxy.mirror_mac('00:00:00:00:00:00', None, None) proxy.mirror_mac('00:00:00:00:00:01', None, None) proxy.unmirror_mac('00:00:00:00:00:00', None, None) proxy.update_acls() controller = Config().get_config() controller['MIRROR_PORTS'] = '{"foo":1}' controller['ignore_vlans'] = ['foo'] controller['ignore_ports'] = [1] proxy = FaucetProxy(controller)
def test_FaucetProxy(): """ Tests Faucet """ controller = Config().get_config() proxy = FaucetProxy(controller) proxy.shutdown_ip('10.0.0.9') proxy.shutdown_endpoint() proxy.mirror_mac('00:00:00:00:00:00', None, None) proxy.mirror_mac('00:00:00:00:00:01', None, None) proxy.unmirror_mac('00:00:00:00:00:00', None, None) proxy = FaucetProxy(controller) proxy.rabbit_enabled = False proxy.shutdown_ip('10.0.0.9') proxy.shutdown_endpoint() proxy.mirror_mac('00:00:00:00:00:00', None, None) proxy.mirror_mac('00:00:00:00:00:01', None, None) proxy.unmirror_mac('00:00:00:00:00:00', None, None) proxy = FaucetProxy(controller) proxy.shutdown_ip('10.0.0.9') proxy.shutdown_endpoint() proxy.mirror_mac('00:00:00:00:00:00', None, None, messages=[{'dp_name': 'switch', 'L2_LEARN': {'l3_src_ip': '10.0.0.1', 'eth_src': '00:00:00:00:00:00', 'port_no': 1, 'vid': '100'}}, { 'version': 1, 'time': 1525205350.0357792, 'dp_id': 1, 'dp_name': 'switch-1', 'event_id': 5, 'PORT_CHANGE': {'port_no': 1, 'reason': 'MODIFY', 'status': False}}, {}]) proxy.mirror_mac('00:00:00:00:00:01', None, None) proxy.unmirror_mac('00:00:00:00:00:00', None, None, messages=[{'dp_name': 'switch', 'L2_LEARN': {'l3_src_ip': '10.0.0.1', 'eth_src': '00:00:00:00:00:00', 'port_no': 1, 'vid': '100'}}, { 'version': 1, 'time': 1525205350.0357792, 'dp_id': 1, 'dp_name': 'switch-1', 'event_id': 5, 'PORT_CHANGE': {'port_no': 1, 'reason': 'MODIFY', 'status': False}}, {}])
def test_FaucetProxy(): """ Tests Faucet """ controller = Config().get_config() proxy = FaucetProxy(controller) proxy.shutdown_ip('10.0.0.9') proxy.shutdown_endpoint() proxy.mirror_mac('00:00:00:00:00:00', None, None) proxy.mirror_mac('00:00:00:00:00:01', None, None) proxy.unmirror_mac('00:00:00:00:00:00', None, None) proxy = FaucetProxy(controller) proxy.rabbit_enabled = False proxy.shutdown_ip('10.0.0.9') proxy.shutdown_endpoint() proxy.mirror_mac('00:00:00:00:00:00', None, None) proxy.mirror_mac('00:00:00:00:00:01', None, None) proxy.unmirror_mac('00:00:00:00:00:00', None, None)