Skip to content

Commit

Permalink
Add test to se that it is possible to get all operational data
Browse files Browse the repository at this point in the history
Unlikley to fail though.
  • Loading branch information
mattiaswal authored and wkz committed Jan 27, 2024
1 parent 0aeae9d commit 051658d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/case/all.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
- case: meta/wait.py

- name: Misc tests
suite: misc/all.yaml

- name: ietf-system
suite: ietf_system/all.yaml

Expand Down
2 changes: 2 additions & 0 deletions test/case/misc/all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
- case: operational_all.py
16 changes: 16 additions & 0 deletions test/case/misc/operational_all.py
Original file line number Diff line number Diff line change
@@ -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()
2 changes: 1 addition & 1 deletion test/infamy/netconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def get_dict(self, xpath,as_xml=False):
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)
Expand Down

0 comments on commit 051658d

Please sign in to comment.