Clean up of reception templates for CREATE operation

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 2c5f66f0
......@@ -2128,8 +2128,29 @@ module OneM2M_Functions {
v_myResource.contentInstance.expirationTime := "20301231T012345";
}
v_myResource.contentInstance.stateTag := 0;
v_myResource.contentInstance.contentSize := lengthof(v_myResource.contentInstance.content);
v_myResource.contentInstance.content := valueof(p_resource.contentInstance.content);
if(not(ispresent(p_resource.contentInstance.content))) {
v_myResource.contentInstance.contentSize := 0;
v_myResource.contentInstance.content := omit;
} else {
v_myResource.contentInstance.contentSize := lengthof(v_myResource.contentInstance.content);
v_myResource.contentInstance.content := valueof(p_resource.contentInstance.content);
}
}
} else if(p_resourceType == int23 and ispresent(p_resource)) {//Subscription
if(ischosen(p_resource.subscription)){
v_myResource.subscription := valueof(p_resource.subscription);
v_myResource.subscription.resourceID := "sub" & int2str(v_resourceIndex);
if(not(ispresent(p_resource.subscription.resourceName))) {
v_myResource.subscription.resourceName := "subscription" & int2str(v_resourceIndex);
}
v_myResource.subscription.resourceType := p_resourceType;
v_myResource.subscription.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
v_myResource.subscription.creationTime := fx_generateTimestamp();
v_myResource.subscription.lastModifiedTime := v_myResource.subscription.creationTime;
if(not(ispresent(p_resource.subscription.expirationTime))) {
v_myResource.subscription.expirationTime := "20301231T012345";
}
}
}
......
This diff is collapsed.
......@@ -1678,7 +1678,7 @@ module OneM2M_PermutationFunctions {
// Test adapter configuration
// Preamble
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
//Send Trigger Message
v_utRequest.requestPrimitive.to_ := f_getResourceAddress();
......
......@@ -1834,7 +1834,7 @@ module OneM2M_Testcases_CSE_Release_1 {
// Test Body
tc_ac.start;
alt {
[not(v_cseRegistered)] mccPortIn.receive(mw_request(mw_createRemoteCSEBase)) -> value v_request {
[not(v_cseRegistered)] mccPortIn.receive(mw_request(mw_createRemoteCSE)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: CREATE remoteCSE request received");
v_parentResourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
......@@ -2732,7 +2732,7 @@ module OneM2M_Testcases_CSE_Release_1 {
// Test adapter configuration
// Preamble
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
//Send Trigger Message
v_utRequest := m_utRetrieve(f_getLocalResourceAddress(vc_localRemoteCseIndex));
......
......@@ -1332,7 +1332,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_ae1.done;
v_createRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
v_ae1.start(f_CSE_DMR_CRE_020(int3, v_createRequest, mw_createContainerAnncBase));//Container
v_ae1.start(f_CSE_DMR_CRE_020(int3, v_createRequest, mw_createContainerAnnc));//Container
v_ae1.done;
}
......@@ -1344,7 +1344,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_ae1.done;
v_createRequest.primitiveContent.contentInstance.announceTo := {PX_CSE1_ID};
v_ae1.start(f_CSE_DMR_CRE_020(int4, v_createRequest, mw_createContentInstanceAnncBase));//ContentInstance
v_ae1.start(f_CSE_DMR_CRE_020(int4, v_createRequest, mw_createContentInstanceAnnc));//ContentInstance
v_ae1.done;
}
......@@ -1357,7 +1357,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_ae1.done;
v_createRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
v_ae1.start(f_CSE_DMR_CRE_020(int9, v_createRequest, mw_createGroupAnncBase));//Group
v_ae1.start(f_CSE_DMR_CRE_020(int9, v_createRequest, mw_createGroupAnnc));//Group
v_ae1.done;
}
......@@ -1370,7 +1370,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_ae1.done;
v_createRequest.primitiveContent.locationPolicy.announceTo := {PX_CSE1_ID};
v_ae1.start(f_CSE_DMR_CRE_020(int10, v_createRequest, mw_createLocationPolicyAnncBase));//LocationPolicy
v_ae1.start(f_CSE_DMR_CRE_020(int10, v_createRequest, mw_createLocationPolicyAnnc));//LocationPolicy
v_ae1.done;
}
......@@ -1383,7 +1383,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_ae1.done;
v_createRequest.primitiveContent.mgmtResource.announceTo := {PX_CSE1_ID};
v_ae1.start(f_CSE_DMR_CRE_020(int13, v_createRequest, mw_createMgmtObjAnncBase));//MgmtObj
v_ae1.start(f_CSE_DMR_CRE_020(int13, v_createRequest, mw_createMgmtObjAnnc));//MgmtObj
v_ae1.done;
}
......@@ -1409,7 +1409,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_ae1.done;
v_createRequest.primitiveContent.schedule.announceTo := {PX_CSE1_ID};
v_ae1.start(f_CSE_DMR_CRE_020(int18, v_createRequest, mw_createScheduleAnncBase));//Schedule
v_ae1.start(f_CSE_DMR_CRE_020(int18, v_createRequest, mw_createScheduleAnnc));//Schedule
v_ae1.done;
}
......@@ -1434,7 +1434,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_createRequest.primitiveContent.container.maxByteSize := v_maxByteSize;
v_createRequest.primitiveContent.container.announcedAttribute := {"mbs"};
v_ae1.start(f_CSE_DMR_CRE_021(int3, v_createRequest, mw_createContainerAnncBase()));//Container
v_ae1.start(f_CSE_DMR_CRE_021(int3, v_createRequest, mw_createContainerAnnc()));//Container
v_ae1.done;
if(getverdict == pass){
......@@ -1466,7 +1466,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_createRequest.primitiveContent.contentInstance.contentSize := v_contentSize;
v_createRequest.primitiveContent.contentInstance.announcedAttribute := {"cs"}; //Correct value? Shall be indicated in TP?
v_ae1.start(f_CSE_DMR_CRE_021(int4, v_createRequest, mw_createContentInstanceAnncBase()));//ContentInstance
v_ae1.start(f_CSE_DMR_CRE_021(int4, v_createRequest, mw_createContentInstanceAnnc()));//ContentInstance
v_ae1.done;
if(getverdict == pass){
......@@ -1497,7 +1497,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_createRequest.primitiveContent.group_.maxNrOfMembers := v_maxNrOfMembers;
v_createRequest.primitiveContent.group_.announcedAttribute := {"mnm"};
v_ae1.start(f_CSE_DMR_CRE_021(int9, v_createRequest, mw_createGroupAnncBase()));//Group
v_ae1.start(f_CSE_DMR_CRE_021(int9, v_createRequest, mw_createGroupAnnc()));//Group
v_ae1.done;
if(getverdict == pass){
......@@ -1528,7 +1528,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_createRequest.primitiveContent.locationPolicy.locationSource := v_locationSource;
v_createRequest.primitiveContent.locationPolicy.announcedAttribute := {"los"};
v_ae1.start(f_CSE_DMR_CRE_021(int10, v_createRequest, mw_createLocationPolicyAnncBase()));//LocationPolicy
v_ae1.start(f_CSE_DMR_CRE_021(int10, v_createRequest, mw_createLocationPolicyAnnc()));//LocationPolicy
v_ae1.done;
if(getverdict == pass){
......@@ -1559,7 +1559,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_createRequest.primitiveContent.mgmtResource.description := v_description;
v_createRequest.primitiveContent.mgmtResource.announcedAttribute := {"dc"};
v_ae1.start(f_CSE_DMR_CRE_021(int13, v_createRequest, mw_createMgmtObjAnncBase()));//MgmtObj
v_ae1.start(f_CSE_DMR_CRE_021(int13, v_createRequest, mw_createMgmtObjAnnc()));//MgmtObj
v_ae1.done;
if(getverdict == pass){
......@@ -1606,7 +1606,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_createRequest.primitiveContent.schedule.scheduleElement := v_scheduleElement;
v_createRequest.primitiveContent.schedule.announcedAttribute := {"se"};
v_ae1.start(f_CSE_DMR_CRE_021(int18, v_createRequest, mw_createScheduleAnncBase()));//Schedule
v_ae1.start(f_CSE_DMR_CRE_021(int18, v_createRequest, mw_createScheduleAnnc()));//Schedule
v_ae1.done;
if(getverdict == pass){
......@@ -7599,7 +7599,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnncBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnnc;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_updateRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
......@@ -7613,7 +7613,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnncBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnnc;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_createRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
......@@ -7627,7 +7627,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnncBase;
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnnc;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_updateRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
......@@ -7641,7 +7641,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnncBase;
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnnc;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_createRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
......@@ -7655,7 +7655,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContentInstanceAnncBase;
var template RequestPrimitive v_createRequestAnnc := mw_createContentInstanceAnnc;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_createRequest.primitiveContent.contentInstance.announceTo := {PX_CSE1_ID};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment