Ejemplo n.º 1
0
 def test_no_value_set_for_other_config_raises_exception(self):
     port = self.useFixture(net_helpers.OVSPortFixture(self.bridge)).port
     with testtools.ExpectedException(exceptions.OVSFWTagNotFound):
         firewall.get_tag_from_other_config(self.bridge, port.name)
Ejemplo n.º 2
0
 def test_not_existing_name_raises_exception(self):
     with testtools.ExpectedException(exceptions.OVSFWTagNotFound):
         firewall.get_tag_from_other_config(self.bridge, 'foo')
Ejemplo n.º 3
0
 def test_correct_tag_is_returned(self):
     port_number = 42
     port = self.useFixture(net_helpers.OVSPortFixture(self.bridge)).port
     self.set_port_tag(port.name, port_number)
     observed = firewall.get_tag_from_other_config(self.bridge, port.name)
     self.assertEqual(port_number, observed)
Ejemplo n.º 4
0
 def test_no_value_set_for_other_config_raises_exception(self):
     port = self.useFixture(net_helpers.OVSPortFixture(self.bridge)).port
     with testtools.ExpectedException(exceptions.OVSFWTagNotFound):
         firewall.get_tag_from_other_config(self.bridge, port.name)
Ejemplo n.º 5
0
 def test_not_existing_name_raises_exception(self):
     with testtools.ExpectedException(exceptions.OVSFWTagNotFound):
         firewall.get_tag_from_other_config(self.bridge, 'foo')
Ejemplo n.º 6
0
 def test_correct_tag_is_returned(self):
     port_number = 42
     port = self.useFixture(net_helpers.OVSPortFixture(self.bridge)).port
     self.set_port_tag(port.name, port_number)
     observed = firewall.get_tag_from_other_config(self.bridge, port.name)
     self.assertEqual(port_number, observed)