4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 Documentation Library providing keywords for CRUD operations over Network Slice Templates with OSM client.
19 Library OperatingSystem
23 ${SUCCESS_RETURN_CODE} 0
24 ${NST_DELETE_MAX_WAIT_TIME} 1min
25 ${NST_DELETE_POL_TIME} 15sec
30 [Documentation] Get the list of Network Slice Templates (NST) and log it.
31 ${rc} ${stdout}= Run And Return Rc And Output osm netslice-template-list
34 Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE}
37 [Documentation] Upload a Network Slice Template (NST) to OSM and return the id.
39 ${rc} ${stdout}= Run And Return Rc And Output osm netslice-template-create ${nst}
41 Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE}
45 [Documentation] Delete a Network Slice Template (NST) from OSM.
47 ${rc} ${stdout}= Run And Return Rc And Output osm netslice-template-delete ${nst_id}
49 Should Be Equal As Integers ${rc} ${SUCCESS_RETURN_CODE}
50 Wait Until Keyword Succeeds ${NST_DELETE_MAX_WAIT_TIME} ${NST_DELETE_POL_TIME} Check For NST ${nst_id}
53 [Documentation] Check that a Network Slice Template (NST) exists in OSM.
55 ${rc} ${stdout}= Run And Return Rc And Output osm netslice-template-list | awk '{print $2}' | grep ${nst_id}
57 Should Not Be Equal As Strings ${stdout} ${nst_id}