diff --git a/ovsdbapp/schema/ovn_northbound/commands.py b/ovsdbapp/schema/ovn_northbound/commands.py index cd512c58..babc5035 100644 --- a/ovsdbapp/schema/ovn_northbound/commands.py +++ b/ovsdbapp/schema/ovn_northbound/commands.py @@ -853,7 +853,7 @@ class LrpAddCommand(cmd.BaseCommand): self.networks = [str(netaddr.IPNetwork(net)) for net in networks] self.router = router self.port = port - self.peer = peer + self.peer = peer if peer else [] self.may_exist = may_exist self.columns = columns super().__init__(api) diff --git a/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py b/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py index ee82ed45..698666e8 100644 --- a/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py +++ b/ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py @@ -1384,7 +1384,7 @@ class TestLogicalRouterPortOps(OvnNorthboundTest): def test_lrp_add(self): self._lrp_add(None, 'de:ad:be:ef:4d:ad', ['192.0.2.0/24']) - def test_lpr_add_peer(self): + def test_lrp_add_peer(self): lrp = self._lrp_add(None, 'de:ad:be:ef:4d:ad', ['192.0.2.0/24'], peer='fake_peer') self.assertIn('fake_peer', lrp.peer) @@ -1415,7 +1415,7 @@ class TestLogicalRouterPortOps(OvnNorthboundTest): name = utils.get_rand_device_name() args = (name, 'de:ad:be:ef:4d:ad', ['192.0.2.0/24']) self._lrp_add(*args) - self.assertRaises(RuntimeError, self._lrp_add, *args, may_exist=True) + self._lrp_add(*args, may_exist=True) def test_lrp_add_may_exist_different_router(self): name = utils.get_rand_device_name()