Cord vtn test cleanup to use OnosCtrl interface apis
Change-Id: I82ea08774649ae7eb6319a462f89ea9b2ac81b97
diff --git a/src/test/utils/OnosCtrl.py b/src/test/utils/OnosCtrl.py
index bd931a7..205a31e 100644
--- a/src/test/utils/OnosCtrl.py
+++ b/src/test/utils/OnosCtrl.py
@@ -111,6 +111,17 @@
return None
@classmethod
+ def get_links(cls, controller = None):
+ if controller is None:
+ controller = cls.controller
+ url = 'http://%s:8181/onos/v1/links' %(controller)
+ result = requests.get(url, auth = cls.auth)
+ if result.ok:
+ links = result.json()['links']
+ return links
+ return None
+
+ @classmethod
def get_device_id(cls, controller = None):
'''If running under olt, we get the first switch connected to onos'''
olt = OltConfig()