[VOL-3436] Basic ONOS HA Test

Change-Id: Ie9e605a14ea28f62286b148fb6d62c5bd91566cb
diff --git a/libraries/onos.robot b/libraries/onos.robot
index 11aa85d..6cc30a4 100755
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -130,6 +130,15 @@
     Should Be True    ${matched}    No fabric switch found
     [Return]    ${of_id}
 
+Get Master Instace in ONOS
+    [Arguments]    ${of_id}
+    [Documentation]    Returns nodeId of the Master instace for a giver device in ONOS
+    ${resp}=    Get Request    ONOS    onos/v1/mastership/${of_id}/master
+    ${jsondata}=    To Json    ${resp.content}
+    Should Not Be Empty    ${jsondata['nodeId']}
+    ${master_node}=    Get From Dictionary    ${jsondata}    nodeId
+    [Return]    ${master_node}
+
 Verify Subscriber Access Flows Added for ONU
     [Arguments]    ${ip}    ${port}    ${olt_of_id}    ${onu_port}    ${nni_port}    ${c_tag}    ${s_tag}
     [Documentation]    Verifies if the Subscriber Access Flows are added in ONOS for the ONU