diff options
Diffstat (limited to 'ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test')
7 files changed, 0 insertions, 107 deletions
diff --git a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/aface.xml b/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/aface.xml deleted file mode 100644 index e1452f722..000000000 --- a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/aface.xml +++ /dev/null @@ -1,7 +0,0 @@ -<face-ip-add xmlns="urn:sysrepo:hicn"> - <lip4>192.168.20.10</lip4> - <lip6>-1</lip6> - <rip4>192.168.100.1</rip4> - <rip6>-1</rip6> - <swif>0</swif> -</face-ip-add> diff --git a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/apunt.xml b/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/apunt.xml deleted file mode 100644 index b7fa8b741..000000000 --- a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/apunt.xml +++ /dev/null @@ -1,6 +0,0 @@ -<punting-add xmlns="urn:sysrepo:hicn"> - <ip4>192.168.0.1</ip4> - <ip6>-1</ip6> - <len>24</len> - <swif>0</swif> -</punting-add> diff --git a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/aroute.xml b/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/aroute.xml deleted file mode 100644 index 9997452b9..000000000 --- a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/aroute.xml +++ /dev/null @@ -1,13 +0,0 @@ -<route-nhops-add xmlns="urn:sysrepo:hicn"> - <ip4>192.168.1.1</ip4> - <ip6>-1</ip6> - <len>24</len> - <face_ids0>0</face_ids0> - <face_ids1>0</face_ids1> - <face_ids2>0</face_ids2> - <face_ids3>0</face_ids3> - <face_ids4>0</face_ids4> - <face_ids5>0</face_ids5> - <face_ids6>0</face_ids6> - <n_faces>1</n_faces> -</route-nhops-add> diff --git a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/dface.xml b/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/dface.xml deleted file mode 100644 index 07a9488a9..000000000 --- a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/dface.xml +++ /dev/null @@ -1,3 +0,0 @@ -<face-ip-del xmlns="urn:sysrepo:hicn"> - <faceid>0</faceid> -</face-ip-del> diff --git a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/dpunt.xml b/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/dpunt.xml deleted file mode 100644 index 72d5c3c88..000000000 --- a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/dpunt.xml +++ /dev/null @@ -1,6 +0,0 @@ -<punting-del xmlns="urn:sysrepo:hicn"> - <ip4>192.168.0.1</ip4> - <ip6>-1</ip6> - <len>24</len> - <swif>0</swif> -</punting-del> diff --git a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/droute.xml b/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/droute.xml deleted file mode 100644 index ded28eecf..000000000 --- a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/droute.xml +++ /dev/null @@ -1,6 +0,0 @@ -<route-nhops-del xmlns="urn:sysrepo:hicn"> - <ip4>192.168.1.1</ip4> - <ip6>-1</ip6> - <len>24</len> - <faceid>0</faceid> -</route-nhops-del> diff --git a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/test.py b/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/test.py deleted file mode 100755 index 7c6163521..000000000 --- a/ctrl/sysrepo-plugins/hicn-plugin/test/netconf-test/test.py +++ /dev/null @@ -1,66 +0,0 @@ -import sys -import xml.etree.ElementTree as ET -from netconf.client import connect_ssh - -def usage(): - print('usage: test.py host user password operation{route_dump, face_dump, face_add, route_add, punt_add, face_del, punt_del, route_del}') - -def test(host,user,password,operation): - with connect_ssh(host, 830, user, password) as session: - if (operation=='face_dump'): - config = session.get() - for root in config: - if root.tag=="{urn:sysrepo:hicn}hicn-state": - for entity in root: - if entity.tag=="{urn:sysrepo:hicn}faces": - print('Faces') - for face in entity: - for elem in face: - print(elem.tag +" : "+ elem.text) - elif (operation=='state_dump'): - config = session.get() - for root in config: - if root.tag=="{urn:sysrepo:hicn}hicn-state": - for entity in root: - if entity.tag=="{urn:sysrepo:hicn}states": - print('States') - for state in entity: - print(state.tag +" : "+ state.text) - elif (operation=='route_dump'): - config = session.get() - for root in config: - if root.tag=="{urn:sysrepo:hicn}hicn-state": - for entity in root: - if entity.tag=="{urn:sysrepo:hicn}routes": - print('Routes') - for route in entity: - for elem in route: - print(elem.tag +" : "+ elem.text) - elif(operation=='face_add'): - root = ET.parse('aface.xml').getroot() - session.send_rpc(ET.tostring(root, encoding='utf8').decode('utf8')) - elif(operation=='punt_add'): - root = ET.parse('apunt.xml').getroot() - session.send_rpc(ET.tostring(root, encoding='utf8').decode('utf8')) - elif(operation=='route_add'): - root = ET.parse('aroute.xml').getroot() - session.send_rpc(ET.tostring(root, encoding='utf8').decode('utf8')) - elif(operation=='face_del'): - root = ET.parse('dface.xml').getroot() - session.send_rpc(ET.tostring(root, encoding='utf8').decode('utf8')) - elif(operation=='punt_del'): - root = ET.parse('dpunt.xml').getroot() - session.send_rpc(ET.tostring(root, encoding='utf8').decode('utf8')) - elif(operation=='route_del'): - root = ET.parse('droute.xml').getroot() - session.send_rpc(ET.tostring(root, encoding='utf8').decode('utf8')) - else: - usage() - -if __name__ == '__main__': - if(len(sys.argv)<4): - usage() - else: - test(sys.argv[1],sys.argv[2],sys.argv[3],sys.argv[4]) - - |