Adds Robot test BASIC-15 for RBAC configurations

Change-Id: Ia907f795dc735eff64cab3027885a8363bf815d8
Signed-off-by: garciaale <agarcia@whitestack.com>
(cherry picked from commit dce1fa815ef9b08b39cf878f13445898c262764c)
diff --git a/robot-systest/lib/user_lib.robot b/robot-systest/lib/user_lib.robot
new file mode 100644
index 0000000..8047c33
--- /dev/null
+++ b/robot-systest/lib/user_lib.robot
@@ -0,0 +1,54 @@
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+*** Variables ***
+${success_return_code}   0
+
+
+*** Keywords ***
+Create User
+    [Arguments]   ${user_name}   ${user_password}
+
+    Should Not Be Empty   ${user_name}
+    Should Not Be Empty   ${user_password}
+    ${rc}   ${stdout}=   Run and Return RC and Output   osm user-create ${user_name} --password ${user_password}
+    Log   ${stdout}
+    Should Be Equal As Integers   ${rc}   ${success_return_code}
+    [Return]  ${stdout}
+
+
+Update User Role
+    [Arguments]   ${user_name}   ${project_name}   ${role_name}
+
+    Should Not Be Empty   ${user_name}
+    Should Not Be Empty   ${project_name}
+    Should Not Be Empty   ${role_name}
+    ${rc}   ${stdout}=   Run and Return RC and Output   osm user-update --add-project-role '${project_name},${role_name}' ${user_name}
+    Log   ${stdout}
+    Should Be Equal As Integers   ${rc}   ${success_return_code}
+
+
+Check If User Exists
+    [Arguments]  ${user_name}
+
+    Should Not Be Empty   ${user_name}
+    ${rc}   ${stdout}=   Run And Return RC And Output   osm user-list | awk 'NR>3 {print $2}' | grep "${user_name}"
+    Log   ${stdout}
+    Should Be Equal As Integers   ${rc}   ${success_return_code}
+
+
+Delete User
+    [Arguments]  ${user_name}
+
+    ${rc}   ${stdout}=   Run and Return RC and Output   osm user-delete ${user_name}
+    Log   ${stdout}
+    Should Be Equal As Integers   ${rc}   ${success_return_code}