Add LrGet command
Change-Id: Icc99121fb8c013bfd1097df79630c888c7b5c0dd Signed-off-by: Marcin Mirecki <mmirecki@redhat.com>
This commit is contained in:
parent
9a2cd1af3c
commit
6b5b3bda6c
|
@ -363,6 +363,13 @@ class API(api.API):
|
|||
:returns: :class:`Command` with RowView list result
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def lr_get(self, router):
|
||||
"""Get logical router for 'router'
|
||||
|
||||
:returns: :class:`Command` with RowView result
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def lrp_add(self, router, port, mac, networks, peer=None, may_exist=False,
|
||||
**columns):
|
||||
|
|
|
@ -551,6 +551,10 @@ class LrListCommand(cmd.BaseCommand):
|
|||
r in self.api.tables['Logical_Router'].rows.values()]
|
||||
|
||||
|
||||
class LrGetCommand(cmd.BaseGetRowCommand):
|
||||
table = 'Logical_Router'
|
||||
|
||||
|
||||
class LrpAddCommand(cmd.BaseCommand):
|
||||
def __init__(self, api, router, port, mac, networks,
|
||||
peer=None, may_exist=False, **columns):
|
||||
|
|
|
@ -133,6 +133,9 @@ class OvnNbApiIdlImpl(ovs_idl.Backend, api.API):
|
|||
def lr_list(self):
|
||||
return cmd.LrListCommand(self)
|
||||
|
||||
def lr_get(self, router):
|
||||
return cmd.LrGetCommand(self, router)
|
||||
|
||||
def lrp_add(self, router, port, mac, networks, peer=None, may_exist=False,
|
||||
**columns):
|
||||
return cmd.LrpAddCommand(self, router, port, mac, networks,
|
||||
|
|
Loading…
Reference in New Issue