Repository navigation
Expand file tree
/
Copy pathcommon.robot
More file actions
176 lines (141 loc) · 6.7 KB
/
Copy pathcommon.robot
File metadata and controls
176 lines (141 loc) · 6.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# SPDX-License-Identifier: LicenseRef-CSSL-1.0
# ---------------------------------------------------------------------
*** Settings ***
Library Process
Library CNTestLib.py
Library GNBSimTestLib.py
Library RfSimLib.py
Variables vars.py
# This file is intended to define common robot framework keywords that are used in many tests and suites
*** Variables ***
*** Keywords ***
Launch NRF CN with PCF
@{list} = Create List oai-amf oai-smf oai-udm oai-nrf oai-udr oai-ausf mysql oai-ext-dn oai-upf oai-pcf
Prepare Scenario ${list} nrf-cn-pcf
@{replace_list} = Create List smf support_features use_local_pcc_rules
Replace In Config ${replace_list} no
Start Trace core_network
Start CN
Check Core Network Health Status
Launch NRF CN with PCF HTTP1
@{list} = Create List oai-amf oai-smf oai-udm oai-nrf oai-udr oai-ausf mysql oai-ext-dn oai-upf oai-pcf
Prepare Scenario ${list} nrf-cn-pcf
@{replace_list} = Create List smf support_features use_local_pcc_rules
Replace In Config ${replace_list} no
@{replace_list} = Create List smf support_features use_local_subscription_info
Replace In Config ${replace_list} no
@{replace_list} = Create List http_version
Replace In Config ${replace_list} 1
Start Trace core_network
Start CN
Check Core Network Health Status
Launch NRF CN For QoS
@{list} = Create List oai-amf oai-smf oai-udm oai-nrf oai-udr oai-ausf mysql oai-ext-dn oai-ext-dn-2 oai-ext-dn-3 oai-upf oai-pcf
Prepare Scenario ${list} nrf-cn-qos
@{replace_list} = Create List smf support_features use_local_pcc_rules
Replace In Config ${replace_list} no
Start Trace core_network
Start CN
Check Core Network Health Status
Launch NRF CN
@{list} = Create List oai-amf oai-smf oai-udm oai-nrf oai-udr oai-ausf mysql oai-ext-dn oai-upf
Prepare Scenario ${list} nrf-cn
Start Trace core_network
Start CN
Check Core Network Health Status
Launch Non NRF CN
@{list} = Create List oai-amf oai-smf oai-udm oai-udr oai-ausf mysql oai-ext-dn oai-upf
Prepare Scenario ${list} nonnrf-cn
Deactive NF Registration In CN Config
Start Trace core_network
Start CN
Check Core Network Health Status
Launch EBPF CN
@{list} = Create List oai-amf oai-smf oai-udm oai-nrf oai-udr oai-ausf mysql oai-ext-dn-ebpf oai-upf-ebpf
Prepare Scenario ${list} nrf-cn-ebpf
@{replace_list} = Create List nfs upf
Replace In Config ${replace_list} ${ebf_upf_config}
@{replace_list} = Create List upf support_features enable_bpf_datapath
Replace In Config ${replace_list} yes
@{replace_list} = Create List upf remote_n6_gw
Replace In Config ${replace_list} oai-ext-dn-ebpf
# TODO because of NRF issue #4, we need this dependency
Add Dependency oai-upf-ebpf oai-smf
Start Trace core_network
Start CN
Check Core Network Health Status
Launch Northbound Test CN
@{list} = Create List oai-amf oai-smf oai-udm oai-nrf oai-udr oai-ausf mysql oai-ext-dn vpp-upf
Prepare Scenario ${list} Northbound
@{replace_list} = Create List http_version
Replace In Config ${replace_list} ${1}
@{replace_list} = Create List smf upfs ${0} host
Replace In Config ${replace_list} vpp-upf.node.5gcn.mnc95.mcc208.3gppnetwork.org
@{replace_list} = Create List amf supported_encryption_algorithms ${0}
Replace In Config ${replace_list} NEA2
@{replace_list} = Create List amf supported_integrity_algorithms ${0}
Replace In Config ${replace_list} NIA2
@{replace_list} = Create List smf upfs ${0} config enable_usage_reporting
Replace In Config ${replace_list} yes
Start Trace core_network
Start CN
Check Core Network Health Status
Prepare RAN ${1} ${3}
${replace_list} = Create List ulsch_max_frame_inactivity
Replace In gNB Config ${replace_list} None delete
${replace_list} = Create List amf_ip_address
Replace In gNB Config ${replace_list} ({ipv4 = "192.168.79.132"}) replace
${replace_list} = Create List GNB_IPV4_ADDRESS_FOR_NG_AMF
Replace In gNB Config ${replace_list} "192.168.79.140" replace
${replace_list} = Create List GNB_IPV4_ADDRESS_FOR_NGU
Replace In gNB Config ${replace_list} "192.168.80.140" replace
${replace_list} = Create List GNB_INTERFACE_NAME_FOR_NGU
Replace In gNB Config ${replace_list} None delete
${replace_list} = Create List GNB_INTERFACE_NAME_FOR_NG_AMF
Replace In gNB Config ${replace_list} None delete
${replace_list} = Create List tracking_area_code
Replace In gNB Config ${replace_list} 0xa000 replace
Suite Teardown Default
Stop Cn
Collect All Logs
Stop Trace core_network
Down Cn
${docu}= Create Cn Documentation
Set Suite Documentation ${docu} append=${TRUE}
${gnbsim_docu} = Create Gnbsim Docu
Set Suite Documentation ${gnbsim_docu} append=${TRUE}
Check Core Network Health Status
Wait Until Keyword Succeeds 60s 1s Check CN Health Status
Check RAN Elements Health Status
Wait Until Keyword Succeeds 60s 1s Check RAN Health Status
Wait and Verify Iperf3 Result
[Arguments] ${container} ${mbits}=50
Wait Until Keyword Succeeds 60s 1s Iperf3 Is Finished ${container}
TRY
Iperf3 Results Should Be ${container} ${mbits}
EXCEPT AS ${error_message}
Log IPerf3 Results is wrong, ignored for now: ${error_message} level=ERROR
END
Wait and Verify Iperf3 Result Strict
[Arguments] ${container} ${mbits}=50
Wait Until Keyword Succeeds 60s 1s Iperf3 Is Finished ${container}
Iperf3 Results Should Be ${container} ${mbits}
Check gnbsim IP
[Arguments] ${gnbsim_name}
Wait Until Keyword Succeeds 30s 1s Check Gnbsim Ongoing ${gnbsim_name}
${ip} = Get Gnbsim Ip ${gnbsim_name} # to get the output we parse again
RETURN ${ip}
Deactive NF Registration in CN Config
@{replace_list} = Create List register_nf general
Replace In Config ${replace_list} no
@{replace_list} = Create List amf support_features_options enable_smf_selection
Replace In Config ${replace_list} no
Test Setup With Gnbsim
${gnbsim_name} = Prepare Gnbsim
Set Test Variable ${GNBSIM_IN_USE} ${gnbsim_name}
Start Trace ${TEST_NAME}
Test Teardown With Gnbsim
Stop Gnbsim ${GNBSIM_IN_USE}
Collect All Gnbsim Logs
Down Gnbsim ${GNBSIM_IN_USE}
Stop Trace ${TEST_NAME}