示例#1
0
 def test_both_registers_defined(self):
     flow = {'foo': 'bar', 'reg_port': 1, 'reg_net': 2}
     expected_flow = {'foo': 'bar',
                      'reg{:d}'.format(fwaas_ovs_consts.REG_PORT): 1,
                      'reg{:d}'.format(fwaas_ovs_consts.REG_NET): 2}
     ovsfw.create_reg_numbers(flow)
     self.assertEqual(expected_flow, flow)
示例#2
0
 def test_no_registers_defined(self):
     flow = {'foo': 'bar'}
     ovsfw.create_reg_numbers(flow)
     self.assertEqual({'foo': 'bar'}, flow)