1 # Copyright (c) 2019 AT&T Intellectual Property.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 Documentation Tests for the UE Event Collector XApp
18 Resource /robot/resources/global_properties.robot
20 Resource /robot/resources/o1mediator/o1mediator_interface.robot
21 Resource /robot/resources/ric/ric_utils.robot
27 Library KubernetesEntity ${GLOBAL_RICPLT_NAMESPACE}
30 ${sessionPfx} = nanobot-O1
33 O1 Mediator Should Be Available
34 [Tags] etetests o1mediatortests
35 ${c} = Get From Dictionary ${GLOBAL_RICPLT_COMPONENTS} o1mediator
36 ${ctrl} ${o1} = Split String ${c} |
37 ${deploy} = Run Keyword ${ctrl} ${o1}
38 Component Should Be Ready ${deploy}
40 Connect To O1 Mediator
41 [tags] etetests o1mediatortests
42 ${sessionGensym} = Generate Random String
43 ${O1Session} = Set Variable ${sessionPfx}-${sessionGensym}
44 Set Suite Variable ${O1Session}
45 Set Suite Variable ${O1Session}
46 ${status} = Establish O1 Session
47 ... ${GLOBAL_O1MEDIATOR_USER}
48 ... ${GLOBAL_O1MEDIATOR_PASSWORD}
50 ... ${GLOBAL_O1MEDIATOR_HOST}
51 ... ${GLOBAL_O1MEDIATOR_PORT}
52 Should Be True ${status}
55 [tags] etetests o1mediatortests
56 ${conf} = Retrieve O1 State ${O1Session}
57 # just going to let this bail at a lower layer if
58 # the Get fails. Might be better to look for ric stuff
59 # in the active modules, though.
60 ${confXML} = Element To String ${conf}
63 [tags] etetests o1mediatortests intrusive
64 Deploy An XApp Using O1 ${O1Session}
65 ... ${GLOBAL_O1MEDIATOR_TARGET_XAPP}
66 ... ${GLOBAL_O1MEDIATOR_XAPP_VERSION}
68 XApp Should Be Running
69 [tags] etetests o1mediatortests
70 Wait For Deployment ${GLOBAL_XAPP_NAMESPACE}-${GLOBAL_O1MEDIATOR_TARGET_XAPP}
71 ... timeout=${GLOBAL_O1MEDIATOR_DEPLOYMENT_WAIT}
72 ... namespace=${GLOBAL_XAPP_NAMESPACE}
75 [tags] etetests o1mediatortests intrusive
76 Remove An XApp Using O1 ${O1Session}
77 ... ${GLOBAL_O1MEDIATOR_TARGET_XAPP}
78 ... ${GLOBAL_O1MEDIATOR_XAPP_VERSION}
80 XApp Should Not Be Running
81 [tags] etetests o1mediatortests
82 ${status} ${deploy} = Run Keyword And Ignore Error
83 ... Deployment ${GLOBAL_XAPP_NAMESPACE}-${GLOBAL_O1MEDIATOR_TARGET_XAPP}
84 ${status} = Run Keyword If '${status}' == 'PASS'
85 ... Most Recent Availablity Condition @{deploy.status.conditions}
87 ... Set Variable False
88 Should Be Equal As Strings '${status}' 'False'
91 [tags] etetests o1mediatortests
92 Close O1 Session ${O1Session}