Add test to se that it is possible to get all operational data

Unlikley to fail though.
This commit is contained in:
Mattias Walström
2024-01-27 23:56:31 +01:00
committed by Tobias Waldekranz
parent 0aeae9d8e8
commit 051658d36a
4 changed files with 22 additions and 1 deletions
+3
View File
@@ -1,6 +1,9 @@
---
- case: meta/wait.py
- name: Misc tests
suite: misc/all.yaml
- name: ietf-system
suite: ietf_system/all.yaml
+2
View File
@@ -0,0 +1,2 @@
---
- case: operational_all.py
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# Test that it is possible to get all operational data
import infamy
import infamy.iface as iface
with infamy.Test() as test:
with test.step("Initialize"):
env = infamy.Env(infamy.std_topology("1x1"))
target = env.attach("target", "mgmt")
with test.step("Get all Operational data"):
target.get_data(as_xml=True)
test.succeed()
+1 -1
View File
@@ -209,7 +209,7 @@ class Device(object):
else:
return self.get(xpath).print_dict()
def get_data(self, xpath, as_xml=False):
def get_data(self, xpath=None, as_xml=False):
"""RPC <get-data> to fetch operational data"""
if(as_xml):
return self._get_data(xpath,as_xml)