Rev 67 | Details | Compare with Previous | Last modification | View Log | SVN
Rev | Author | Line No. | Line |
---|---|---|---|
17 | pintar | 1 | /** |
63 | garciay | 2 | * @author STF 466 |
24 | rennoch | 3 | * @version $Id: DiameterS9_TestConfiguration.ttcn 74 2015-02-05 17:15:11Z pintar $ |
63 | garciay | 4 | * @desc This module provides test component configurations |
17 | pintar | 5 | * for DIAMETER tests. |
6 | */ |
||
7 | |||
8 | module DiameterS9_TestConfiguration |
||
9 | { |
||
10 | //LibCommon |
||
63 | garciay | 11 | import from LibCommon_Sync all; |
17 | pintar | 12 | import from LibCommon_VerdictControl {type FncRetCode; |
13 | function f_setVerdict;} |
||
63 | garciay | 14 | import from LibCommon_BasicTypesAndValues { type UInt }; |
17 | pintar | 15 | |
16 | //LibDiameter |
||
17 | import from LibDiameter_Interface all; |
||
18 | import from LibDiameter_PIXITS {modulepar PX_DIAM_LLP_ENABLED;}; |
||
63 | garciay | 19 | //AtsIms |
20 | import from DiameterS9_TestSystem all; |
||
21 | import from DiameterS9_PIXITS {modulepar PX_Gxsupport,PX_Gxxsupport;}; |
||
17 | pintar | 22 | |
63 | garciay | 23 | /* |
24 | ** @desc f_NrofComps returns the number of test components |
||
25 | ** based on the PIXIT value PX_Rxsupportt |
||
26 | */ |
||
27 | function f_NrofComps() return UInt |
||
28 | { if (PX_Gxsupport or PX_Gxxsupport) |
||
29 | { return 2 } |
||
30 | else |
||
31 | { return 1 } |
||
32 | }; |
||
33 | // end f_NrofComps |
||
17 | pintar | 34 | |
63 | garciay | 35 | group cfUp { |
17 | pintar | 36 | |
37 | /** |
||
38 | * |
||
39 | * @desc Creates test configuration of cf_1S9_vpcrf - H-PCRF is SUT |
||
63 | garciay | 40 | * @param p_diameterComponent_vpcrf v-pcrf component |
17 | pintar | 41 | */ |
28 | pintar | 42 | function f_cf_1S9_vpcrfUp(out DiameterComponent p_diameterComponent_vpcrf) |
74 | pintar | 43 | runs on DiameterS9 system TestAdapter |
17 | pintar | 44 | { |
45 | //Variables |
||
46 | var FncRetCode v_ret := e_success; |
||
47 | |||
48 | //Create |
||
49 | p_diameterComponent_vpcrf := DiameterComponent.create ; |
||
50 | |||
63 | garciay | 51 | // Connect mtc sync port |
52 | connect(self:syncPort, self:syncPort); |
||
53 | // Connect client sync port |
||
17 | pintar | 54 | connect(p_diameterComponent_vpcrf:syncPort, self:syncPort) ; |
55 | //Map |
||
56 | map(p_diameterComponent_vpcrf:DIAMP, system:V_PCRF_S9);// Diameter Init test Configuration |
||
63 | garciay | 57 | |
58 | activate(a_mtc_shutdown()); |
||
59 | |||
17 | pintar | 60 | f_setVerdict(v_ret); |
28 | pintar | 61 | }//end f_cf_1S9_vpcrfUp |
17 | pintar | 62 | |
63 | /** |
||
64 | * |
||
19 | pintar | 65 | * @desc Creates test configuration of CF_1S9_ - V-PCRF is SUT |
63 | garciay | 66 | * @param p_diameterComponent_hpcrf h-pcrf component |
17 | pintar | 67 | */ |
28 | pintar | 68 | function f_cf_1S9_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf) |
74 | pintar | 69 | runs on DiameterS9 system TestAdapter |
17 | pintar | 70 | { |
71 | //Variables |
||
72 | var FncRetCode v_ret := e_success; |
||
73 | |||
74 | //Create |
||
75 | p_diameterComponent_hpcrf := DiameterComponent.create ; |
||
76 | |||
63 | garciay | 77 | // Connect mtc sync port |
78 | connect(self:syncPort, self:syncPort); |
||
79 | // Connect client sync port |
||
17 | pintar | 80 | connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; |
81 | //Map |
||
82 | map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration |
||
74 | pintar | 83 | |
63 | garciay | 84 | activate(a_mtc_shutdown()); |
85 | |||
17 | pintar | 86 | f_setVerdict(v_ret); |
28 | pintar | 87 | }//end f_cf_1S9_hpcrfUp |
17 | pintar | 88 | |
89 | /** |
||
90 | * |
||
19 | pintar | 91 | * @desc Creates test configuration of CF_1S9_1Gx - V-PCRF is SUT |
63 | garciay | 92 | * @param p_diameterComponent_hpcrf h-pcef component |
93 | * @param p_diameterComponent_pcef pcef component |
||
17 | pintar | 94 | */ |
19 | pintar | 95 | function f_cf_1S9_1Gx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_pcef) |
74 | pintar | 96 | runs on DiameterS9 system TestAdapter |
17 | pintar | 97 | { |
98 | //Variables |
||
99 | var FncRetCode v_ret := e_success; |
||
100 | |||
101 | //Create |
||
102 | p_diameterComponent_hpcrf := DiameterComponent.create ; |
||
103 | if (PX_Gxsupport) { |
||
63 | garciay | 104 | p_diameterComponent_pcef := DiameterComponent.create ; |
17 | pintar | 105 | } |
63 | garciay | 106 | // Connect mtc sync port |
107 | connect(self:syncPort, self:syncPort); |
||
108 | // Connect client sync port |
||
17 | pintar | 109 | connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; |
110 | if (PX_Gxsupport) { |
||
63 | garciay | 111 | connect(p_diameterComponent_pcef:syncPort, self:syncPort) ; |
17 | pintar | 112 | } |
113 | //Map |
||
114 | map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration |
||
115 | if (PX_Gxsupport) { |
||
63 | garciay | 116 | map(p_diameterComponent_pcef:DIAMP, system:PCEF_Gx);// Diameter Init test Configuration |
17 | pintar | 117 | } |
74 | pintar | 118 | |
63 | garciay | 119 | activate(a_mtc_shutdown()); |
120 | |||
17 | pintar | 121 | f_setVerdict(v_ret); |
19 | pintar | 122 | }//end f_cf_1S9_1Gx_hpcrfUp |
17 | pintar | 123 | |
124 | /** |
||
125 | * |
||
19 | pintar | 126 | * @desc Creates test configuration of CF_1S9_1Gxx - V-PCRF is SUT |
17 | pintar | 127 | * @param p_diameterComponent_hpcrf h-pcrf component |
128 | * @param p_diameterComponent_bberf bberf component |
||
129 | */ |
||
19 | pintar | 130 | function f_cf_1S9_1Gxx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_bberf) |
74 | pintar | 131 | runs on DiameterS9 system TestAdapter |
17 | pintar | 132 | { |
133 | //Variables |
||
134 | var FncRetCode v_ret := e_success; |
||
135 | |||
136 | //Create |
||
67 | pintar | 137 | p_diameterComponent_hpcrf := DiameterComponent.create ; |
17 | pintar | 138 | if (PX_Gxxsupport) { |
139 | p_diameterComponent_bberf := DiameterComponent.create ; |
||
140 | } |
||
63 | garciay | 141 | // Connect mtc sync port |
142 | connect(self:syncPort, self:syncPort); |
||
143 | // Connect client sync port |
||
17 | pintar | 144 | connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; |
145 | if (PX_Gxxsupport) { |
||
63 | garciay | 146 | connect(p_diameterComponent_bberf:syncPort, self:syncPort) ; |
17 | pintar | 147 | } |
148 | //Map |
||
149 | map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration |
||
150 | if (PX_Gxxsupport) { |
||
74 | pintar | 151 | map(p_diameterComponent_bberf:DIAMP, system:BBERF_Gxx1);// Diameter Init test Configuration |
17 | pintar | 152 | } |
153 | |||
63 | garciay | 154 | activate(a_mtc_shutdown()); |
155 | |||
17 | pintar | 156 | f_setVerdict(v_ret); |
19 | pintar | 157 | }//end f_cf_1S9_1Gxx_hpcrfUp |
17 | pintar | 158 | |
28 | pintar | 159 | /** |
160 | * |
||
161 | * @desc Creates test configuration of CF_1S9_2Gxx - V-PCRF is SUT |
||
162 | * @param p_diameterComponent_hpcrf h-pcrf component |
||
163 | * @param p_diameterComponent_bberf1 bberf1 represents old bberf component |
||
164 | * @param p_diameterComponent_bberf2 bberf2 represents new bberf component |
||
165 | */ |
||
166 | function f_cf_1S9_2Gxx_hpcrfUp(out DiameterComponent p_diameterComponent_hpcrf, out DiameterComponent p_diameterComponent_bberf1, out DiameterComponent p_diameterComponent_bberf2) |
||
74 | pintar | 167 | runs on DiameterS9 system TestAdapter |
28 | pintar | 168 | { |
169 | //Variables |
||
170 | var FncRetCode v_ret := e_success; |
||
171 | |||
172 | //Create |
||
173 | p_diameterComponent_hpcrf := DiameterComponent.create ; |
||
174 | if (PX_Gxxsupport) { |
||
175 | p_diameterComponent_bberf1 := DiameterComponent.create ; |
||
176 | p_diameterComponent_bberf2 := DiameterComponent.create ; |
||
177 | } |
||
63 | garciay | 178 | // Connect mtc sync port |
179 | connect(self:syncPort, self:syncPort); |
||
180 | // Connect client sync port |
||
28 | pintar | 181 | connect(p_diameterComponent_hpcrf:syncPort, self:syncPort) ; |
182 | if (PX_Gxxsupport) { |
||
63 | garciay | 183 | connect(p_diameterComponent_bberf1:syncPort, self:syncPort) ; |
28 | pintar | 184 | connect(p_diameterComponent_bberf2:syncPort, self:syncPort) ; |
185 | } |
||
186 | //Map |
||
187 | map(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9);// Diameter Init test Configuration |
||
188 | if (PX_Gxxsupport) { |
||
63 | garciay | 189 | map(p_diameterComponent_bberf1:DIAMP, system:BBERF_Gxx1);// Diameter Init test Configuration |
28 | pintar | 190 | map(p_diameterComponent_bberf2:DIAMP, system:BBERF_Gxx2);// Diameter Init test Configuration |
191 | } |
||
192 | |||
63 | garciay | 193 | activate(a_mtc_shutdown()); |
194 | |||
28 | pintar | 195 | f_setVerdict(v_ret); |
196 | }//end f_cf_1S9_2Gxx_hpcrfUp |
||
197 | |||
63 | garciay | 198 | }//end group cfUp |
17 | pintar | 199 | |
63 | garciay | 200 | group cfDown { |
17 | pintar | 201 | |
202 | /** |
||
203 | * |
||
204 | * @desc Deletes configuration of cf_1S9_vpcrf - H-PCRF is SUT |
||
205 | * @param p_diameterComponent_vpcrf diameter component |
||
206 | */ |
||
28 | pintar | 207 | function f_cf_1S9_vpcrfDown(in DiameterComponent p_diameterComponent_vpcrf) |
74 | pintar | 208 | runs on DiameterS9 system TestAdapter |
17 | pintar | 209 | { |
63 | garciay | 210 | deactivate; |
211 | |||
17 | pintar | 212 | //Disconnect |
213 | disconnect(p_diameterComponent_vpcrf:syncPort, self:syncPort); |
||
214 | //Unmap |
||
215 | unmap(p_diameterComponent_vpcrf:DIAMP, system:V_PCRF_S9); |
||
74 | pintar | 216 | |
28 | pintar | 217 | }//end f_cf_1S9_vpcrfDown |
17 | pintar | 218 | |
219 | /** |
||
220 | * |
||
19 | pintar | 221 | * @desc Deletes configuration of CF_1S9_ - V-PCRF is SUT |
17 | pintar | 222 | * @param p_diameterComponent_hpcrf diameter component |
223 | */ |
||
19 | pintar | 224 | function f_cf_1S9_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf) |
74 | pintar | 225 | runs on DiameterS9 system TestAdapter |
17 | pintar | 226 | { |
63 | garciay | 227 | deactivate; |
228 | |||
17 | pintar | 229 | //Disconnect |
230 | disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); |
||
231 | |||
232 | //Unmap |
||
233 | unmap(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9); |
||
74 | pintar | 234 | |
28 | pintar | 235 | }//end f_cf_1S9_hpcrfDown |
17 | pintar | 236 | |
237 | /** |
||
238 | * |
||
19 | pintar | 239 | * @desc Deletes configuration of CF_1S9_1GxE - V-PCRF is SUT |
17 | pintar | 240 | * @param p_diameterComponent_hpcrf diameter component |
241 | * @param p_diameterComponent_pcef diameter component |
||
242 | */ |
||
19 | pintar | 243 | function f_cf_1S9_1Gx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_pcef) |
74 | pintar | 244 | runs on DiameterS9 system TestAdapter |
17 | pintar | 245 | { |
63 | garciay | 246 | deactivate; |
247 | |||
17 | pintar | 248 | //Disconnect |
249 | disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); |
||
250 | if (PX_Gxsupport) { |
||
63 | garciay | 251 | disconnect(p_diameterComponent_pcef:syncPort, self:syncPort); |
17 | pintar | 252 | } |
253 | //Unmap |
||
254 | unmap(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9); |
||
255 | if (PX_Gxsupport) { |
||
63 | garciay | 256 | unmap(p_diameterComponent_pcef:DIAMP, system:PCEF_Gx); |
17 | pintar | 257 | } |
63 | garciay | 258 | |
19 | pintar | 259 | }//end f_cf_1S9_1Gx_hpcrfDown |
17 | pintar | 260 | |
261 | /** |
||
262 | * |
||
19 | pintar | 263 | * @desc Deletes configuration of CF_1S9_1GxxE - V-PCRF is SUT |
17 | pintar | 264 | * @param p_diameterComponent_hpcrf diameter component |
265 | * @param p_diameterComponent_bberf diameter component |
||
266 | */ |
||
19 | pintar | 267 | function f_cf_1S9_1Gxx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_bberf) |
74 | pintar | 268 | runs on DiameterS9 system TestAdapter |
17 | pintar | 269 | { |
63 | garciay | 270 | deactivate; |
271 | |||
17 | pintar | 272 | //Disconnect |
273 | disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); |
||
274 | if (PX_Gxxsupport) { |
||
63 | garciay | 275 | disconnect(p_diameterComponent_bberf:syncPort, self:syncPort); |
17 | pintar | 276 | } |
277 | //Unmap |
||
278 | unmap(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9); |
||
279 | if (PX_Gxxsupport) { |
||
74 | pintar | 280 | unmap(p_diameterComponent_bberf:DIAMP, system:BBERF_Gxx1); |
17 | pintar | 281 | } |
63 | garciay | 282 | |
19 | pintar | 283 | }//end f_cf_1S9_1Gxx_hpcrfDown |
17 | pintar | 284 | |
28 | pintar | 285 | /** |
286 | * |
||
287 | * @desc Deletes configuration of CF_1S9_2GxxE - V-PCRF is SUT |
||
288 | * @param p_diameterComponent_hpcrf diameter component |
||
289 | * @param p_diameterComponent_bberf diameter component |
||
290 | */ |
||
291 | function f_cf_1S9_2Gxx_hpcrfDown(in DiameterComponent p_diameterComponent_hpcrf, in DiameterComponent p_diameterComponent_bberf1, in DiameterComponent p_diameterComponent_bberf2) |
||
74 | pintar | 292 | runs on DiameterS9 system TestAdapter |
28 | pintar | 293 | { |
63 | garciay | 294 | deactivate; |
295 | |||
28 | pintar | 296 | //Disconnect |
297 | disconnect(p_diameterComponent_hpcrf:syncPort, self:syncPort); |
||
298 | if (PX_Gxxsupport) { |
||
63 | garciay | 299 | disconnect(p_diameterComponent_bberf1:syncPort, self:syncPort); |
28 | pintar | 300 | disconnect(p_diameterComponent_bberf2:syncPort, self:syncPort); |
301 | } |
||
302 | //Unmap |
||
303 | unmap(p_diameterComponent_hpcrf:DIAMP, system:H_PCRF_S9); |
||
304 | if (PX_Gxxsupport) { |
||
63 | garciay | 305 | unmap(p_diameterComponent_bberf1:DIAMP, system:BBERF_Gxx1); |
28 | pintar | 306 | unmap(p_diameterComponent_bberf2:DIAMP, system:BBERF_Gxx2); |
307 | } |
||
63 | garciay | 308 | |
28 | pintar | 309 | }//end f_cf_1S9_2Gxx_hpcrfDown |
310 | |||
63 | garciay | 311 | } //end group cfDown |
17 | pintar | 312 | |
63 | garciay | 313 | group shutDownAltsteps { |
314 | |||
315 | altstep a_mtc_shutdown() |
||
316 | runs on SelfSyncComp { |
||
317 | [] syncSendPort.receive(m_syncServerStop){ |
||
318 | tc_sync.stop ; |
||
319 | log("**** a_mtc_shutdown: MTC component received STOP signal **** "); |
||
320 | } |
||
17 | pintar | 321 | } |
28 | pintar | 322 | |
63 | garciay | 323 | } // end group shutDownAltsteps |
324 | |||
17 | pintar | 325 | } // end module DiameterS9_TestConfiguration |