Commit e9da0b79 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Review of TC_CSE_GMG_CRE_002


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 02e3d783
......@@ -2544,6 +2544,50 @@ module OneM2M_Functions {
}// end f_cse_retrieveResourceHandler
/**
* @desc Message exchange for the memberType validation of group members
* @param p_resourceIndex Internal resource index which indicates the expected resource to be retrieved
* @param p_requestPrimitive RETRIEVE request primitive to be used
* @param p_responseStatusCode Response Status code to be returned
* @verdict
*/
function f_cse_memberTypeValidationHandler(integer p_resourceIndex, in ResponseStatusCode p_responseStatusCode := int2000) runs on CseSimu {
var integer v_targetResourceIndex := -1;
var integer v_localResourceIndex := -1;
//Activate defaults when running on a PTC
f_cse_activateDefaults_cse1();
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_retrieve(?))) -> value vc_request {
tc_ac.stop;
v_targetResourceIndex := f_processRetrieveRequestPrimitive(vc_request.primitive.requestPrimitive, p_responseStatusCode);
if(v_targetResourceIndex == p_resourceIndex) {
setverdict(pass, __SCOPE__&":INFO: Resource retrieved successfuly");
} else {
setverdict(inconc, __SCOPE__&":INFO: Unexpected resource retrieval");
}
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
}
[] mccPortIn.receive(mw_request(mw_create())) -> value vc_request {
tc_ac.stop;
v_localResourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive, p_responseStatusCode);
setverdict(pass, __SCOPE__&":INFO: Subgroup creation received");
f_send(e_mcc_in_port, m_response(vc_response.primitive.responsePrimitive));
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while retrieving resource");
}
}
f_checkCseSimuStatus();
}// end f_cse_memberTypeValidationHandler
* @desc Message exchange for the retrieval of a child resource refs
* @param p_resourceType ResourceType of children of the resource to be retrieved
* @param p_resourceIndex Resource index of the resource to be retrieved
......
......@@ -1096,7 +1096,15 @@ module OneM2M_Templates {
resourceType := int9,
primitiveContent := {group_ := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIds, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)} //TODO: p_resourceId
};
/**
* @desc Reception template for CREATE Group
*/
template RequestPrimitive mw_createGroup(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
resourceType := int9,
primitiveContent := {group_ := mw_contentCreateGroupBase}
};
/**
* @desc Reception template for CREATE GroupAnnc
*/
......@@ -2007,6 +2015,42 @@ module OneM2M_Templates {
choice := omit//NP
};
/**
* @desc Base primitiveContent for CREATE operation for Group resource
* @param p_maxNrOfMembers Max number of members
* @param p_memberIds Member IDs
* @param p_accessControlPolicyIds ACP IDs for the Group
* @param p_name Resource name
*/
template Group_optional mw_contentCreateGroupBase := {
resourceName := *,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
creationTime := omit,//NP
lastModifiedTime := omit,//NP
labels := *,//O
accessControlPolicyIDs := *,//O
expirationTime := *,//O
dynamicAuthorizationConsultationIDs := *, //O
announceTo := *,//O
announcedAttribute := *,//O
creator := *,//O
memberType := *,//O
currentNrOfMembers := omit,//NP
maxNrOfMembers := ?,//M
memberIDs := ?,//M
membersAccessControlPolicyIDs := *,//O
memberTypeValidated := omit,//NP
consistencyStrategy := *,//O
groupName := *,//O
semanticSupportIndicator := *,//O
notifyAggregation := *,//O
choice := omit//NP
};
/**
* @desc Base primitiveContent for CREATE operation for GroupAnnc resource
* @param p_maxNrOfMembers Max number of members
......
......@@ -10599,7 +10599,7 @@ module OneM2M_Testcases_CSE_Release_1 {
// Test Body
vc_cse1.start(f_cse_retrieveResourceHandler(v_targetResourceIndex, -));
vc_cse1.start(f_cse_memberTypeValidationHandler(v_targetResourceIndex, int4103));
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
......
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