diff --git a/test/infamy/restconf.py b/test/infamy/restconf.py index b1ebeed1..67e1d1e0 100644 --- a/test/infamy/restconf.py +++ b/test/infamy/restconf.py @@ -119,6 +119,7 @@ class Device(Transport): self.name = name self.location = location + self.mapping = mapping self.url_base = f"https://[{location.host}]:{location.port}" self.restconf_url = f"{self.url_base}/restconf" self.yang_url = f"{self.url_base}/yang" diff --git a/test/infamy/transport.py b/test/infamy/transport.py index 3c754a94..922a9de2 100644 --- a/test/infamy/transport.py +++ b/test/infamy/transport.py @@ -55,6 +55,9 @@ class Transport(ABC): def call_action(self, xpath): pass + def __getitem__(self, key): + return self.mapping[key] + def get_iface(self, name): """Fetch target dict for iface and extract param from JSON""" content = self.get_data(infamy.iface.get_xpath(name))