Code Review
/
ric-plt
/
submgr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
SVC address support for rmr stubs.
[ric-plt/submgr.git]
/
pkg
/
teststube2ap
/
stubE2.go
diff --git
a/pkg/teststube2ap/stubE2.go
b/pkg/teststube2ap/stubE2.go
index
a5dfa54
..
576a954
100644
(file)
--- a/
pkg/teststube2ap/stubE2.go
+++ b/
pkg/teststube2ap/stubE2.go
@@
-43,7
+43,7
@@
type RmrTransactionId struct {
}
func (trans *RmrTransactionId) String() string {
}
func (trans *RmrTransactionId) String() string {
- return "trans(" + trans.xid + "/" +
trans.meid.RanName
+ ")"
+ return "trans(" + trans.xid + "/" +
(&xapptweaks.RMRMeid{trans.meid}).String()
+ ")"
}
type E2Stub struct {
}
type E2Stub struct {
@@
-54,9
+54,9
@@
type E2Stub struct {
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
-func CreateNewE2Stub(desc string, rtfile string, port
string
, stat string, mtypeseed int) *E2Stub {
+func CreateNewE2Stub(desc string, rtfile string, port
uint16, rtport uint16
, stat string, mtypeseed int) *E2Stub {
tc := &E2Stub{}
tc := &E2Stub{}
- tc.RmrStubControl.Init(desc, rtfile, port, stat, mtypeseed)
+ tc.RmrStubControl.Init(desc, rtfile, port,
rtport,
stat, mtypeseed)
tc.xid_seq = 1
tc.SetCheckXid(true)
return tc
tc.xid_seq = 1
tc.SetCheckXid(true)
return tc
@@
-65,9
+65,9
@@
func CreateNewE2Stub(desc string, rtfile string, port string, stat string, mtype
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
-func CreateNewE2termStub(desc string, rtfile string, port
string
, stat string, mtypeseed int) *E2Stub {
+func CreateNewE2termStub(desc string, rtfile string, port
uint16, rtport uint16
, stat string, mtypeseed int) *E2Stub {
tc := &E2Stub{}
tc := &E2Stub{}
- tc.RmrStubControl.Init(desc, rtfile, port, stat, mtypeseed)
+ tc.RmrStubControl.Init(desc, rtfile, port,
rtport,
stat, mtypeseed)
tc.xid_seq = 1
tc.SetCheckXid(false)
return tc
tc.xid_seq = 1
tc.SetCheckXid(false)
return tc
@@
-156,12
+156,12
@@
func (p *E2StubSubsFailParams) SetCauseVal(ind int, content uint8, causeval uint
if ind < 0 {
for index := int(0); index < len(p.Fail.ActionNotAdmittedList.Items); index++ {
p.Fail.ActionNotAdmittedList.Items[index].Cause.Content = content
if ind < 0 {
for index := int(0); index < len(p.Fail.ActionNotAdmittedList.Items); index++ {
p.Fail.ActionNotAdmittedList.Items[index].Cause.Content = content
- p.Fail.ActionNotAdmittedList.Items[index].Cause.
CauseVal
= causeval
+ p.Fail.ActionNotAdmittedList.Items[index].Cause.
Value
= causeval
}
return
}
p.Fail.ActionNotAdmittedList.Items[ind].Cause.Content = content
}
return
}
p.Fail.ActionNotAdmittedList.Items[ind].Cause.Content = content
- p.Fail.ActionNotAdmittedList.Items[ind].Cause.
CauseVal
= causeval
+ p.Fail.ActionNotAdmittedList.Items[ind].Cause.
Value
= causeval
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
@@
-205,7
+205,7
@@
func (tc *E2Stub) SendSubsReq(t *testing.T, rparams *E2StubSubsReqParams, oldTra
params.Mbuf = nil
tc.Logger.Info("SEND SUB REQ: %s", params.String())
params.Mbuf = nil
tc.Logger.Info("SEND SUB REQ: %s", params.String())
- snderr := tc.RmrSend(params)
+ snderr := tc.RmrSend(params
, 5
)
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s %s", trans.String(), snderr.Error())
return nil
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s %s", trans.String(), snderr.Error())
return nil
@@
-269,7
+269,7
@@
func (tc *E2Stub) SendSubsResp(t *testing.T, req *e2ap.E2APSubscriptionRequest,
item := e2ap.ActionNotAdmittedItem{}
item.ActionId = index
item.Cause.Content = 1
item := e2ap.ActionNotAdmittedItem{}
item.ActionId = index
item.Cause.Content = 1
- item.Cause.
CauseVal
= 1
+ item.Cause.
Value
= 1
resp.ActionNotAdmittedList.Items = append(resp.ActionNotAdmittedList.Items, item)
}
resp.ActionNotAdmittedList.Items = append(resp.ActionNotAdmittedList.Items, item)
}
@@
-290,7
+290,7
@@
func (tc *E2Stub) SendSubsResp(t *testing.T, req *e2ap.E2APSubscriptionRequest,
params.Mbuf = nil
tc.Logger.Info("SEND SUB RESP: %s", params.String())
params.Mbuf = nil
tc.Logger.Info("SEND SUB RESP: %s", params.String())
- snderr := tc.RmrSend(params)
+ snderr := tc.RmrSend(params
, 5
)
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s", snderr.Error())
}
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s", snderr.Error())
}
@@
-363,7
+363,7
@@
func (tc *E2Stub) SendSubsFail(t *testing.T, fparams *E2StubSubsFailParams, msg
params.Mbuf = nil
tc.Logger.Info("SEND SUB FAIL: %s", params.String())
params.Mbuf = nil
tc.Logger.Info("SEND SUB FAIL: %s", params.String())
- snderr := tc.RmrSend(params)
+ snderr := tc.RmrSend(params
, 5
)
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s", snderr.Error())
}
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s", snderr.Error())
}
@@
-446,7
+446,7
@@
func (tc *E2Stub) SendSubsDelReq(t *testing.T, oldTrans *RmrTransactionId, e2Sub
params.Mbuf = nil
tc.Logger.Info("SEND SUB DEL REQ: %s", params.String())
params.Mbuf = nil
tc.Logger.Info("SEND SUB DEL REQ: %s", params.String())
- snderr := tc.RmrSend(params)
+ snderr := tc.RmrSend(params
, 5
)
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s %s", trans.String(), snderr.Error())
return nil
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s %s", trans.String(), snderr.Error())
return nil
@@
-516,7
+516,7
@@
func (tc *E2Stub) SendSubsDelResp(t *testing.T, req *e2ap.E2APSubscriptionDelete
params.Mbuf = nil
tc.Logger.Info("SEND SUB DEL RESP: %s", params.String())
params.Mbuf = nil
tc.Logger.Info("SEND SUB DEL RESP: %s", params.String())
- snderr := tc.RmrSend(params)
+ snderr := tc.RmrSend(params
, 5
)
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s", snderr.Error())
}
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s", snderr.Error())
}
@@
-569,8
+569,8
@@
func (tc *E2Stub) SendSubsDelFail(t *testing.T, req *e2ap.E2APSubscriptionDelete
resp.RequestId.Id = req.RequestId.Id
resp.RequestId.Seq = req.RequestId.Seq
resp.FunctionId = req.FunctionId
resp.RequestId.Id = req.RequestId.Id
resp.RequestId.Seq = req.RequestId.Seq
resp.FunctionId = req.FunctionId
- resp.Cause.Content = 3
// CauseMisc
- resp.Cause.
CauseVal = 4
// unspecified
+ resp.Cause.Content = 3 // CauseMisc
+ resp.Cause.
Value = 4
// unspecified
packerr, packedMsg := e2SubsDelFail.Pack(resp)
if packerr != nil {
packerr, packedMsg := e2SubsDelFail.Pack(resp)
if packerr != nil {
@@
-588,7
+588,7
@@
func (tc *E2Stub) SendSubsDelFail(t *testing.T, req *e2ap.E2APSubscriptionDelete
params.Mbuf = nil
tc.Logger.Info("SEND SUB DEL FAIL: %s", params.String())
params.Mbuf = nil
tc.Logger.Info("SEND SUB DEL FAIL: %s", params.String())
- snderr := tc.RmrSend(params)
+ snderr := tc.RmrSend(params
, 5
)
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s", snderr.Error())
}
if snderr != nil {
tc.TestError(t, "RMR SEND FAILED: %s", snderr.Error())
}