mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-01 13:23:01 +02:00
test/infamy: save location data for Device and add address() method
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -89,6 +89,7 @@ class Device(object):
|
||||
yangdir: None | str = None,
|
||||
factory_default = True):
|
||||
|
||||
self.location = location
|
||||
self.mapping = mapping
|
||||
self.location = location
|
||||
self.ly = libyang.Context(yangdir)
|
||||
@@ -182,6 +183,10 @@ class Device(object):
|
||||
return list(filter(lambda m: m["name"] in modnames,
|
||||
self.modules.values()))
|
||||
|
||||
def address(self):
|
||||
"""Return managment IP address used for NETCONF"""
|
||||
return self.location.host
|
||||
|
||||
def _ncc_make_rpc(self, guts, msg_id=None):
|
||||
if not msg_id:
|
||||
msg_id = uuid.uuid4()
|
||||
|
||||
Reference in New Issue
Block a user