This substitutes the VethDevice's peer_name property that was explicitly
forbidden in previous patch.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Devices/RemoteDevice.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lnst/Devices/RemoteDevice.py b/lnst/Devices/RemoteDevice.py
index b13541d4..3d964162 100644
--- a/lnst/Devices/RemoteDevice.py
+++ b/lnst/Devices/RemoteDevice.py
@@ -110,6 +110,13 @@ class RemoteDevice(object):
peer_device = self._machine._find_device_in_any_namespace(peer_if_id,
self.ifindex)
return peer_device
+ @property
+ def peer_name(self):
+ if self.peer:
+ return self.peer.name
+
+ return None
+
def __dir__(self):
return dir(self._dev_cls)
--
2.26.3