Commit f5858c4a authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega

Merge remote-tracking branch 'remotes/origin/Release1'

Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parents d194674d de520e82
This diff is collapsed.
......@@ -77,7 +77,7 @@ module OneM2M_Pixits {
modulepar charstring PX_XML_NAMESPACE := "m2m=""http://www.onem2m.org/xml/protocols""";
modulepar ListOfURIs PX_ACOR := {"*"};
modulepar ListOfURIs PX_ACOR := {"all"};
}
......
......@@ -80,6 +80,7 @@ module OneM2M_TestSystem {
type component AeSystem {
port OneM2MPort mcaPort;
port OneM2MPort mcaPortIn;
port AdapterControlPort acPort;
port UpperTesterPort utPort;
}
......
......@@ -38,6 +38,7 @@ module OneM2M_TypesAndValues {
const XSD.String c_defaultm2mServiceSubscriptionProfileResourceName := "Mym2mServiceSubscriptionProfileResource";
const XSD.String c_defaultServiceSubscribedAppRuleResourceName := "MyServiceSubscribedAppRuleResource";
const XSD.ID c_aeAuxName := "MyAe";
const XSD.String c_defaultAE2Name := "MyAe2";
const XSD.String c_acpAuxName := "MyAcp";
const charstring c_invalid_location_update_period := "-PT30M10S" ;//duration set to invalid value (minus value)
const XSD.ID c_resourceShortNameLatest := "la"; //<latest>
......
This diff is collapsed.
......@@ -4220,14 +4220,14 @@ module OneM2M_Testcases_CSE {
var ResponsePrimitive v_responsePrimitive;
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_createRequest.primitiveContent.mgmtResource.resourceName := omit;
v_createRequest.primitiveContent.mgmtCmd.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int12, v_createRequest, -));//Management Command
v_ae1.done;
if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
if(not ispresent(v_responsePrimitive.primitiveContent.mgmtResource.resourceName)){
if(not ispresent(v_responsePrimitive.primitiveContent.mgmtCmd.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
......@@ -4376,7 +4376,7 @@ module OneM2M_Testcases_CSE {
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, "MyAe2", v_poaList), -1)); // AE2 is registred
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;
v_ae2Index := f_getResource(vc_ae2);
p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
......@@ -4411,7 +4411,7 @@ module OneM2M_Testcases_CSE {
// Test Body
if(match(int23, p_requestPrimitive.resourceType)){
vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1)); // AE2 is registred
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;
v_ae2Index := f_getResource(vc_ae2);
p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
......@@ -5664,11 +5664,11 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContainerBase;
const AttributeList c_optionalAttribute := {"creator"};
var AttributeList v_optionalAttribute := {"creator"};
v_createRequest.primitiveContent.container.creator := "";
v_createRequest.primitiveContent.container.creator := "NullValue";
v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, c_optionalAttribute));
v_ae1.start(f_CSE_DMR_CRE_012(int3, v_createRequest, v_optionalAttribute));
v_ae1.done;
}
......@@ -5702,11 +5702,11 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createContentInstanceBase;
const AttributeList c_optionalAttribute := {"creator"};
var AttributeList v_optionalAttribute := {"creator"};
v_createRequest.primitiveContent.contentInstance.creator := "NotInitialized";
v_createRequest.primitiveContent.contentInstance.creator := "NullValue";
v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, c_optionalAttribute));
v_ae1.start(f_CSE_DMR_CRE_012(int4, v_createRequest, v_optionalAttribute));
v_ae1.done;
}
......@@ -5959,11 +5959,11 @@ module OneM2M_Testcases_CSE {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var template RequestPrimitive v_createRequest := m_createSubscriptionBase;
const AttributeList c_optionalAttribute := {"creator"};
var AttributeList v_optionalAttribute := {"creator"};
v_createRequest.primitiveContent.subscription.creator := "MyCreator";
v_createRequest.primitiveContent.subscription.creator := "NullValue";
v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, c_optionalAttribute));
v_ae1.start(f_CSE_DMR_CRE_012(int23, v_createRequest, v_optionalAttribute));
v_ae1.done;
}
......@@ -5992,9 +5992,10 @@ module OneM2M_Testcases_CSE {
var integer v_ae2Index := -1;
const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs";
var integer v_resourceIndex := -1;
var XSD.NCName v_myOptionalAttribute := p_optionalAttribute[0];
// Test control
if(p_optionalAttribute[0] == c_accessControlPolicyIDs) {
if(v_myOptionalAttribute == c_accessControlPolicyIDs) {
if(not(PICS_ACP_SUPPORT)) {
setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
stop;
......@@ -6007,7 +6008,7 @@ module OneM2M_Testcases_CSE {
// Test adapter configuration
// Preamble
if (p_optionalAttribute[0] == c_accessControlPolicyIDs) {
if (v_myOptionalAttribute == c_accessControlPolicyIDs) {
v_acpAuxIndex := f_cse_preamble_createAcpAux();//c_CRUDNDi)
}
......@@ -6022,17 +6023,18 @@ module OneM2M_Testcases_CSE {
}
// Test Body
// if(p_optionalAttribute[0] == "creator") {
// p_requestPrimitive.primitiveContent.container.creator := vc_resourcesList[v_parentIndex].resource.aE.aE_ID;
// }
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex);
mcaPort.send(m_request(v_request));
if(v_myOptionalAttribute == "creator") {
mcaPort.send(m_request(v_request, {{v_myOptionalAttribute, omit}}));
} else {
mcaPort.send(m_request(v_request));
}
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute[0]);
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & v_myOptionalAttribute);
f_checkAttributesToBeSaved(p_resourceType, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex);
}
......@@ -14998,7 +15000,7 @@ module OneM2M_Testcases_CSE {
testcase TC_CSE_DMR_UPD_016_ACP_ET() runs on Tester system CseSystem {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var Timestamp v_expirationTime := "21001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
......@@ -16012,6 +16014,7 @@ module OneM2M_Testcases_CSE {
var integer v_contentInstanceIndex_1 := -1;
var integer v_contentInstanceIndex_2 := -1;
const ResourceType c_containerResourceType := int3;
timer t_contentInstanceCreationGap;
// Test control
......@@ -16026,6 +16029,10 @@ module OneM2M_Testcases_CSE {
v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
v_contentInstanceIndex_1 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex);
t_contentInstanceCreationGap.start(1.0);
t_contentInstanceCreationGap.timeout;
v_contentInstanceIndex_2 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex);
// Test Body
......@@ -16152,6 +16159,7 @@ module OneM2M_Testcases_CSE {
var integer v_contentInstanceIndex_1 := -1;
var integer v_contentInstanceIndex_2 := -1;
const ResourceType c_containerResourceType := int3;
timer t_contentInstanceCreationGap;
// Test control
......@@ -16166,6 +16174,10 @@ module OneM2M_Testcases_CSE {
v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
v_contentInstanceIndex_1 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex);
t_contentInstanceCreationGap.start(1.0);
t_contentInstanceCreationGap.timeout;
v_contentInstanceIndex_2 := f_cse_createResource(int4, m_createContentInstance_noResourceName, v_containerIndex);
// Test Body
......@@ -19167,7 +19179,7 @@ module OneM2M_Testcases_CSE {
// Preamble
v_aeIndex_1 := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", omit), -1); // AE2 is registred
v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, c_defaultAE2Name, omit), -1); // AE2 is registred
v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); // AE child resource
v_containerIndex_1 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex_1); // AE1 child resource
v_containerIndex_2 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex_2); // AE2 child resource
......@@ -21700,7 +21712,7 @@ module OneM2M_Testcases_CSE {
}
//Postamble
v_accessControlRule_1 := valueof(m_createAcr({"*"}, int63));
v_accessControlRule_1 := valueof(m_createAcr({"all"}, int63));
v_setOfArcs.accessControlRule_list := {v_accessControlRule_1};
v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs));
v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest);
......
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