Commit 8a6455b1 authored by Antonio Castillo Verdugo's avatar Antonio Castillo Verdugo
Browse files

New function: f_cse_announcementProcedure_deleteHandler()


Created a new parameter for setting the role (cseType) of the simulated CSE
In annunciation test cases, now the tester takes the role of an MN during CSE registration
Some fixes in f_CSE_ANNC_CRE_001
Some fixes in f_CSE_ANNC_CRE_004_CseSimu
Some fixes in f_CSE_ANNC_CRE_006_CseSimu
New Test Cases: TC_CSE_ANNC_DEL_001_ACP, TC_CSE_ANNC_DEL_001_CNT, TC_CSE_ANNC_DEL_001_GRP, TC_CSE_ANNC_DEL_002_ACP, TC_CSE_ANNC_DEL_002_CNT, TC_CSE_ANNC_DEL_002_GRP
Signed-off-by: Antonio Castillo Verdugo's avataracverdugo <acverdugo@at4wireless.com>
parents 10103f8e 02da94eb
This diff is collapsed.
This diff is collapsed.
......@@ -28,83 +28,86 @@ module OneM2M_Pics {
modulepar boolean PICS_PRIMITIVE_SCOPE_SP_RELATIVE := true;
modulepar boolean PICS_PRIMITIVE_SCOPE_ABSOLUTE := true;
//AccessControlPolicy optional attributes
modulepar boolean PICS_ACP_LBL := true;
modulepar boolean PICS_ACP_AT := true;
//AE optional attributes
modulepar boolean PICS_AE_LBL := true;
modulepar boolean PICS_AE_APN := true;
modulepar boolean PICS_AE_POA := true;
modulepar boolean PICS_AE_NL := true;
modulepar boolean PICS_AE_CSZ := true;
modulepar boolean PICS_AE_OR := true;
modulepar boolean PICS_AE_ACPI := true;
//Container optional attributes
modulepar boolean PICS_CNT_ACPI := true;
modulepar boolean PICS_CNT_MNI := true;
modulepar boolean PICS_CNT_MBS := true;
modulepar boolean PICS_CNT_MIA := true;
modulepar boolean PICS_CNT_OR := true;
modulepar boolean PICS_CNT_LI := true;
modulepar boolean PICS_CNT_RN := true;
modulepar boolean PICS_CNT_ET := true;
modulepar boolean PICS_CNT_LBL := true;
modulepar boolean PICS_CNT_CR := true;
//ContentInstance optional attributes
modulepar boolean PICS_CIN_CNF := true;
modulepar boolean PICS_CIN_RN := true;
modulepar boolean PICS_CIN_ET := true;
modulepar boolean PICS_CIN_LBL := true;
modulepar boolean PICS_CIN_CR := true;
modulepar boolean PICS_CIN_OR := true;
//CSEBase optional attributes
modulepar boolean PICS_CB_CST := true;
modulepar boolean PICS_CB_NL := true;
//Group optional attributes
modulepar boolean PICS_GRP_LBL := true;
modulepar boolean PICS_GRP_GN := true;
modulepar boolean PICS_GRP_ACPI := true;
modulepar boolean PICS_GRP_MACP := true;
//RemoteCSE optional attributes
modulepar boolean PICS_CSR_LBL := true;
modulepar boolean PICS_CSR_CST := true;
modulepar boolean PICS_CSR_POA := true;
modulepar boolean PICS_CSR_NL := true;
modulepar boolean PICS_CSR_RN := true;
modulepar boolean PICS_CSR_ET := true;
modulepar boolean PICS_CSR_RR := true;
//Subscription optional attributes
modulepar boolean PICS_SUB_ACPI := true;
modulepar boolean PICS_SUB_ENC := true;
modulepar boolean PICS_SUB_EXC := true;
modulepar boolean PICS_SUB_NFU := true;
modulepar boolean PICS_SUB_NCT := true;
modulepar boolean PICS_SUB_NEC := true;
modulepar boolean PICS_SUB_SU := true;
modulepar boolean PICS_SUB_LBL := true;
modulepar boolean PICS_SUB_GPI := true;
modulepar boolean PICS_SUB_BN := true;
modulepar boolean PICS_SUB_RL := true;
modulepar boolean PICS_SUB_PN := true;
modulepar boolean PICS_SUB_NSP := true;
modulepar boolean PICS_SUB_LN := true;
modulepar boolean PICS_SUB_PSN := true;
modulepar boolean PICS_SUB_CR := true;
group ResourceOptionalAttributes {
//AccessControlPolicy optional attributes
group AccessControlPolicyOptionalAttributes {
modulepar boolean PICS_ACP_LBL := true;
modulepar boolean PICS_ACP_AT := true;
}
//AE optional attributes
group AeOptionalAttributes {
modulepar boolean PICS_AE_LBL := true;
modulepar boolean PICS_AE_APN := true;
modulepar boolean PICS_AE_POA := true;
modulepar boolean PICS_AE_NL := true;
modulepar boolean PICS_AE_CSZ := true;
modulepar boolean PICS_AE_OR := true;
modulepar boolean PICS_AE_ACPI := true;
}
//Container optional attributes
group ContainerOptionalAttributes {
modulepar boolean PICS_CNT_ACPI := true;
modulepar boolean PICS_CNT_MNI := true;
modulepar boolean PICS_CNT_MBS := true;
modulepar boolean PICS_CNT_MIA := true;
modulepar boolean PICS_CNT_OR := true;
modulepar boolean PICS_CNT_LI := true;
modulepar boolean PICS_CNT_RN := true;
modulepar boolean PICS_CNT_ET := true;
modulepar boolean PICS_CNT_LBL := true;
modulepar boolean PICS_CNT_CR := true;
}
//ContentInstance optional attributes
group ContentInstanceOptionalAttributes {
modulepar boolean PICS_CIN_CNF := true;
modulepar boolean PICS_CIN_RN := true;
modulepar boolean PICS_CIN_ET := true;
modulepar boolean PICS_CIN_LBL := true;
modulepar boolean PICS_CIN_CR := true;
modulepar boolean PICS_CIN_OR := true;
}
//CSEBase optional attributes
group CSEBaseOptionalAttributes {
modulepar boolean PICS_CB_CST := true;
modulepar boolean PICS_CB_NL := true;
}
//Group optional attributes
group GroupOptionalAttributes {
modulepar boolean PICS_GRP_LBL := true;
modulepar boolean PICS_GRP_GN := true;
modulepar boolean PICS_GRP_ACPI := true;
modulepar boolean PICS_GRP_MACP := true;
}
//RemoteCSE optional attributes
group RemoteCSEOptionalAttributes {
modulepar boolean PICS_CSR_LBL := true;
modulepar boolean PICS_CSR_CST := true;
modulepar boolean PICS_CSR_POA := true;
modulepar boolean PICS_CSR_NL := true;
modulepar boolean PICS_CSR_RN := true;
modulepar boolean PICS_CSR_ET := true;
modulepar boolean PICS_CSR_RR := true;
}
//Subscription optional attributes
group SubscriptionOptionalAttributes {
modulepar boolean PICS_SUB_ACPI := true;
modulepar boolean PICS_SUB_ENC := true;
modulepar boolean PICS_SUB_EXC := true;
modulepar boolean PICS_SUB_NFU := true;
modulepar boolean PICS_SUB_NCT := true;
modulepar boolean PICS_SUB_NEC := true;
modulepar boolean PICS_SUB_SU := true;
modulepar boolean PICS_SUB_LBL := true;
modulepar boolean PICS_SUB_GPI := true;
modulepar boolean PICS_SUB_BN := true;
modulepar boolean PICS_SUB_RL := true;
modulepar boolean PICS_SUB_PN := true;
modulepar boolean PICS_SUB_NSP := true;
modulepar boolean PICS_SUB_LN := true;
modulepar boolean PICS_SUB_PSN := true;
modulepar boolean PICS_SUB_CR := true;
}
}
} // end of module
......@@ -21,9 +21,11 @@ module OneM2M_Pixits {
group IutParameters {
modulepar boolean PX_MN_CSE := true;
modulepar boolean PX_IN_CSE := true;
modulepar boolean PX_IN_CSE := false;
modulepar boolean PX_MN_CSE := false;
modulepar boolean PX_ASN_CSE:= false;
modulepar charstring PX_SUT_ADDRESS := "127.0.0.1:8080";
......@@ -67,6 +69,8 @@ module OneM2M_Pixits {
modulepar XSD.IDREFS PX_NOT_ALLOWED_S_AE_IDS := {"S-NotAllowedAeId"};
modulepar XSD.ID PX_NOT_ALLOWED_APP_ID := "NotAllowedAppId";
modulepar AddressingMethod PX_ADDRESSING_METHOD := e_hierarchical;
modulepar PrimitiveScope PX_PRIMITIVE_SCOPE := e_cseRelative;
......@@ -78,6 +82,8 @@ module OneM2M_Pixits {
modulepar charstring PX_XML_NAMESPACE := "m2m=""http://www.onem2m.org/xml/protocols""";
modulepar ListOfURIs PX_ACOR := {"all"};
modulepar float PX_TCONFIG_IUT := 10.0;
}
......@@ -138,13 +144,6 @@ module OneM2M_Pixits {
modulepar boolean PX_RUN_POSTAMBLE := true;
}
//for checking whether the locationPolicy creation request is originated from a ASN-AE
//NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT
modulepar boolean PX_IUT_IS_ASN_CSE := false; //default //set it to true when running Device-based location testcases
modulepar boolean PX_IUT_IS_MN_CSE := false; //default //set it to true when running Share-based location testcases
modulepar boolean PX_IUT_IS_IN_CSE := false; //default //set it to true when running Share-based location testcases
//constant parameters for LOC
modulepar LocationTargetID PX_LOCATION_TARGET_ID := {alt_ := "{LOCATION-TARGET-ID}"}; //SUPPOSE TO BE RECEIVED FROM LOCATION SERVER
......
......@@ -76,16 +76,18 @@ module OneM2M_Templates {
forcedFields := p_forcedFields
};
template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive) := {
primitive := { requestPrimitive := p_requestPrimitive}
};
template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive, template AttributeList_1 p_nullFields := *) := {
primitive := { requestPrimitive := p_requestPrimitive},
nullFields := p_nullFields
};
/**
* @desc Base template for response receiving operations
* @param p_responsePrimitive
*/
template MsgIn mw_response(in template (present) ResponsePrimitive p_responsePrimitive := ?) := {
primitive := { responsePrimitive := p_responsePrimitive}
template MsgIn mw_response(in template (present) ResponsePrimitive p_responsePrimitive := ?, template AttributeList_1 p_nullFields := *) := {
primitive := { responsePrimitive := p_responsePrimitive},
nullFields := p_nullFields
};
}//end of group primitives
......@@ -333,38 +335,38 @@ module OneM2M_Templates {
};
/**
* @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field
* @param p_targetResourceAddress Target resource address
* @param p_filterCriteria FilterCriteria
* @param p_originator Originator (from)
*/
template (value) RequestPrimitive m_retrieveInvalidFormatOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
filterCriteria := {
createdBefore := omit,
createdAfter := omit,
modifiedSince := omit,
unmodifiedSince := omit,
stateTagSmaller := omit,
stateTagBigger := omit,
expireBefore := omit,
expireAfter := omit,
labels := omit,
resourceType := omit,
sizeAbove := omit,
sizeBelow := omit,
contentType_list := {},
attribute_list := {},
filterUsage := omit,
limit := omit,
semanticsFilter_list := {},
filterOperation := omit,
contentFilterSyntax := omit,
contentFilterQuery := omit,
level := omit,
offset := omit
}
};
* @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field
* @param p_targetResourceAddress Target resource address
* @param p_filterCriteria FilterCriteria
* @param p_originator Originator (from)
*/
template (value) RequestPrimitive m_retrieveInvalidFormatOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
filterCriteria := {
createdBefore := omit,
createdAfter := omit,
modifiedSince := omit,
unmodifiedSince := omit,
stateTagSmaller := omit,
stateTagBigger := omit,
expireBefore := omit,
expireAfter := omit,
labels := omit,
resourceType := omit,
sizeAbove := omit,
sizeBelow := omit,
contentType_list := {},
attribute_list := {},
filterUsage := omit,
limit := omit,
semanticsFilter_list := {},
filterOperation := omit,
contentFilterSyntax := omit,
contentFilterQuery := omit,
level := omit,
offset := omit
}
};
/**
* @desc FilterCriteria empty template
......@@ -678,8 +680,7 @@ module OneM2M_Templates {
/**
* @desc Reception template for CREATE AEAnnc
*/
template RequestPrimitive mw_createAEAnnc(template XSD.ID p_from := ?, template XSD.ID p_to := ?, template AcpType p_accessControlPolicyIds := ?) modifies mw_createAnnc := {
resourceType := int10002,
template RequestPrimitive mw_createAEAnnc(template XSD.ID p_from := ?, template XSD.ID p_to := ?, template AcpType p_accessControlPolicyIds := ?, template XSD.AnyURI p_link := ?) modifies mw_create := {
primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}
};
......@@ -1032,7 +1033,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_createScheduleBase modifies m_create := {
requestIdentifier := testcasename() & "-m_createSchedule",
resourceType := int18,
primitiveContent := {schedule := m_contentCreateSchedule ({{"0 0 0,1,2 1 1 * *"}})}
primitiveContent := {schedule := m_contentCreateSchedule ({{"0 0 0,1,2 1 1 *"}})}
};
template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) modifies m_create := {
......@@ -1460,6 +1461,7 @@ module OneM2M_Templates {
dynamicAuthorizationConsultationIDs := omit, //OA
cseType := *,//OA
pointOfAccess := *,//OA
cSEBase := *,//
cSE_ID := *,//OA
requestReachability := *, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
nodeLink := *,//OA
......@@ -1519,7 +1521,7 @@ module OneM2M_Templates {
accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
},//M
selfPrivileges := {
accessControlRule_list := {valueof(m_createAcr(p_acor, int63))}
accessControlRule_list := {valueof(m_createAcr({"all"}, int63))}
},//M
choice := omit //NP
};
......@@ -3129,7 +3131,7 @@ module OneM2M_Templates {
resourceType := int16,//M
resourceID := PX_CSE1_RESOURCE_ID,//M
pointOfAccess := {PX_CSE1_ADDRESS},//O
cSEBase := PX_CSE1_NAME,//M
cSEBase := PX_CSE1_ID & "/" & PX_CSE1_NAME,//M
cSE_ID := PX_CSE1_ID,//M
requestReachability := true//M
};
......@@ -3701,7 +3703,7 @@ module OneM2M_Templates {
resourceName := ?,//M
resourceType := ?,//M
resourceID := ?,//M
parentID := ?,//M
parentID := omit,//M
creationTime := ?,//M
lastModifiedTime := ?,//M
labels := *,//O
......
......@@ -1231,7 +1231,11 @@ with {
};
type XSD.Token DeviceID (pattern "urn:meid:[\dABCDEFabcdef]#(14)")
type XSD.Token DeviceID (pattern "(urn:dev:ops:[\dABCDEFabcdef]#6-[\w_%]#(1,)-[\w_%]#(1,))" & "|" &
"(urn:dev:os:[\dABCDEFabcdef]#6-[\w_%]#(1,))" & "|" &
"(urn:imei:\d#15)" & "|" &
"(urn:esn:[\dABCDEFabcdef]#8)" & "|" &
"(urn:meid:[\dABCDEFabcdef]#14)")
with {
variant "name as uncapitalized";
};
......@@ -1317,13 +1321,25 @@ with {
type XSD.Token Ipv4 (pattern "[0-9A-Fa-f]#(8)(/([0-9]|[1-2][0-9]|3[0-2]))#(0,1)")
type XSD.Token Ipv4 (pattern "([0-9A-Fa-f]#(8)(/([0-9]|[1-2][0-9]|3[0-2]))#(0,1))" & "|" &
"((25[0-5]|2[0-4][0-9]|[0-1]#(0,1)[0-9]#(0,1)[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]#(0,1)[0-9]#(0,1)[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]#(0,1)[0-9]#(0,1)[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]#(0,1)[0-9]#(0,1)[0-9])(/([0-9]|[1-2][0-9]|3[0-2]))#(0,1))")
with {
variant "name as uncapitalized";
};
type XSD.Token Ipv6 (pattern "::(/0)#(0,1)")
type XSD.Token Ipv6 (pattern "([0-9A-Fa-f]#(1,4)(:[0-9A-Fa-f]#(1,4))#7(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))#(0,1))" & "|" &
"(:(:[0-9A-Fa-f]#(1,4))#(1,7))" & "|" & //Double colon start
"(([0-9A-Fa-f]#(1,4):)#(1,6)(:[0-9A-Fa-f]#(1,4))#1(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))#(0,1))" & "|" & //Double colon middle
"(([0-9A-Fa-f]#(1,4):)#(1,5)(:[0-9A-Fa-f]#(1,4))#(1,2)(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))#(0,1))" & "|" &
"(([0-9A-Fa-f]#(1,4):)#(1,4)(:[0-9A-Fa-f]#(1,4))#(1,3)(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))#(0,1))" & "|" &
"(([0-9A-Fa-f]#(1,4):)#(1,3)(:[0-9A-Fa-f]#(1,4))#(1,4)(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))#(0,1))" & "|" &
"(([0-9A-Fa-f]#(1,4):)#(1,2)(:[0-9A-Fa-f]#(1,4))#(1,5)(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))#(0,1))" & "|" &
"(([0-9A-Fa-f]#(1,4):)#1(:[0-9A-Fa-f]#(1,4))#(1,6)(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))#(0,1))" & "|" &
"(([0-9A-Fa-f]#(1,4):)#(1,7):(/([0-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8]))#(0,1))" & "|" & //Double colon end
"(((:(:0#(1,4))#(0,3)(:(0#(1,4)|[fF]#4))#(0,1))|(0#(1,4):(:0#(1,4))#(0,2)(:(0#(1,4)|[fF]#4))#(0,1))|((0#(1,4):)#2(:0#(1,4))#(0,1)(:(0#(1,4)|[fF]#4))#(0,1))|((0#(1,4):)#3(:(0#(1,4)|[fF]#4))#(0,1))|((0#(1,4):)#4(0#(1,4)|[fF]#4)#(0,1))):(25[0-5]|2[0-4][0-9]|[0-1]#(0,1)[0-9]#(0,1)[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]#(0,1)[0-9]#(0,1)[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]#(0,1)[0-9]#(0,1)[0-9])\.(25[0-5]|2[0-4][0-9]|[0-1]#(0,1)[0-9]#(0,1)[0-9]))" & "|" & //Embedded IPv4 addresses without CIDR suffix. Should IPv4 CIDR suffix be added
"(::(/0)#(0,1))") //The unspecified address
with {
variant "name as uncapitalized";
};
......@@ -1419,7 +1435,9 @@ with {
};
type XSD.String ContentInfo //FIXME To be fixed (pattern "[\w/!#$\^_.+\q{0, 0, 0, 38}&\-]+((:[0-2])#(0,1))+((:[0-5])#(0,1))")
type XSD.String ContentInfo //TODO To be fixed (pattern "([\w/!#$^_.#(1,)&\-]#(1,)(:[0-2])#(0,1))" & "|" &
// "([\w/!#$^_.#(1,)&\-]#(1,)((:[0-2])#(0,1))#(1,)((:[0-5])#(0,1)))")
with {
variant "name as uncapitalized";
};
......@@ -5449,9 +5467,10 @@ with {
};
type ListOfURIs URIList
type record length(0 .. infinity) of XSD.AnyURI URIList //TODO Allow URIList to be empty as defined in PRO
with {
variant "element";//Change from previous version "list"
variant "name as uncapitalized";
variant "list";
};
......@@ -6519,7 +6538,8 @@ with {
union {
RequestPrimitive requestPrimitive,
ResponsePrimitive responsePrimitive
} primitive
} primitive,
AttributeList_1 nullFields optional
}
with {
encode ""
......@@ -8320,7 +8340,11 @@ group OtherTypes {
variant "untagged";
}
type record of ResourceType ResourceTypeList_1;
type record of ResourceType ResourceTypeList_1
with {
variant "name as uncapitalized";
variant "list";
};
}
}
with {
......
......@@ -1405,7 +1405,7 @@ module OneM2M_PermutationFunctions {
}
function f_CSE_REG_CRE_026(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in charstring p_action) runs on CseSimu {
function f_CSE_REG_CRE_026(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
var ResponsePrimitive v_responsePrimitive;
......@@ -1795,8 +1795,12 @@ module OneM2M_PermutationFunctions {
if(ispresent(p_parentRequestPrimitive)) {
if(match(int23, p_parentRequestPrimitive.resourceType)){
vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, v_poaList), -1)); // AE2 is registred
vc_ae2.done;
vc_ae2.start(f_cse_preamble_createAcpAux("SubscriptionVerificationAcp", int63));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, v_poaList), -1)); // AE2 is registred
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
v_ae2Index := f_getResource(vc_ae2);
p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
......@@ -1830,8 +1834,10 @@ module OneM2M_PermutationFunctions {
// Test Body
if(match(int23, p_requestPrimitive.resourceType)){
vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, v_poaList), -1)); // AE2 is registred
vc_ae2.done;
vc_ae2.start(f_cse_preamble_createAcpAux("SubscriptionVerificationAcp", int63));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, v_poaList), -1)); // AE2 is registred
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
v_ae2Index := f_getResource(vc_ae2);
p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
......@@ -1902,8 +1908,10 @@ module OneM2M_PermutationFunctions {
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
if(match(int23, p_resourceType)){
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE1_ID_STEM, "MyAe", v_poaList), -1)); // AE1 is registered
vc_ae1.done;
vc_ae1.start(f_cse_preamble_createAcpAux("SubscriptionVerificationAcp", int63));
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
vc_ae1.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_APP_ID, -, PX_AE1_ID_STEM, "MyAe", v_poaList), -1)); // AE1 is registered
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
v_ae1Index := f_getResource(vc_ae1);
p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae1Index)};
vc_ae1.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
......@@ -1938,7 +1946,7 @@ module OneM2M_PermutationFunctions {
f_checkCseSimuStatus();
//Check to see if the resource is present or not
if (f_isResourcePresentCseSimu(v_resourceIndex)){
if (f_cse_isResourcePresent(v_resourceIndex)){
setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else {
setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
......@@ -2666,9 +2674,9 @@ module OneM2M_PermutationFunctions {
// Preamble
if (PX_IUT_IS_MN_CSE == true) {
if (PX_MN_CSE) {
vc_cse1.start(f_cse_registrationRemoteCse(m_createRemoteCSEBase));
}else if (PX_IUT_IS_IN_CSE == true) {
}else if (PX_IN_CSE) {
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
}
vc_cse1.done;
......@@ -2792,16 +2800,17 @@ module OneM2M_PermutationFunctions {
// Test adapter configuration
// Preamble
v_acpAuxIndex := f_cse_preamble_createAcpAux(-, -);//c_CRUDNDi)
if(p_resourceType != int1) {
v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int61);//c_CRUDNDi)
p_requestPrimitive := f_setAcpId(p_requestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
}
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});//c_CRUDNDi;
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi;
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
f_cse_updateAcpAuxResource(int61); //c_CUDNDi
// Test Body
mcaPort.send(m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))));
......@@ -4973,9 +4982,17 @@ module OneM2M_PermutationFunctions {
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitiveChildResource, p_childResourceType);
v_childResourceIndex := f_cse_createResource(p_childResourceType, p_createRequestPrimitiveChildResource, v_resourceIndex);
if((p_resourceType == int23) or (p_childResourceType == int23)) {
vc_ae2.start(f_cse_notifyProcedure_defaultHandler());
}
f_cse_deleteResource(v_resourceIndex);
f_checkAeSimuStatus();
// Test Body
mcaPort.send(m_request(m_delete(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex))));
......@@ -5857,7 +5874,6 @@ module OneM2M_PermutationFunctions {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_acpIndex := -1;
var charstring v_currentTime;
var RequestPrimitive v_createRequest;
var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63));
......@@ -5872,11 +5888,11 @@ module OneM2M_PermutationFunctions {
// Preamble
v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
v_currentTime := fx_generateTimestamp();
v_accessControlRule.accessControlContexts_list := {{{"* * * * * " & f_getYear(v_currentTime)}, omit, omit}};
v_accessControlRule.accessControlContexts_list := {{{"* * * * " & f_getMonth(v_currentTime) & " *"}, omit, omit}};
v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}, -);
// Test Body
p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
......@@ -5889,6 +5905,9 @@ module OneM2M_PermutationFunctions {
[] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)");
if(p_responseStatusCode == int2002) {
f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex);
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
......@@ -5905,6 +5924,8 @@ module OneM2M_PermutationFunctions {
//Postamble
f_cse_updateAcpAuxResource(int63);
f_cse_postamble_deleteResources();
//Tear down
......@@ -5915,8 +5936,9 @@ module OneM2M_PermutationFunctions {
function f_CSE_SEC_ACP_006(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu{
// Local variables
var MsgIn v_response;
var charstring v_month;
var charstring v_currentTime;
var integer v_aeIndex := -1;
var integer v_acpIndex := -1;
var RequestPrimitive v_createRequest;
var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63));
......@@ -5929,11 +5951,18 @@ module OneM2M_PermutationFunctions {
// Preamble
v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
v_accessControlRule.accessControlContexts_list := {{{"* * * * * 3000"}, omit, omit}};
v_currentTime := fx_generateTimestamp();