Added point-to-point installation driver
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index f7f4ef4..109a3b2 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -715,6 +715,54 @@
main.cleanup()
main.exit()
+ def add_point_intent(self, ingress_device, port_ingress,
+ egress_device, port_egress):
+ '''
+ Required:
+ * ingress_device: device id of ingress device
+ * egress_device: device id of egress device
+ Description:
+ Adds a point-to-point intent (uni-directional) by
+ specifying device id's
+
+ NOTE: This function may change depending on the
+ options developers provide for point-to-point
+ intent via cli
+ '''
+ try:
+ self.handle.sendline("")
+ self.handle.expect("onos>")
+
+ self.handle.sendline("add-point-intent "+
+ str(ingress_device) + "/" + str(port_ingress) + " " +
+ str(egress_device) + "/" + str(port_egress))
+ i = self.handle.expect([
+ "Error",
+ "onos>"])
+
+ self.handle.sendline("")
+ self.handle.expect("onos>")
+
+ handle = self.handle.before
+
+ if i == 0:
+ main.log.error("Error in adding point-to-point intent")
+ return handle
+ else:
+ return main.TRUE
+
+ except pexpect.EOF:
+ main.log.error(self.name + ": EOF exception found")
+ main.log.error(self.name + ": " + self.handle.before)
+ main.cleanup()
+ main.exit()
+ except:
+ main.log.info(self.name+" ::::::")
+ main.log.error( traceback.print_exc())
+ main.log.info(self.name+" ::::::")
+ main.cleanup()
+ main.exit()
+
def remove_intent(self, intent_id):
'''
Remove intent for specified intent id
diff --git a/TestON/tests/ONOSNextTest/ONOSNextTest.py b/TestON/tests/ONOSNextTest/ONOSNextTest.py
index 77847fd..f01446c 100755
--- a/TestON/tests/ONOSNextTest/ONOSNextTest.py
+++ b/TestON/tests/ONOSNextTest/ONOSNextTest.py
@@ -38,8 +38,8 @@
"10.128.20.11")
main.step("Applying cell variable to environment")
- #cell_result = main.ONOSbench.set_cell(cell_name)
- cell_result = main.ONOSbench.set_cell("temp_cell_2")
+ cell_result = main.ONOSbench.set_cell(cell_name)
+ #cell_result = main.ONOSbench.set_cell("temp_cell_2")
verify_result = main.ONOSbench.verify_cell()
main.step("Git checkout and pull master")
@@ -297,6 +297,15 @@
main.log.info(get_intent_result)
#***************************************
+ #Sample steps to add point-to-point intents*
+ main.step("Add point-to-point intents")
+ ptp_intent_result = main.ONOScli.add_point_intent(
+ devices_id_list[0], 1, devices_id_list[1], 2)
+ if ptp_intent_result == main.TRUE:
+ get_intent_result = main.ONOScli.intents()
+ main.log.info("Point to point intent install successful")
+ main.log.info(get_intent_result)
+ #*******************************************
######
#jhall@onlab.us