[VOL-3490] Checking number of ONOS instances prior to HA test

Change-Id: I2445a8d7e5f472a08770fca5efcf546e7d837298
diff --git a/libraries/k8s.robot b/libraries/k8s.robot
index 5d8eb5a..09db866 100755
--- a/libraries/k8s.robot
+++ b/libraries/k8s.robot
@@ -400,3 +400,10 @@
     ${rc}    ${count}    Run and Return Rc and Output
     ...    kubectl -n ${namespace} get pods -l ${key}=${value} -o json | jq -r ".items[].status.phase" | wc -l
     Should Be Equal as Integers    ${count}    ${number}
+
+Get Number of Running Pods Number By Label
+    [Arguments]    ${namespace}    ${key}    ${value}
+    [Documentation]   Returns the number of pods for a given label
+    ${rc}    ${count}    Run and Return Rc and Output
+    ...    kubectl -n ${namespace} get pods -l ${key}=${value} -o name | wc -l
+    [Return]    ${count}