diff --git a/OneM2M_Functions.ttcn b/OneM2M_Functions.ttcn index e811bddc0cbe59ce74e305b98c3e8b3960ababbd..ecb7fdd35b3fb19950f1c4a465b4680b6b1ab9d9 100644 --- a/OneM2M_Functions.ttcn +++ b/OneM2M_Functions.ttcn @@ -24,23 +24,23 @@ module OneM2M_Functions { group configFunctions { - /** - @desc - */ - function f_cf01Up() runs on M2M { + /** + @desc + */ + function f_cf01Up() runs on M2M { - // Variables + // Variables - // Map - map(self:mcaPort, system:mcaPort); - map(self:acPort, system:acPort); - activate(a_default()); + // Map + map(self:mcaPort, system:mcaPort); + map(self:acPort, system:acPort); + activate(a_default()); - // Connect + // Connect - //Initialze the IUT + //Initialze the IUT - } // end f_cf01Up + } // end f_cf01Up }//end group configFunctions @@ -64,7 +64,7 @@ module OneM2M_Functions { //TODO Test, to be removed v_request.to_ := f_addPrefix(f_getResourceAddress()); - mcaPort.send(m_request(v_request)); + mcaPort.send(m_request(v_request)); //mcaPort.send(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & c_acpAuxName}))); } else { mcaPort.send(m_request(m_createAeAux())); @@ -108,28 +108,25 @@ module OneM2M_Functions { } //Added by @Naum - function f_preamble_prepareCSE(in template (value) AccessControlOperations p_allowedOperations := int63, in template ListOfM2MID p_allowedAEs) runs on M2M return integer{//c_CRUDNDi + function f_preamble_prepareCSE(in template ListOfM2MID p_allowedAEs, in template (value) AccessControlOperations p_allowedOperations := int63) runs on M2M return integer{//c_CRUDNDi - var integer v_aeAuxIndex := -1; + var M2MResponsePrimitive v_response; + var integer v_cseBaseAuxIndex := -1; var integer v_acpAuxIndex := -1; - - if(PX_ACP_SUPPORT){ - v_acpAuxIndex := f_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations); - } + var ServiceSubscribedAppRule v_serviceSubscribedAppRule; + + v_serviceSubscribedAppRule.applicableCredIDs := {"None"}; + v_serviceSubscribedAppRule.allowedApp_IDs := {PX_APP_ID}; + v_serviceSubscribedAppRule.allowedAEs := valueof(p_allowedAEs); - if(v_acpAuxIndex != -1) { - //TODO:Discuss this case - } else { - var ServiceSubscribedAppRule v_serviceSubscribedAppRule; - v_serviceSubscribedAppRule.applicableCredIDs := {"None"}; - v_serviceSubscribedAppRule.allowedApp_IDs := {"APP-ID"}; - v_serviceSubscribedAppRule.allowedAEs := valueof(p_allowedAEs); - mcaPort.send(m_request(m_createCSEBase(v_serviceSubscribedAppRule))); - } + mcaPort.send(m_request(m_createCSEBase(v_serviceSubscribedAppRule))); + tc_ac.start; alt { - [] mcaPort.receive(mw_response(int2001)){ + [] mcaPort.receive(mw_response(int2001)) -> value v_response{ tc_ac.stop; + v_cseBaseAuxIndex := f_setResource(v_response.responsePrimitive_.primitiveContent); + vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_cseBaseAuxIndex}; } [] mcaPort.receive(mw_responseKO) { tc_ac.stop; @@ -147,7 +144,7 @@ module OneM2M_Functions { } } - return v_aeAuxIndex; + return v_cseBaseAuxIndex; } @@ -231,11 +228,11 @@ module OneM2M_Functions { function f_getCreateRequestPrimitive(in ResourceType p_resourceType, in template (omit) AccessControlOperations p_allowedOperations, template RequestPrimitive p_request, integer p_parentIndex) runs on M2M return RequestPrimitive { - p_request.from_ := f_getOriginator(p_parentIndex); + p_request.from_ := f_getOriginator(p_parentIndex); - p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex)); + p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex)); - //p_request.name := p_name; + //p_request.name := p_name; if (p_resourceType == int1) {//AccessControlPolicy @@ -551,12 +548,12 @@ module OneM2M_Functions { v_request.to_ := f_addPrefix(p_acpAddress); v_request.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := { - { - accessControlOriginators := PX_ACOR, //{"admin:admin"} - accessControlOperations := valueof(p_allowedOperations), - accessControlContexts_list := omit - } - }; + { + accessControlOriginators := PX_ACOR, //{"admin:admin"} + accessControlOperations := valueof(p_allowedOperations), + accessControlContexts_list := omit + } + }; mcaPort.send(m_request(v_request)); tc_ac.start; diff --git a/OneM2M_Templates.ttcn b/OneM2M_Templates.ttcn index a1aa37444d87a7e59a2659fb1af43ee8fe5b1aed..6c3f3316efaeb8846ef44dd2e40927486f0fe252 100644 --- a/OneM2M_Templates.ttcn +++ b/OneM2M_Templates.ttcn @@ -42,28 +42,28 @@ module OneM2M_Templates { nullFields := p_nullFields }; //Added by @Naum - template M2MRequestPrimitive m_requestReceive(in template RequestPrimitive p_requestPrimitive, in template (omit) AttributeList_1 p_nullFields := omit ) := { + template M2MRequestPrimitive mw_request(in template RequestPrimitive p_requestPrimitive, in template (omit) AttributeList_1 p_nullFields := omit ) := { requestPrimitive_ := p_requestPrimitive, - host := *, //how to define address of mcc? - xmlNamespace := PX_XML_NAMESPACE, - protocolBinding := PX_PROTOCOL_BINDING, - serialization := PX_SERIALIZATION, - nullFields := p_nullFields + host := omit, + xmlNamespace := omit, + protocolBinding := omit, + serialization := omit, + nullFields := omit }; group RequestPrimitives { group Retrieve { - /** + /** * @desc */ - template (value) RequestPrimitive m_retrieveCseBase := { - operation := int2, - to_ := c_uri_cse, - from_ := "admin:admin", - requestIdentifier := "m_retrieveCseBase" & f_rnd(1, 1000000), - resourceType := omit, + template (value) RequestPrimitive m_retrieveCseBase := { + operation := int2, + to_ := c_uri_cse, + from_ := "admin:admin", + requestIdentifier := "m_retrieveCseBase" & f_rnd(1, 1000000), + resourceType := omit, primitiveContent := omit, role := omit, originatingTimestamp := omit, @@ -77,8 +77,8 @@ module OneM2M_Templates { deliveryAggregation := omit, groupRequestIdentifier := omit, filterCriteria := omit, - discoveryResultType := omit - }; + discoveryResultType := omit + }; template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress) := { operation := int2, @@ -102,12 +102,12 @@ module OneM2M_Templates { discoveryResultType := omit }; - template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress) := { - operation := int2, - to_ := f_addPrefix(p_targetResourceAddress), - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000), - resourceType := omit, + template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress) := { + operation := int2, + to_ := f_addPrefix(p_targetResourceAddress), + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000), + resourceType := omit, primitiveContent := omit, role := omit, originatingTimestamp := omit, @@ -122,7 +122,7 @@ module OneM2M_Templates { groupRequestIdentifier := omit, filterCriteria := omit, discoveryResultType := omit - }; + }; template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList) := { operation := int2, @@ -147,18 +147,18 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit }; - }//end group Retrieve + }//end group Retrieve - group Update { - template (value) RequestPrimitive m_updateContentInstance(XSD.ID p_targetResourceAddress, XSD.String p_primitiveContent) := { - operation := int3, - to_ := p_targetResourceAddress, - from_ := "admin:admin", - requestIdentifier := "m_updateContentInstance" & f_rnd(1, 1000000), - resourceType := omit, - primitiveContent := { - any_1 := {{ContentInstance_optional := m_contentUpdateContentInstance(p_primitiveContent)}} - }, + group Update { + template (value) RequestPrimitive m_updateContentInstance(XSD.ID p_targetResourceAddress, XSD.String p_primitiveContent) := { + operation := int3, + to_ := p_targetResourceAddress, + from_ := "admin:admin", + requestIdentifier := "m_updateContentInstance" & f_rnd(1, 1000000), + resourceType := omit, + primitiveContent := { + any_1 := {{ContentInstance_optional := m_contentUpdateContentInstance(p_primitiveContent)}} + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -172,7 +172,7 @@ module OneM2M_Templates { groupRequestIdentifier := omit, filterCriteria := omit, discoveryResultType := omit - }; + }; template (value) RequestPrimitive m_updateContainerBase := { operation := int3, @@ -347,50 +347,50 @@ module OneM2M_Templates { discoveryResultType := omit }; - }//end group Update + }//end group Update - group Create { + group Create { - /*template (value) requestPrimitive m_createContainer_noName(XSD.ID p_resourceId) := { - operation := int1, - to_ := p_resourceId, - from_ := "admin:admin", - requestIdentifier := "m_createContainer", - resourceType := int3, - name := omit, - primitiveContent := { - { - m_contentContainer - } - }, - discoveryResultType := omit - };*/ + /*template (value) requestPrimitive m_createContainer_noName(XSD.ID p_resourceId) := { + operation := int1, + to_ := p_resourceId, + from_ := "admin:admin", + requestIdentifier := "m_createContainer", + resourceType := int3, + name := omit, + primitiveContent := { + { + m_contentContainer + } + }, + discoveryResultType := omit + };*/ - /*template (value) requestPrimitive m_createResource_noName(XSD.ID p_resourceId, ResourceType p_resourceType, template (value) primitiveContent p_primitiveContent) := { - operation := int1, - to_ := p_resourceId, - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_createResource", - resourceType := p_resourceType, - name := omit, - primitiveContent := { - { - p_primitiveContent - } - }, - discoveryResultType := omit - };*/ + /*template (value) requestPrimitive m_createResource_noName(XSD.ID p_resourceId, ResourceType p_resourceType, template (value) primitiveContent p_primitiveContent) := { + operation := int1, + to_ := p_resourceId, + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_createResource", + resourceType := p_resourceType, + name := omit, + primitiveContent := { + { + p_primitiveContent + } + }, + discoveryResultType := omit + };*/ //Added by @Naum - template RequestPrimitive m_createAEanncReceive(template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit, XSD.ID p_appId) := { - operation := int1, - to_ := "Not Initialized", - from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c" - requestIdentifier := "m_createAEannc" & f_rnd(1, 1000000), - resourceType := int10002, - primitiveContent := { - any_1 := {{AEAnnc_optional := m_contentCreateAEannc(c_aeAuxName, p_accessControlPolicyIDs, p_appId)}} - }, + template RequestPrimitive mw_createAEannc(template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit, XSD.ID p_appId) := { + operation := int1, + to_ := ?, + from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c" + requestIdentifier := ?, + resourceType := int10002, + primitiveContent := { + any_1 := {{AEAnnc_optional := mw_contentCreateAEannc(c_aeAuxName, p_accessControlPolicyIDs, p_appId)}} + }, role := *, originatingTimestamp := *, requestExpirationTimestamp := *, @@ -404,18 +404,18 @@ module OneM2M_Templates { groupRequestIdentifier := *, filterCriteria := *, discoveryResultType := * - }; + }; //Added by @Naum - template (value) RequestPrimitive m_createAe(template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit, XSD.ID p_appId) := { - operation := int1, - to_ := "Not Initialized", - from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c" - requestIdentifier := "m_createAe" & f_rnd(1, 1000000), - resourceType := int2, - primitiveContent := { - any_1 := {{AE_optional := m_contentCreateAe(c_aeAuxName, p_accessControlPolicyIDs, p_appId)}} - }, + template (value) RequestPrimitive m_createAe(XSD.ID p_appId, template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit) := { + operation := int1, + to_ := "Not Initialized", + from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c" + requestIdentifier := "m_createAe" & f_rnd(1, 1000000), + resourceType := int2, + primitiveContent := { + any_1 := {{AE_optional := m_contentCreateAe(c_aeAuxName, p_accessControlPolicyIDs, p_appId)}} + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -430,17 +430,17 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; - template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit ) := { - operation := int1, - to_ := "Not Initialized", - from_ := omit,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c" - requestIdentifier := "m_createAe" & f_rnd(1, 1000000), - resourceType := int2, - primitiveContent := { - any_1 := {{AE_optional := m_contentCreateAe(c_aeAuxName, p_accessControlPolicyIDs)}} - }, + template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit ) := { + operation := int1, + to_ := "Not Initialized", + from_ := omit,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c" + requestIdentifier := "m_createAe" & f_rnd(1, 1000000), + resourceType := int2, + primitiveContent := { + any_1 := {{AE_optional := m_contentCreateAe(c_aeAuxName, p_accessControlPolicyIDs)}} + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -455,7 +455,7 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; template (value) RequestPrimitive m_createAcpBase := { operation := int1, @@ -482,15 +482,15 @@ module OneM2M_Templates { }; - template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) := { - operation := int1, - to_ := f_addPrefix(p_parentResourceAddress), - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_createAcp" & f_rnd(1, 1000000), - resourceType := int1, - primitiveContent := { + template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) := { + operation := int1, + to_ := f_addPrefix(p_parentResourceAddress), + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_createAcp" & f_rnd(1, 1000000), + resourceType := int1, + primitiveContent := { any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}} - }, + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -505,17 +505,17 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; - template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := { - operation := int1, - to_ := "Not Initialized", - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_createAcp" & f_rnd(1, 1000000), - resourceType := int1, - primitiveContent := { - any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}} - }, + template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := { + operation := int1, + to_ := "Not Initialized", + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_createAcp" & f_rnd(1, 1000000), + resourceType := int1, + primitiveContent := { + any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}} + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -530,10 +530,10 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; - //Added by @Naum - template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := { + //Added by @Naum + template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := { operation := int1, to_ := "NotInitialized", from_ := PX_AE_ID_STEM, @@ -584,15 +584,15 @@ module OneM2M_Templates { }; - template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName) := { - operation := int1, - to_ := f_addPrefix(p_parentResourceAddress), - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_createContainer" & f_rnd(1, 1000000), - resourceType := int3, - primitiveContent := { - any_1 := {{Container_optional := m_contentCreateContainer}} - }, + template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName) := { + operation := int1, + to_ := f_addPrefix(p_parentResourceAddress), + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_createContainer" & f_rnd(1, 1000000), + resourceType := int3, + primitiveContent := { + any_1 := {{Container_optional := m_contentCreateContainer}} + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -607,17 +607,17 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; - template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) := { - operation := int1, - to_ := f_addPrefix(p_parentResourceAddress), - from_ := "admin:admin", - requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000), - resourceType := int4, - primitiveContent := { - any_1 := {{ContentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)}} - }, + template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) := { + operation := int1, + to_ := f_addPrefix(p_parentResourceAddress), + from_ := "admin:admin", + requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000), + resourceType := int4, + primitiveContent := { + any_1 := {{ContentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)}} + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -632,7 +632,7 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; template (value) RequestPrimitive m_createGroupBase := { operation := int1, @@ -659,15 +659,15 @@ module OneM2M_Templates { }; - template (value) RequestPrimitive m_createGroup(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.AnyURI p_memberId ) := { - operation := int1, - to_ := f_addPrefix(p_parentResourceAddress), - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_createGroup" & f_rnd(1, 1000000), - resourceType := int9, - primitiveContent := { - any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & valueof(p_memberId)}, p_accessControlPolicyIDs)}} //TODO: p_resourceId - }, + template (value) RequestPrimitive m_createGroup(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.AnyURI p_memberId ) := { + operation := int1, + to_ := f_addPrefix(p_parentResourceAddress), + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_createGroup" & f_rnd(1, 1000000), + resourceType := int9, + primitiveContent := { + any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & valueof(p_memberId)}, p_accessControlPolicyIDs)}} //TODO: p_resourceId + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -682,7 +682,7 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; template (value) RequestPrimitive m_createPollingChannelBase := { operation := int1, @@ -709,15 +709,15 @@ module OneM2M_Templates { }; - template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId, in template (omit) AcpType p_accessControlPolicyIDs ) := { - operation := int1, - to_ := f_addPrefix(p_parentResourceAddress), - from_ := p_originatorId, - requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000), - resourceType := int15, - primitiveContent := { - any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (p_accessControlPolicyIDs)}} - }, + template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId, in template (omit) AcpType p_accessControlPolicyIDs ) := { + operation := int1, + to_ := f_addPrefix(p_parentResourceAddress), + from_ := p_originatorId, + requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000), + resourceType := int15, + primitiveContent := { + any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (p_accessControlPolicyIDs)}} + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -732,44 +732,44 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; - template (value) RequestPrimitive m_createScheduleBase := { - operation := int1, - to_ := "NotInitialized", - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000), - resourceType := int18, - primitiveContent := { - any_1 := {{Schedule_optional := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}} - }, + template (value) RequestPrimitive m_createScheduleBase := { + operation := int1, + to_ := "NotInitialized", + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000), + resourceType := int18, + primitiveContent := { + any_1 := {{Schedule_optional := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}} + }, role := omit, - originatingTimestamp := omit, - requestExpirationTimestamp := omit, - resultExpirationTimestamp := omit, - operationExecutionTime := omit, - responseType := omit, - resultPersistence := omit, - resultContent := omit, - eventCategory := omit, - deliveryAggregation := omit, - groupRequestIdentifier := omit, - filterCriteria := omit, - discoveryResultType := omit + originatingTimestamp := omit, + requestExpirationTimestamp := omit, + resultExpirationTimestamp := omit, + operationExecutionTime := omit, + responseType := omit, + resultPersistence := omit, + resultContent := omit, + eventCategory := omit, + deliveryAggregation := omit, + groupRequestIdentifier := omit, + filterCriteria := omit, + discoveryResultType := omit - }; + }; - template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) := { - operation := int1, - to_ := f_addPrefix(p_parentResourceAddress), - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000), - resourceType := int18, - primitiveContent := { - any_1 := {{Schedule_optional := m_contentCreateSchedule (p_scheduleElement)}} - }, + template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) := { + operation := int1, + to_ := f_addPrefix(p_parentResourceAddress), + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000), + resourceType := int18, + primitiveContent := { + any_1 := {{Schedule_optional := m_contentCreateSchedule (p_scheduleElement)}} + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -784,7 +784,7 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; template (value) RequestPrimitive m_createSubscriptionBase := { operation := int1, @@ -811,15 +811,15 @@ module OneM2M_Templates { }; - template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ListOfURIs p_notificationURI ) := { - operation := int1, - to_ := f_addPrefix(p_parentResourceAddress), - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000), - resourceType := int23, - primitiveContent := { + template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ListOfURIs p_notificationURI ) := { + operation := int1, + to_ := f_addPrefix(p_parentResourceAddress), + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000), + resourceType := int23, + primitiveContent := { any_1 := {{Subscription_optional := m_contentCreateSubscription (p_notificationURI)}} - }, + }, role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, @@ -834,19 +834,19 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; - }//end group Create + }; + }//end group Create - group Delete { + group Delete { - template (value) RequestPrimitive m_deleteRequest(XSD.ID p_resourceAddress) := { - operation := int4, - to_ := f_addPrefix(p_resourceAddress), - from_ := PX_AE_ID_STEM, - requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000), - resourceType := omit, - primitiveContent := omit, - role := omit, + template (value) RequestPrimitive m_deleteRequest(XSD.ID p_resourceAddress) := { + operation := int4, + to_ := f_addPrefix(p_resourceAddress), + from_ := PX_AE_ID_STEM, + requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000), + resourceType := omit, + primitiveContent := omit, + role := omit, originatingTimestamp := omit, requestExpirationTimestamp := omit, resultExpirationTimestamp := omit, @@ -860,7 +860,7 @@ module OneM2M_Templates { filterCriteria := omit, discoveryResultType := omit - }; + }; template (value) RequestPrimitive m_delete(XSD.ID p_resourceAddress) := { operation := int4, @@ -885,57 +885,57 @@ module OneM2M_Templates { }; - }//end group Delete + }//end group Delete }//end group RequestPrimitives group ContentCreate { - template (value) AEAnnc_optional m_contentCreateAEannc (in template (omit) XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, XSD.ID p_appId := PX_APP_ID) := { - resourceName := p_name,//O - resourceType := omit,//NP - resourceID := omit,//NP - parentID := omit,//NP - creationTime := omit,//NP - lastModifiedTime := omit,//NP - labels := omit,//O - accessControlPolicyIDs := p_accessControlPolicyIDs,//O - expirationTime := omit,//O - link := omit,//O - appName := omit,//O - app_ID := p_appId,//M - aE_ID := omit,//NP - pointOfAccess := {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA - ontologyRef := omit,//O - nodeLink := omit,//NP - requestReachability := true,//M - contentSerialization := omit,//O - choice := omit//NP - }; + template (value) AEAnnc_optional mw_contentCreateAEannc (in template (omit) XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, XSD.ID p_appId := PX_APP_ID) := { + resourceName := p_name,//O + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//O + accessControlPolicyIDs := p_accessControlPolicyIDs,//O + expirationTime := omit,//O + link := omit,//O + appName := omit,//O + app_ID := p_appId,//M + aE_ID := omit,//NP + pointOfAccess := omit, //{"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA + ontologyRef := omit,//O + nodeLink := omit,//NP + requestReachability := true,//M + contentSerialization := omit,//O + choice := omit//NP + }; - template (value) AE_optional m_contentCreateAe (in template (omit) XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, XSD.ID p_appId := PX_APP_ID) := { - resourceName := p_name,//O - resourceType := omit,//NP - resourceID := omit,//NP - parentID := omit,//NP - creationTime := omit,//NP - lastModifiedTime := omit,//NP - labels := omit,//O - accessControlPolicyIDs := p_accessControlPolicyIDs,//O - expirationTime := omit,//O - announceTo := omit,//O - announcedAttribute := omit,//O - appName := omit,//O - app_ID := p_appId,//M - aE_ID := omit,//NP - pointOfAccess := {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA - ontologyRef := omit,//O - nodeLink := omit,//NP - requestReachability := true,//M - contentSerialization := omit,//O - choice := omit//NP - }; + template (value) AE_optional m_contentCreateAe (in template (omit) XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, XSD.ID p_appId := PX_APP_ID) := { + resourceName := p_name,//O + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//O + accessControlPolicyIDs := p_accessControlPolicyIDs,//O + expirationTime := omit,//O + announceTo := omit,//O + announcedAttribute := omit,//O + appName := omit,//O + app_ID := p_appId,//M + aE_ID := omit,//NP + pointOfAccess := omit, //{"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA + ontologyRef := omit,//O + nodeLink := omit,//NP + requestReachability := true,//M + contentSerialization := omit,//O + choice := omit//NP + }; - template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := { + template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := { resourceName := p_name,//O resourceType := omit,//NP resourceID := omit,//NP @@ -969,30 +969,30 @@ module OneM2M_Templates { //added by @Naum template (value) CSEBase_optional m_contentCreateCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := { - resourceName := omit, + resourceName := omit, resourceType := omit, - resourceID := omit, - parentID := omit, - creationTime := omit, - lastModifiedTime := omit, - labels := omit, - accessControlPolicyIDs := omit, - cseType := omit, - cSE_ID := omit, - supportedResourceType := omit, - pointOfAccess := omit, - nodeLink := omit, + resourceID := omit, + parentID := omit, + creationTime := omit, + lastModifiedTime := omit, + labels := omit, + accessControlPolicyIDs := omit, + cseType := omit, + cSE_ID := omit, + supportedResourceType := omit, + pointOfAccess := omit, + nodeLink := omit, - choice := { - choice_list := {{ - serviceSubscribedAppRule := p_serviceSubscribedAppRule - }} + choice := { + choice_list := {{ + serviceSubscribedAppRule := p_serviceSubscribedAppRule + }} } } - template (value) Group_optional m_contentCreateGroup ( in template (value) XSD.NonNegativeInteger p_maxNrOfMembers, - in template (value) ListOfURIs p_memberIds, - in template (omit) AcpType p_accessControlPolicyIDs) := { + template (value) Group_optional m_contentCreateGroup ( in template (value) XSD.NonNegativeInteger p_maxNrOfMembers, + in template (value) ListOfURIs p_memberIds, + in template (omit) AcpType p_accessControlPolicyIDs) := { resourceName := c_defaultResourceName,//O resourceType := omit,//NP resourceID := omit,//NP @@ -1015,22 +1015,22 @@ module OneM2M_Templates { groupName := omit,//O fanOutPoint := omit,//NP choice := omit//NP - }; + }; - template (value) PollingChannel_optional m_contentCreatePollingChannel ( in template (omit) AcpType p_accessControlPolicyIDs) := { + template (value) PollingChannel_optional m_contentCreatePollingChannel ( in template (omit) AcpType p_accessControlPolicyIDs) := { resourceName := c_defaultResourceName,//O - resourceType := omit,//NP - resourceID := omit,//NP - parentID := omit,//NP - creationTime := omit,//NP - lastModifiedTime := omit,//NP - labels := omit,//O - accessControlPolicyIDs := p_accessControlPolicyIDs,//O - expirationTime := omit,//O - pollingChannelURI := omit//NP - }; + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//O + accessControlPolicyIDs := p_accessControlPolicyIDs,//O + expirationTime := omit,//O + pollingChannelURI := omit//NP + }; - template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement) := { + template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement) := { resourceName := c_defaultResourceName,//O resourceType := omit,//NP resourceID := omit,//NP @@ -1043,9 +1043,9 @@ module OneM2M_Templates { announcedAttribute := omit,//O scheduleElement := p_scheduleElement,//M choice := omit//NP - }; + }; - template (value) Subscription_optional m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI) := { + template (value) Subscription_optional m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI) := { resourceName := c_defaultResourceName,//O resourceType := omit,//NP resourceID := omit,//NP @@ -1071,9 +1071,9 @@ module OneM2M_Templates { creator := omit,//O subscriberURI := omit,//O choice := omit//NP - }; + }; - template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent) := { + template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent) := { resourceName := c_defaultResourceName,//O resourceType := omit,//NP resourceID := omit,//NP @@ -1096,7 +1096,7 @@ module OneM2M_Templates { }//M }; - template (value) Container_optional m_contentCreateContainer := { + template (value) Container_optional m_contentCreateContainer := { resourceName := c_defaultResourceName,//O resourceType := omit,//NP resourceID := omit,//NP @@ -1120,7 +1120,7 @@ module OneM2M_Templates { latest := omit,//NP oldest := omit,//NP choice := omit//NP - }; + }; }//end group ContentCreate @@ -1779,28 +1779,28 @@ module OneM2M_Templates { template Container_optional mw_contentContainer_rc6 modifies mw_contentContainerBase := { resourceName := omit,//M - resourceType := omit,//M - resourceID := omit,//M - parentID := omit,//M - creationTime := omit,//M - lastModifiedTime := omit,//M - labels := omit,//O - accessControlPolicyIDs := omit,//O - expirationTime := omit,//M - announceTo := omit,//O - announcedAttribute := omit,//M - stateTag := omit,//M - creator := omit,//M - maxNrOfInstances := omit,//O - maxByteSize := omit,//O - maxInstanceAge := omit,//O - currentNrOfInstances := omit,//M - currentByteSize := omit,//M - locationID := omit,//O - ontologyRef := omit,//O - latest := omit,//M - oldest := omit,//M - choice := {childResource_list := ?}//O + resourceType := omit,//M + resourceID := omit,//M + parentID := omit,//M + creationTime := omit,//M + lastModifiedTime := omit,//M + labels := omit,//O + accessControlPolicyIDs := omit,//O + expirationTime := omit,//M + announceTo := omit,//O + announcedAttribute := omit,//M + stateTag := omit,//M + creator := omit,//M + maxNrOfInstances := omit,//O + maxByteSize := omit,//O + maxInstanceAge := omit,//O + currentNrOfInstances := omit,//M + currentByteSize := omit,//M + locationID := omit,//O + ontologyRef := omit,//O + latest := omit,//M + oldest := omit,//M + choice := {childResource_list := ?}//O } template Container_optional mw_contentContainer_rc7 modifies mw_contentContainerBase := { @@ -1920,68 +1920,68 @@ module OneM2M_Templates { group ResponsePrimitives { template M2MResponsePrimitive mw_response(ResponseStatusCode p_statusCode) := { - responsePrimitive_ := { - responseStatusCode := p_statusCode, - requestIdentifier := ?, - primitiveContent := *, + responsePrimitive_ := { + responseStatusCode := p_statusCode, + requestIdentifier := ?, + primitiveContent := *, to_ := *, - from_ := *, + from_ := *, originatingTimestamp := *, resultExpirationTimestamp := *, eventCategory := * - } - }; + } + }; - template M2MResponsePrimitive mw_responseInverse(ResponseStatusCode p_statusCode) := { - responsePrimitive_ := { - responseStatusCode := complement(p_statusCode), - requestIdentifier := ?, - primitiveContent := *, + template M2MResponsePrimitive mw_responseInverse(ResponseStatusCode p_statusCode) := { + responsePrimitive_ := { + responseStatusCode := complement(p_statusCode), + requestIdentifier := ?, + primitiveContent := *, to_ := *, - from_ := *, + from_ := *, originatingTimestamp := *, resultExpirationTimestamp := *, eventCategory := * - } - }; + } + }; - template M2MResponsePrimitive mw_responseOK(in template PrimitiveContent p_content := *) := { - responsePrimitive_ := { - responseStatusCode := (int2000, int2001, int2002, int2004), - requestIdentifier := ?, - primitiveContent := p_content, + template M2MResponsePrimitive mw_responseOK(in template PrimitiveContent p_content := *) := { + responsePrimitive_ := { + responseStatusCode := (int2000, int2001, int2002, int2004), + requestIdentifier := ?, + primitiveContent := p_content, to_ := *, - from_ := *, + from_ := *, originatingTimestamp := *, resultExpirationTimestamp := *, eventCategory := * - } - }; + } + }; - template M2MResponsePrimitive mw_responseKO := { - responsePrimitive_ := { - responseStatusCode := complement(int2000, int2001, int2002, int2004), - requestIdentifier := ?, - primitiveContent := *, + template M2MResponsePrimitive mw_responseKO := { + responsePrimitive_ := { + responseStatusCode := complement(int2000, int2001, int2002, int2004), + requestIdentifier := ?, + primitiveContent := *, to_ := *, - from_ := *, - originatingTimestamp := *, - resultExpirationTimestamp := *, - eventCategory := * - } - }; + from_ := *, + originatingTimestamp := *, + resultExpirationTimestamp := *, + eventCategory := * + } + }; }//end group ResponsePrimitives function f_addPrefix(XSD.ID v_address) return XSD.ID { //TODO Test, to be removed if(PX_ADDRESSING_FORMAT == e_cseRelative) { v_address := "/" & v_address; - } else if (PX_ADDRESSING_FORMAT == e_spRelative) { + } else if (PX_ADDRESSING_FORMAT == e_spRelative) { v_address := "/~" & v_address; - } else { + } else { v_address := "/~" & v_address; - } + } return v_address; diff --git a/OneM2M_TestSystem.ttcn b/OneM2M_TestSystem.ttcn index 9bdbbe024ba81e01249c737bb254337cc04d7083..d9bbbbfc80b7082861573207dfee45705a6ee586 100644 --- a/OneM2M_TestSystem.ttcn +++ b/OneM2M_TestSystem.ttcn @@ -57,8 +57,8 @@ module OneM2M_TestSystem { /* Primitives */ type record M2MRequestPrimitive { RequestPrimitive requestPrimitive_, - charstring host, - charstring xmlNamespace, + charstring host optional, + charstring xmlNamespace optional, charstring protocolBinding optional, charstring serialization optional, AttributeList_1 nullFields optional @@ -68,6 +68,18 @@ module OneM2M_TestSystem { ResponsePrimitive responsePrimitive_ } + type record M2MPrimitive { + union { + RequestPrimitive requestPrimitive_, + ResponsePrimitive responsePrimitive_ + } primitive, + charstring host optional, + charstring xmlNamespace optional, + charstring protocolBinding optional, + charstring serialization optional, + AttributeList_1 nullFields optional + } + type record AcRequestPrimitive { charstring event, anytype data diff --git a/OneM2M_Testcases.ttcn b/OneM2M_Testcases.ttcn index 4c237d046eb0f4ee8b6368abc4f3994945d9ea81..fcd769fe6c5b14410ef37dfe2f306ee714b6bf06 100644 --- a/OneM2M_Testcases.ttcn +++ b/OneM2M_Testcases.ttcn @@ -106,63 +106,60 @@ module OneM2M_Testcases { group CSE { - group Registration { + group Registration { - testcase TC_CSE_REG_BV_001() runs on M2M system M2MSystem { + testcase TC_CSE_REG_BV_001() runs on M2M system M2MSystem { - var M2MResponsePrimitive v_response; + var M2MResponsePrimitive v_response; var RequestPrimitive v_request; - var integer v_aeIndex := -1; + var integer v_cseBaseIndex := -1; var integer v_resourceIndex := -1; var ResourceType v_resourceType := int2; - template RequestPrimitive v_requestPrimitive := m_createAe(omit, "", "APP_ID"); - - //Preambule - template (value) AccessControlOperations v_allowedOperations := int63; - v_aeIndex := f_preamble_prepareCSE(v_allowedOperations, {"C-AE-ID-STEM"});//c_CRUDNDi); + + //Preambule + v_cseBaseIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"});//c_CRUDNDi); + //Test Body + v_request := valueof(m_createAe(PX_APP_ID, omit, omit)); + + v_request := f_getCreateRequestPrimitive(v_resourceType, omit, v_request, v_cseBaseIndex); + + mcaPort.send(m_request(v_request)); + + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(int2001)) { + tc_ac.stop; + setverdict(pass, testcasename() & ": AE successfuly created."); + } + [] mcaPort.receive(mw_responseInverse(int2001)) -> value v_response{ + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.responsePrimitive_.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while creating AE"); + } + } + + // Postamble + f_postamble_deleteResources(); - v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex); - - // Test Body - v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex))); - - v_request.resultContent := int0;//Nothing - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(int2001)) { - tc_ac.stop; - setverdict(pass, testcasename() & ": AE successfuly created."); - } - [] mcaPort.receive(mw_responseInverse(int2001)) -> value v_response{ - tc_ac.stop; - setverdict(fail, testcasename() & ": Error while creating AE with status code " & int2str(enum2int(v_response.responsePrimitive_.responseStatusCode))); - } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while creating AE"); - } - } - - // Postamble - f_postamble_deleteResources(); - - } + } - testcase TC_CSE_REG_BV_002() runs on M2M system M2MSystem { + testcase TC_CSE_REG_BV_002() runs on M2M system M2MSystem { - var M2MResponsePrimitive v_response; + var M2MResponsePrimitive v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; var ResourceType v_resourceType := int2; - template RequestPrimitive v_requestPrimitive := m_createAe(omit, "C-AE-ID-STEM", "APP_ID"); + template RequestPrimitive v_requestPrimitive := m_createAe("APP_ID", omit , "C-AE-ID-STEM"); - //Preambule - template (value) AccessControlOperations v_allowedOperations := int63; - v_aeIndex := f_preamble_prepareCSE(v_allowedOperations,{"C-AE-ID-STEM"});//c_CRUDNDi); + //Preambule + template (value) AccessControlOperations v_allowedOperations := int63; + v_aeIndex := f_preamble_prepareCSE({"C-AE-ID-STEM"}, v_allowedOperations);//c_CRUDNDi); v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex); @@ -170,7 +167,7 @@ module OneM2M_Testcases { // Test Body v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex))); - v_request.resultContent := int0;//Nothing + v_request.resultContent := int0;//Nothing mcaPort.send(m_request(v_request)); tc_ac.start; alt { @@ -190,20 +187,20 @@ module OneM2M_Testcases { // Postamble f_postamble_deleteResources(); - } + } - testcase TC_CSE_REG_BV_003() runs on M2M system M2MSystem { + testcase TC_CSE_REG_BV_003() runs on M2M system M2MSystem { - var M2MResponsePrimitive v_response; + var M2MResponsePrimitive v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; var ResourceType v_resourceType := int2; - template RequestPrimitive v_requestPrimitive := m_createAe(omit, omit, "APP_ID"); + template RequestPrimitive v_requestPrimitive := m_createAe("APP_ID", omit, omit ); - //Preambule - template (value) AccessControlOperations v_allowedOperations := int63; - v_aeIndex := f_preamble_prepareCSE(v_allowedOperations, omit);//c_CRUDNDi); + //Preambule + template (value) AccessControlOperations v_allowedOperations := int63; + v_aeIndex := f_preamble_prepareCSE( omit, v_allowedOperations);//c_CRUDNDi); v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex); @@ -211,7 +208,7 @@ module OneM2M_Testcases { // Test Body v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex))); - v_request.resultContent := int0;//Nothing + v_request.resultContent := int0;//Nothing mcaPort.send(m_request(v_request)); tc_ac.start; alt { @@ -231,20 +228,20 @@ module OneM2M_Testcases { // Postamble f_postamble_deleteResources(); - } + } - testcase TC_CSE_REG_BV_004() runs on M2M system M2MSystem { + testcase TC_CSE_REG_BV_004() runs on M2M system M2MSystem { - var M2MResponsePrimitive v_response; + var M2MResponsePrimitive v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; var ResourceType v_resourceType := int2; - template RequestPrimitive v_requestPrimitive := m_createAe(omit, "C-AE-ID-STEM", "APP_ID"); + template RequestPrimitive v_requestPrimitive := m_createAe( "C-AE-ID-STEM", {"APP_ID"}, omit); - //Preambule - template (value) AccessControlOperations v_allowedOperations := int63; - v_aeIndex := f_preamble_prepareCSE(v_allowedOperations, omit);//c_CRUDNDi); + //Preambule + template (value) AccessControlOperations v_allowedOperations := int63; + v_aeIndex := f_preamble_prepareCSE(omit, v_allowedOperations);//c_CRUDNDi); v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex); @@ -252,7 +249,7 @@ module OneM2M_Testcases { // Test Body v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex))); - v_request.resultContent := int0;//Nothing + v_request.resultContent := int0;//Nothing mcaPort.send(m_request(v_request)); tc_ac.start; alt { @@ -272,20 +269,20 @@ module OneM2M_Testcases { // Postamble f_postamble_deleteResources(); - } + } - testcase TC_CSE_REG_BV_005() runs on M2M system M2MSystem { + testcase TC_CSE_REG_BV_005() runs on M2M system M2MSystem { - var M2MResponsePrimitive v_response; + var M2MResponsePrimitive v_response; var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; var ResourceType v_resourceType := int2; - template RequestPrimitive v_requestPrimitive := m_createAe(omit, "", "APP_ID"); + template RequestPrimitive v_requestPrimitive := m_createAe( "APP_ID", omit, omit); - //Preambule - template (value) AccessControlOperations v_allowedOperations := int63; - v_aeIndex := f_preamble_prepareCSE(v_allowedOperations,{"S*"});//c_CRUDNDi); + //Preambule + template (value) AccessControlOperations v_allowedOperations := int63; + v_aeIndex := f_preamble_prepareCSE({"S"}, v_allowedOperations);//c_CRUDNDi); v_resourceIndex := f_createResource(v_resourceType, v_requestPrimitive, v_aeIndex); @@ -293,13 +290,11 @@ module OneM2M_Testcases { // Test Body v_request := valueof(m_retrieveResource(f_getResourceAddress(v_resourceIndex))); - v_request.resultContent := int0;//Nothing mcaPort.send(m_request(v_request)); tc_ac.start; - - template RequestPrimitive v_responsePrimitive := m_createAEanncReceive(omit, "", "APP_ID"); + alt { - [] mccPort.receive(m_requestReceive(v_responsePrimitive)) { + [] mccPort.receive(mw_request(mw_createAEannc( omit, omit, "APP_ID"))) { tc_ac.stop; setverdict(pass, testcasename() & ": AE creation redirected."); } @@ -315,9 +310,9 @@ module OneM2M_Testcases { // Postamble f_postamble_deleteResources(); - } + } - }//end Registration + }//end Registration group Data_Management_and_Repository { @@ -1066,11 +1061,11 @@ module OneM2M_Testcases { log(v_responsePrimitive); - if(getverdict == pass){ - if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){ - setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); - } - } + if(getverdict == pass){ + if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){ + setverdict(fail, testcasename(), ": Error, resourceName attribute not provided"); + } + } } testcase TC_CSE_DMR_CRE_BV_001_02() runs on M2M system M2MSystem { @@ -1153,50 +1148,50 @@ module OneM2M_Testcases { } } - function f_CSE_DMR_CRE_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M return ResponsePrimitive { + function f_CSE_DMR_CRE_BV_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M return ResponsePrimitive { - // Local variables - var M2MResponsePrimitive v_response; - var RequestPrimitive v_request; + // Local variables + var M2MResponsePrimitive v_response; + var RequestPrimitive v_request; var integer v_aeIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble v_aeIndex := f_preamble_registerAe();//c_CRUDNDi); - // Test Body + // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, omit, p_requestPrimitive, v_aeIndex); - - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_responseOK) -> value v_response { - tc_ac.stop; - setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly"); - } - [] mcaPort.receive(mw_responseKO) -> value v_response { - tc_ac.stop; - setverdict(fail, testcasename() & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } + v_request := f_getCreateRequestPrimitive(p_resourceType, omit, p_requestPrimitive, v_aeIndex); + + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_responseOK) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly"); + } + [] mcaPort.receive(mw_responseKO) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } - // Postamble - f_postamble_deleteResources(); + // Postamble + f_postamble_deleteResources(); - return v_response.responsePrimitive_; + return v_response.responsePrimitive_; - }//end f_CSE_DMR_CRE_BV_001 + }//end f_CSE_DMR_CRE_BV_001 } // end g_CSE_DMR_CRE_BV_001 @@ -1205,7 +1200,7 @@ module OneM2M_Testcases { testcase TC_CSE_DMR_CRE_BV_002_01() runs on M2M system M2MSystem { // Local variables - var ResponsePrimitive v_responsePrimitive; + var ResponsePrimitive v_responsePrimitive; v_responsePrimitive := f_CSE_DMR_CRE_BV_002(int3, m_createContainerBase);//container @@ -1389,56 +1384,56 @@ module OneM2M_Testcases { } - function f_CSE_DMR_CRE_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M {//system M2MSystem { MRO system keyword not supported on functions in Titan + function f_CSE_DMR_CRE_BV_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on M2M {//system M2MSystem { MRO system keyword not supported on functions in Titan - // Local variables - var M2MResponsePrimitive v_response; - var RequestPrimitive v_request; + // Local variables + var M2MResponsePrimitive v_response; + var RequestPrimitive v_request; var integer v_aeIndex := -1; var integer v_resourceIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble v_aeIndex := f_preamble_registerAe();//c_CRUDNDi); v_resourceIndex := f_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); v_request := f_getCreateRequestPrimitive(p_resourceType, omit, p_requestPrimitive, v_aeIndex); - // Test Body + // Test Body v_request.requestIdentifier := "Existing resource"; - mcaPort.send(m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(int4105)) -> value v_response { - tc_ac.stop; - setverdict(pass, testcasename() & ": Resource already exists"); - } - [] mcaPort.receive(mw_responseKO) -> value v_response { - tc_ac.stop; - setverdict(fail, testcasename() & ": Error while creating an already existing resource"); - } + mcaPort.send(m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(int4105)) -> value v_response { + tc_ac.stop; + setverdict(pass, testcasename() & ": Resource already exists"); + } + [] mcaPort.receive(mw_responseKO) -> value v_response { + tc_ac.stop; + setverdict(fail, testcasename() & ": Error while creating an already existing resource"); + } [] mcaPort.receive(mw_responseOK) -> value v_response { tc_ac.stop; setverdict(fail, testcasename() & ": Creating a resource that already exists"); } - [] tc_ac.timeout { - setverdict(inconc, testcasename() & ": No answer while creating resource"); - } - } + [] tc_ac.timeout { + setverdict(inconc, testcasename() & ": No answer while creating resource"); + } + } - // Postamble - f_postamble_deleteResources(); + // Postamble + f_postamble_deleteResources(); - }//end f_CSE_DMR_CRE_BV_003 + }//end f_CSE_DMR_CRE_BV_003 }// end group g_CSE_DMR_CRE_BV_003 @@ -1780,7 +1775,7 @@ module OneM2M_Testcases { // Preamble v_aeIndex := f_preamble_registerAe();//c_CRUDNDi; - v_resourceIndex := f_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + v_resourceIndex := f_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); f_updateAcpAuxResource(f_getResourceAddress(0), int61); //c_CUDNDi @@ -2367,9 +2362,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_2){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_2){ + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2418,8 +2413,8 @@ module OneM2M_Testcases { if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy)) { if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy.labels != v_labels_2){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2444,8 +2439,8 @@ module OneM2M_Testcases { if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) { if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels != v_labels_2){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2469,9 +2464,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_2){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_2){ + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2495,8 +2490,8 @@ module OneM2M_Testcases { if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) { if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels != v_labels_2){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2557,7 +2552,7 @@ module OneM2M_Testcases { testcase TC_CSE_DMR_UPD_BV_002_01() runs on M2M system M2MSystem { // Local variables var Labels v_labels_1 := {"VALUE_1"}; - var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; var ResponsePrimitive v_responsePrimitive; v_updateRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; @@ -2568,9 +2563,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_1){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels != v_labels_1){ + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2590,9 +2585,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels != v_labels_1){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels != v_labels_1){ + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2612,9 +2607,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels != v_labels_1){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels != v_labels_1){ + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2634,9 +2629,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels != v_labels_1){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels != v_labels_1){ + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2656,9 +2651,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_1){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels != v_labels_1){ + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2678,9 +2673,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) { - if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels != v_labels_1){ - setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") - } + if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels != v_labels_1){ + setverdict(fail, testcasename() & ": Error: Labels attribute not updated correctly") + } } } } @@ -2742,7 +2737,7 @@ module OneM2M_Testcases { var Labels v_labels_2 := {"To be deleted"}; var AttributeList v_nullFields; var ResponsePrimitive v_responsePrimitive; - var template RequestPrimitive v_createRequest := m_createContainerBase; + var template RequestPrimitive v_createRequest := m_createContainerBase; var template RequestPrimitive v_updateRequest := m_updateContainerBase; v_createRequest.primitiveContent.any_1[0].Container_optional.labels := v_labels_1; @@ -2756,9 +2751,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){ // FIXME: CHECK: labels set to empty - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){ // FIXME: CHECK: labels set to empty + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -2784,9 +2779,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -2812,9 +2807,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -2840,9 +2835,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -2868,9 +2863,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -2896,9 +2891,9 @@ module OneM2M_Testcases { //Check attribute 1 if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) { - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -2975,18 +2970,18 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Container_optional)) { - //Check attribute 1 - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.expirationTime != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime)){ - setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") - } - //Check attribute 2 - if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){ - setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") - } - //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + //Check attribute 1 + if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.expirationTime != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.expirationTime)){ + setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") + } + //Check attribute 2 + if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.maxNrOfInstances != valueof(v_updateRequest.primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){ + setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") + } + //Check attribute 3 + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -3018,18 +3013,18 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Group_optional)) { - //Check attribute 1 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.groupName, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName))){ - setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") - } - //Check attribute 2 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs))){ - setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") - } - //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + //Check attribute 1 + if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.groupName, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.groupName))){ + setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") + } + //Check attribute 2 + if(not match(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs))){ + setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") + } + //Check attribute 3 + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -3074,18 +3069,18 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional)) { - //Check attribute 1 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges))){ - setverdict(fail, testcasename() & ": Error: Privileges attribute not updated correctly") - } - //Check attribute 2 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo))){ - setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") - } - //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + //Check attribute 1 + if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges))){ + setverdict(fail, testcasename() & ": Error: Privileges attribute not updated correctly") + } + //Check attribute 2 + if(not match(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo, valueof(v_updateRequest.primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo))){ + setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") + } + //Check attribute 3 + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -3112,18 +3107,18 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional)) { - //Check attribute 1 - if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.scheduleElement != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement)){ - setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") - } - //Check attribute 2 - if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.announceTo != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.announceTo)){ - setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") - } - //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + //Check attribute 1 + if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.scheduleElement != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.scheduleElement)){ + setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") + } + //Check attribute 2 + if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.announceTo != valueof(v_updateRequest.primitiveContent.any_1[0].Schedule_optional.announceTo)){ + setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") + } + //Check attribute 3 + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -3151,16 +3146,16 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional)) { - //Check attribute 1 + //Check attribute 1 - //Check attribute 2 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs))){ - setverdict(fail, testcasename() & ": Error: ACPI attribute not added correctly") - } - //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + //Check attribute 2 + if(not match(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs))){ + setverdict(fail, testcasename() & ": Error: ACPI attribute not added correctly") + } + //Check attribute 3 + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } } @@ -3189,21 +3184,21 @@ module OneM2M_Testcases { if(getverdict == pass){ if(ispresent(v_responsePrimitive.primitiveContent)) { if(ischosen(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional)) { - //Check attribute 1 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels))){ - setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") - } - //Check attribute 2 - if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs))){ - setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") - } - //Check attribute 3 - if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationCounter)){ - setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") - } + //Check attribute 1 + if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.labels, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.labels))){ + setverdict(fail, testcasename() & ": Error: Expiration Time attribute not updated correctly") + } + //Check attribute 2 + if(not match(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs))){ + setverdict(fail, testcasename() & ": Error: MaxNrOfInstances attribute not updated correctly") + } + //Check attribute 3 + if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.expirationCounter)){ + setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly") + } } } - } + } } function f_CSE_DMR_UPD_BV_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeList_1 p_nullFields := omit) runs on M2M return ResponsePrimitive {