[VOL-4095] Updated keyword Get Bandwidth Profile Name For Given Subscriber to also use Service Type as input
Change-Id: I9c082dd7bcf96bac218cf608ff1c38fa8fca8110
diff --git a/libraries/utils.robot b/libraries/utils.robot
index 6680a34..20437c0 100755
--- a/libraries/utils.robot
+++ b/libraries/utils.robot
@@ -1189,9 +1189,15 @@
[return] ${output}
Get Bandwidth Profile Name For Given Subscriber
- [Arguments] ${subscriber_id} ${stream_type}=upstreamBandwidthProfile
+ [Arguments] ${subscriber_id} ${stream_type}=upstreamBandwidthProfile ${service_type}=${EMPTY}
[Documentation] Keyword to get the bandwidth details of the given subscriber
- ${bandwidth_profile_output}= Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ${service_type_upper}= Run Keyword If '${service_type}' != '${EMPTY}'
+ ... Convert To Upper Case ${service_type}
+ ${bandwidth_profile_output}= Run Keyword If '${service_type}' != '${EMPTY}'
+ ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
+ ... volt-programmed-subscribers | grep ${subscriber_id} | grep '${service_type_upper}'
+ ... ELSE
+ ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
... volt-programmed-subscribers | grep ${subscriber_id}
@{bandwidth_profile_array}= Split String ${bandwidth_profile_output} ,
Log ${bandwidth_profile_array}