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 Documentation Library to deploy and delete OSM repos.
18 ${success_return_code} 0
22 ${rc} ${stdout}= Run and Return RC and Output osm repo-list
24 Should Be Equal As Integers ${rc} ${success_return_code}
28 [Arguments] ${repo_name} ${repo_uri} ${repo_type} ${user} ${password} ${additional_options}=""
30 ${user_attr} Set Variable If '${user}'!='${EMPTY}' --user ${user} \
31 ${password_attr} Set Variable If '${password}'!='${EMPTY}' --password ${password} \
33 ${rc} ${stdout}= Run and Return RC and Output osm repo-add --type ${repo_type} ${user_attr} ${password_attr} ${additional_options} ${repo_name} ${repo_uri}
35 Should Be Equal As Integers ${rc} ${success_return_code}
40 [Arguments] ${repo_id}
42 ${rc} ${stdout}= Run Keyword And Continue On Failure Run and Return RC and Output osm repo-delete ${repo_id}
43 Should Be Equal As Integers ${rc} ${success_return_code}
45 WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NSD ${repo_id}
49 [Arguments] ${repo_id}
51 ${rc} ${stdout}= Run and Return RC and Output osm repo-list | awk '{print $2}' | grep ${repo_id}
52 Should Not Be Equal As Strings ${stdout} ${repo_id}