summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-10-16 14:54:14 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-10-16 15:20:00 +0200
commitff55033ae58f0e7b2123c07b06fc9b3817a861f8 (patch)
tree1ec2e636fe9db1292e8e7cb708d6fde612113a66
parentdd72b1211ab86accc4b9fc821672bbcb6a51e003 (diff)
bts-oml: Verify BTS obj becomes Enabled durig OPSTART ACKpespin/bts
-rw-r--r--bts/BTS_Tests_OML.ttcn26
-rw-r--r--library/AbisOML_Types.ttcn8
2 files changed, 29 insertions, 5 deletions
diff --git a/bts/BTS_Tests_OML.ttcn b/bts/BTS_Tests_OML.ttcn
index dc1b7ce..396ed38 100644
--- a/bts/BTS_Tests_OML.ttcn
+++ b/bts/BTS_Tests_OML.ttcn
@@ -113,11 +113,33 @@ function f_init_oml(charstring id) runs on BSC_OML_CT {
/* Perform an "OPSTART" procedure with the speciifed MO" */
private function f_oml_opstart(template (value) OML_FOM_ObjectClass obj_class,
template (value) OML_FOM_ObjectInstance obj_inst,
- boolean exp_fail := false)
+ boolean exp_fail := false,
+ template OML_FOM_OperationalState exp_stchg := ?)
runs on BSC_OML_CT {
+ var boolean check_stchg := not istemplatekind(exp_stchg, "?");
+ var boolean ack_received := false;
+ var boolean stchg_received := not check_stchg;
+
OML.send(ts_OML_Opstart(obj_class, obj_inst));
+
alt {
+ [check_stchg] OML.receive(tr_OML_StateChgEvtRep(obj_class, obj_inst,
+ exp_stchg, NM_AVSTATE_OK)) {
+ stchg_received := true;
+ if (not ack_received) {
+ repeat;
+ }
+ setverdict(pass);
+ }
+ [check_stchg] OML.receive(tr_OML_StateChgEvtRep(obj_class, obj_inst,
+ ?, NM_AVSTATE_OK)) {
+ setverdict(fail, "Unexpected State Change for ", obj_class, " ", obj_inst);
+ }
[not exp_fail] OML.receive(tr_OML_OpstartACK(obj_class, obj_inst)) {
+ ack_received := true;
+ if (not stchg_received) {
+ repeat;
+ }
setverdict(pass);
}
[not exp_fail] OML.receive(tr_OML_OpstartNACK(obj_class, obj_inst)) {
@@ -515,7 +537,7 @@ testcase TC_bts_opstart() runs on BSC_OML_CT {
}
f_oml_bts_attr();
- f_oml_opstart(obj_class, obj_inst);
+ f_oml_opstart(obj_class, obj_inst, false, NM_OPSTATE_ENABLED);
}
diff --git a/library/AbisOML_Types.ttcn b/library/AbisOML_Types.ttcn
index c4fd81c..0a562ae 100644
--- a/library/AbisOML_Types.ttcn
+++ b/library/AbisOML_Types.ttcn
@@ -100,7 +100,7 @@ type enumerated OML_FOM_MessageType {
NM_MT_DISC_TERR_TRAF ('2d'H),
NM_MT_DISC_TERR_TRAF_ACK ('2e'H),
NM_MT_DISC_TERR_TRAF_NACK ('2f'H),
- /* Transmission Management Messages */
+ /* Transmission Management Messages */
NM_MT_CONN_MDROP_LINK ('31'H),
NM_MT_CONN_MDROP_LINK_ACK ('32'H),
NM_MT_CONN_MDROP_LINK_NACK ('33'H),
@@ -884,10 +884,12 @@ template (value) OML_PDU ts_OML_StateChgEvtRep(template (value) OML_FOM_ObjectCl
template OML_PDU tr_OML_StateChgEvtRep(template OML_FOM_ObjectClass obj_class,
template OML_FOM_ObjectInstance obj_inst,
template OML_FOM_OperationalState opstate := ?,
- template OML_FOM_AvailabilityStatus avstate := ?) :=
+ template OML_FOM_AvailabilityStatus avstate := ?,
+ template OML_FOM_AdministrativeState admstate := ?) :=
tr_OML_MsgType(NM_MT_STATECHG_EVENT_REP, obj_class, obj_inst, {
tr_OML_IE(NM_ATT_OPER_STATE, OML_FOM_IE_Body:{opstate := opstate}),
- tr_OML_IE(NM_ATT_AVAIL_STATUS, OML_FOM_IE_Body:{avail_status := {len := 1, avail_status := avstate}})
+ tr_OML_IE(NM_ATT_AVAIL_STATUS, OML_FOM_IE_Body:{avail_status := {len := 1, avail_status := avstate}}),
+ tr_OML_IE(NM_ATT_ADM_STATE, OML_FOM_IE_Body:{adm_state := admstate})
});
/* 8.8.2 Failure Event Report */