[VOL-4155] Added keyword to wait for a particular device to be recognized as an OLT in ONOS, needed in the multi-stack scale test

Change-Id: I6d2442b24d55af489b1c4847a21d82cee31cdb4a
diff --git a/libraries/onos.robot b/libraries/onos.robot
index f2e7a27..1e2fd57 100755
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -624,18 +624,33 @@
 
 Assert Olts in ONOS
     [Arguments]    ${onos_ssh_connection}     ${count}
-    [Documentation]    Check that a certain number of olts are known to ONOS
+    [Documentation]    DEPRECATED use Assert Olt in ONOS
+    ...     Check that a certain number of olts are known to ONOS
     ${olts}=    Execute ONOS CLI Command on open connection     ${onos_ssh_connection}
-        ...    volt-olts | wc -l
+    ...    volt-olts | wc -l
     Log     Found ${olts} of ${count} expected Olts
     Should Be Equal As Integers    ${olts}    ${count}
 
+Assert Olt in ONOS
+    [Arguments]    ${onos_ssh_connection}     ${deviceId}
+    [Documentation]    Check that a particular olt is known to ONOS
+    ${olts}=    Execute ONOS CLI Command on open connection     ${onos_ssh_connection}
+    ...    volt-olts | grep ${deviceId} | wc -l
+    Should Be Equal As Integers    ${olts}    1   "Device ${deviceId} is not recognized as an OLT"
+
 Wait for Olts in ONOS
     [Arguments]    ${onos_ssh_connection}    ${count}   ${max_wait_time}=10m
-    [Documentation]    Waits untill a certain number of ports are enabled in ONOS for a particular deviceId
+    [Documentation]    DEPRECATED use Wait for Olt in ONOS
+    ...     Waits untill a certain number of ports are enabled in ONOS for a particular deviceId
     Wait Until Keyword Succeeds     ${max_wait_time}     5s      Assert Olts in ONOS
     ...     ${onos_ssh_connection}     ${count}
 
+Wait for Olt in ONOS
+    [Arguments]    ${onos_ssh_connection}    ${deviceId}   ${max_wait_time}=10m
+    [Documentation]    Waits until a particular deviceId is recognized by ONOS as an OLT
+    Wait Until Keyword Succeeds     ${max_wait_time}     5s      Assert Olt in ONOS
+    ...     ${onos_ssh_connection}     ${deviceId}
+
 Assert Ports in ONOS
     [Arguments]    ${onos_ssh_connection}     ${count}     ${deviceId}    ${filter}
     [Documentation]    Check that a certain number of ports are enabled in ONOS