# # @author: Dave Lapsley, Nicira Networks, Inc. import unittest import mox from quantum.agent.linux import ovs_lib from quantum.plugins.openvswitch.agent import ovs_quantum_agent # Useful global dummy variables. NET_UUID = '3faeebfe-5d37-11e1-a64b-000c29d5f0a7' LS_ID = '42' LV_ID = 42 LV_IDS = [42, 43] LVM = ovs_quantum_agent.LocalVLANMapping(LV_ID, 'gre', None, LS_ID, LV_IDS) VIF_ID = '404deaec-5d37-11e1-a64b-000c29d5f0a8' VIF_MAC = '3c:09:24:1e:78:23' OFPORT_NUM = 1 VIF_PORT = ovs_lib.VifPort('port', OFPORT_NUM, VIF_ID, VIF_MAC, 'switch') BCAST_MAC = "01:00:00:00:00:00/01:00:00:00:00:00" class DummyPort: def __init__(self, interface_id): self.interface_id = interface_id class DummyVlanBinding: def __init__(self, network_id, vlan_id): self.network_id = network_id
from quantum.openstack.common import log from quantum.plugins.openvswitch.agent import ovs_quantum_agent from quantum.plugins.openvswitch.common import constants from quantum.tests import base # Useful global dummy variables. NET_UUID = '3faeebfe-5d37-11e1-a64b-000c29d5f0a7' LS_ID = 42 LV_ID = 42 LV_IDS = [42, 43] VIF_ID = '404deaec-5d37-11e1-a64b-000c29d5f0a8' VIF_MAC = '3c:09:24:1e:78:23' OFPORT_NUM = 1 VIF_PORT = ovs_lib.VifPort('port', OFPORT_NUM, VIF_ID, VIF_MAC, 'switch') VIF_PORTS = {LV_ID: VIF_PORT} LVM = ovs_quantum_agent.LocalVLANMapping(LV_ID, 'gre', None, LS_ID, VIF_PORTS) LVM_FLAT = ovs_quantum_agent.LocalVLANMapping(LV_ID, 'flat', 'net1', LS_ID, VIF_PORTS) LVM_VLAN = ovs_quantum_agent.LocalVLANMapping(LV_ID, 'vlan', 'net1', LS_ID, VIF_PORTS) BCAST_MAC = "01:00:00:00:00:00/01:00:00:00:00:00" class DummyPort: def __init__(self, interface_id): self.interface_id = interface_id class DummyVlanBinding: def __init__(self, network_id, vlan_id): self.network_id = network_id