Пример #1
0
 def setUp(self):
     super(TestCreateProtocolFlows, self).setUp()
     ovs_port = mock.Mock(vif_mac='00:00:00:00:00:00')
     ovs_port.ofport = 1
     port_dict = {'device': 'port_id'}
     self.port = ovsfw.OFPort(port_dict,
                              ovs_port,
                              vlan_tag=TESTING_VLAN_TAG)
Пример #2
0
    def setUp(self):
        super(TestCreateFlowsFromRuleAndPort, self).setUp()
        ovs_port = mock.Mock(vif_mac='00:00:00:00:00:00')
        ovs_port.ofport = 1
        port_dict = {'device': 'port_id'}
        self.port = ovsfw.OFPort(port_dict,
                                 ovs_port,
                                 vlan_tag=TESTING_VLAN_TAG)

        self.create_flows_mock = mock.patch.object(
            rules, 'create_protocol_flows').start()
Пример #3
0
def create_ofport(port_dict):
    ovs_port = mock.Mock(vif_mac='00:00:00:00:00:00',
                         ofport=1,
                         port_name="port-name")
    return ovsfw.OFPort(port_dict, ovs_port, vlan_tag=TESTING_VLAN_TAG)