blob: 6fac72926e109d877b44850a2657d86ee7bb08ff [file] [log] [blame]
Felipe Vicensf96bb452020-06-22 08:12:30 +02001# Copyright 2020 Atos
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15*** Variables ***
16${success_return_code} 0
17${ns_launch_max_wait_time} 5min
18${ns_launch_pol_time} 30sec
19${ns_delete_max_wait_time} 1min
20${ns_delete_pol_time} 15sec
21
22*** Keywords ***
23Get NST List
24 ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-list
garciadeblas321726f2022-12-21 11:43:06 +010025 Log ${stdout}
26 Log ${rc}
Felipe Vicensf96bb452020-06-22 08:12:30 +020027 Should Be Equal As Integers ${rc} ${success_return_code}
28
29
30Create NST
31 [Arguments] ${nst}
32
33 ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-create ${nst}
garciadeblas321726f2022-12-21 11:43:06 +010034 Log ${stdout}
Felipe Vicensf96bb452020-06-22 08:12:30 +020035 Should Be Equal As Integers ${rc} ${success_return_code}
garciadeblasf4ebaa82022-06-23 13:33:26 +020036 [Return] ${stdout}
Felipe Vicensf96bb452020-06-22 08:12:30 +020037
38
39Delete NST
40 [Arguments] ${nst_id}
41
42 ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-delete ${nst_id}
garciadeblas321726f2022-12-21 11:43:06 +010043 Log ${stdout}
Felipe Vicensf96bb452020-06-22 08:12:30 +020044 Should Be Equal As Integers ${rc} ${success_return_code}
45 WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NST ${nst_id}
46
47
48Check For NST
49 [Arguments] ${nst_id}
50
51 ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-list | awk '{print $2}' | grep ${nst_id}
52 Should Not Be Equal As Strings ${stdout} ${nst_id}
53