Getting KV Store Prefix
Change-Id: I27f989c2c8f647c0c30624a298059ff436c707af
diff --git a/libraries/voltha.robot b/libraries/voltha.robot
old mode 100644
new mode 100755
index 1d7ba1e..c468d43
--- a/libraries/voltha.robot
+++ b/libraries/voltha.robot
@@ -53,3 +53,12 @@
Should Be Equal as Integers ${rc} 0
Run Keyword If '${pid}' != '' Run And Return Rc kill -9 ${pid}
Should Be Equal as Integers ${rc} 0
+
+Get Kv Store Prefix
+ [Documentation] This keyword delivers the KV Store Prefix read from environment variable KVSTOREPREFIX if present.
+ [Arguments] ${defaultkvstoreprefix}=voltha_voltha
+ ${kv_store_prefix}= Get Environment Variable KVSTOREPREFIX default=${defaultkvstoreprefix}
+ # while Get Environment Variable does not work correctly, a manual correction follows
+ ${kv_store_prefix}= Set Variable If "${kv_store_prefix}"=="${EMPTY}" ${defaultkvstoreprefix} ${kv_store_prefix}
+ [Return] ${kv_store_prefix}
+