1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
14 ${success_return_code} 0
19 [Arguments] ${user_name} ${user_password}
21 Should Not Be Empty ${user_name}
22 Should Not Be Empty ${user_password}
23 ${rc} ${stdout}= Run and Return RC and Output osm user-create ${user_name} --password ${user_password}
25 Should Be Equal As Integers ${rc} ${success_return_code}
30 [Arguments] ${user_name} ${project_name} ${role_name}
32 Should Not Be Empty ${user_name}
33 Should Not Be Empty ${project_name}
34 Should Not Be Empty ${role_name}
35 ${rc} ${stdout}= Run and Return RC and Output osm user-update --add-project-role '${project_name},${role_name}' ${user_name}
37 Should Be Equal As Integers ${rc} ${success_return_code}
41 [Arguments] ${user_name}
43 Should Not Be Empty ${user_name}
44 ${rc} ${stdout}= Run And Return RC And Output osm user-list | awk 'NR>3 {print $2}' | grep "${user_name}"
46 Should Be Equal As Integers ${rc} ${success_return_code}
50 [Arguments] ${user_name}
52 ${rc} ${stdout}= Run and Return RC and Output osm user-delete ${user_name}
54 Should Be Equal As Integers ${rc} ${success_return_code}