Skip to content
Snippets Groups Projects
Commit dba60544 authored by Pramod Kulkarni's avatar Pramod Kulkarni
Browse files

Merge branch 'master' into STF531-DISCOVERY_TEST_CASES

parents bf372f61 398350e0
No related branches found
No related tags found
2 merge requests!25Ae fixes,!15Stf531 discovery test cases
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* @author oneM2M * @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $ * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 248 2017-03-29 13:59:41Z reinaortega $ * $Id: OneM2M_Functions.ttcn 296 2017-06-02 13:16:50Z reinaortega $
* @desc Module containing functions for oneM2M * @desc Module containing functions for oneM2M
* *
*/ */
...@@ -175,8 +175,8 @@ module OneM2M_Functions { ...@@ -175,8 +175,8 @@ module OneM2M_Functions {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass,__SCOPE__&":INFO: Application registered successfuly"); setverdict(pass,__SCOPE__&":INFO: Application registered successfuly");
if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional)) { if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE_optional)) {
vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional; vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.aE_optional;
f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive);
...@@ -246,8 +246,8 @@ module OneM2M_Functions { ...@@ -246,8 +246,8 @@ module OneM2M_Functions {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__&": INFO: Application registered successfuly"); setverdict(pass, __SCOPE__&": INFO: Application registered successfuly");
if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional)) { if(ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE_optional)) {
vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.any_1[0].AE_optional; vc_aeAux := v_response.primitive.responsePrimitive.primitiveContent.aE_optional;
v_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent); v_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent);
vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_aeAuxIndex}; vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_aeAuxIndex};
...@@ -281,7 +281,6 @@ module OneM2M_Functions { ...@@ -281,7 +281,6 @@ module OneM2M_Functions {
} }
//Added by @Naum
function f_cse_preamble_createServiceSubscribedAppRule(in template ListOfM2MID p_allowedAEs := {""}) runs on CseTester return integer {//c_CRUDNDi function f_cse_preamble_createServiceSubscribedAppRule(in template ListOfM2MID p_allowedAEs := {""}) runs on CseTester return integer {//c_CRUDNDi
var integer v_serviceSubscribedAppRuleIndex := -1; var integer v_serviceSubscribedAppRuleIndex := -1;
...@@ -295,9 +294,9 @@ module OneM2M_Functions { ...@@ -295,9 +294,9 @@ module OneM2M_Functions {
function f_cse_preamble_subscriptionVerification(out CseTester p_notifyHandler,in integer p_aeIndex, inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType ) runs on CseTester { function f_cse_preamble_subscriptionVerification(out CseTester p_notifyHandler,in integer p_aeIndex, inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType ) runs on CseTester {
if(p_resourceType == int23){ if(p_resourceType == int23){
p_notifyHandler := CseTester.create("NotifyHandler") alive; p_notifyHandler := CseTester.create("NotifyHandler") alive;
p_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {"http://" & PX_TESTER_ADDRESS & "/"}), -1); // AE2 is registred p_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {"http://" & PX_AE2_ADDRESS & "/"}), -1); // AE2 is registred
if(ischosen(p_createRequestPrimitive.primitiveContent.any_1[0].Subscription_optional)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced if(ischosen(p_createRequestPrimitive.primitiveContent.subscription_optional)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced
p_createRequestPrimitive.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_ae2Index)}; p_createRequestPrimitive.primitiveContent.subscription_optional.notificationURI := {f_getResourceAddress(p_ae2Index)};
} }
p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(p_aeIndex))); p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(p_aeIndex)));
} }
...@@ -324,12 +323,13 @@ module OneM2M_Functions { ...@@ -324,12 +323,13 @@ module OneM2M_Functions {
v_request := valueof(m_deleteRequest(v_resourceAddress)); v_request := valueof(m_deleteRequest(v_resourceAddress));
//Not needed any longer: PX_SUPER_USER should be able to do all operations //For deletion of AEs, priority is to use AE-ID in From parameter
// if(PX_FROM_IS_AE_ID){ //For other resources PX_SUPER_USER should be able to do DELETE operation
// if(ischosen(vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.any_1[0].AE_optional)) { if(PX_FROM_IS_AE_ID){
// v_request.from_ := vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.any_1[0].AE_optional.aE_ID; if(ischosen(vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.aE_optional)) {
// } v_request.from_ := vc_resourcesList[vc_resourcesIndexToBeDeleted[i]].resource.aE_optional.aE_ID;
// } }
}
mcaPort.send(m_request(v_request)); mcaPort.send(m_request(v_request));
...@@ -488,8 +488,8 @@ module OneM2M_Functions { ...@@ -488,8 +488,8 @@ module OneM2M_Functions {
v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_acpName := c_acpAuxName);//"MyAcp_2" v_acpAuxIndex := f_cse_createAccessControlPolicyAux(p_acpName := c_acpAuxName);//"MyAcp_2"
v_request := valueof(m_createContainerBase); v_request := valueof(m_createContainerBase);
v_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}; v_request.primitiveContent.container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)};
v_request.primitiveContent.any_1[0].Container_optional.resourceName := "MyContainerAux"; v_request.primitiveContent.container_optional.resourceName := "MyContainerAux";
v_containerResourceIndex := f_cse_createResource(int3, v_request, p_parentIndex); v_containerResourceIndex := f_cse_createResource(int3, v_request, p_parentIndex);
...@@ -604,7 +604,7 @@ module OneM2M_Functions { ...@@ -604,7 +604,7 @@ module OneM2M_Functions {
v_request.to_ := f_getResourceAddress(vc_acpAuxIndex); v_request.to_ := f_getResourceAddress(vc_acpAuxIndex);
v_request.from_ := f_getOriginator(vc_acpAuxIndex); v_request.from_ := f_getOriginator(vc_acpAuxIndex);
v_request.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := { v_request.primitiveContent.accessControlPolicy_optional.privileges.accessControlRule_list := {
{ {
accessControlOriginators := PX_ACOR, //{"admin:admin"} accessControlOriginators := PX_ACOR, //{"admin:admin"}
accessControlOperations := valueof(p_allowedOperations), accessControlOperations := valueof(p_allowedOperations),
...@@ -670,7 +670,7 @@ module OneM2M_Functions { ...@@ -670,7 +670,7 @@ module OneM2M_Functions {
} //end f_cse_resourceAnnouncementHandler } //end f_cse_resourceAnnouncementHandler
function f_subscriptionVerificationHandler(in XSD.ID p_creator, in ResponseStatusCode p_responseStatusCode := int2001) runs on CseTester { function f_subscriptionVerificationHandler(in XSD.ID p_creator, in ResponseStatusCode p_responseStatusCode := int2000) runs on CseTester {
// Local variables // Local variables
var MsgIn v_response; var MsgIn v_response;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
...@@ -680,7 +680,7 @@ module OneM2M_Functions { ...@@ -680,7 +680,7 @@ module OneM2M_Functions {
map(self:mcaPort, system:mcaPort); map(self:mcaPort, system:mcaPort);
map(self:acPort, system:acPort); map(self:acPort, system:acPort);
v_notificationResponse.any_1 := {{Notification := valueof(m_contentNotification_allOmit)}}; v_notificationResponse := {notification := valueof(m_contentNotification_allOmit)};
v_notificationRequest.verificationRequest := true; v_notificationRequest.verificationRequest := true;
//v_notificationRequest.creator := p_creator; TODO To check what address format is to be expected //v_notificationRequest.creator := p_creator; TODO To check what address format is to be expected
...@@ -697,7 +697,8 @@ module OneM2M_Functions { ...@@ -697,7 +697,8 @@ module OneM2M_Functions {
[] mcaPort.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_response { [] mcaPort.receive(mw_request(mw_notify(v_notificationRequest))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, testcasename() & ": Notification received"); setverdict(pass, testcasename() & ": Notification received");
mcaPort.send(m_response(v_responsePrimitive)); v_responsePrimitive.requestIdentifier := v_response.primitive.requestPrimitive.requestIdentifier;
mcaPort.send(m_httpResponse(v_responsePrimitive));
} }
[] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response { [] mcaPort.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -722,51 +723,59 @@ module OneM2M_Functions { ...@@ -722,51 +723,59 @@ module OneM2M_Functions {
function f_checkAttributesToBeSaved (ResourceType p_resourceType, RequestPrimitive p_request, inout ResponsePrimitive p_response) { function f_checkAttributesToBeSaved (ResourceType p_resourceType, RequestPrimitive p_request, inout ResponsePrimitive p_response) {
select (p_resourceType) { select (p_resourceType) {
case (int1) { case (int1) {
if(isvalue(p_response.primitiveContent.any_1[0].AccessControlPolicy_optional) and if(isvalue(p_response.primitiveContent.accessControlPolicy_optional) and
not(ispresent(p_response.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName))) { not(ispresent(p_response.primitiveContent.accessControlPolicy_optional.resourceName))) {
p_response.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName := p_request.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName; p_response.primitiveContent.accessControlPolicy_optional.resourceName := p_request.primitiveContent.accessControlPolicy_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.accessControlPolicy_optional.resourceName)
} }
} }
case (int2) { case (int2) {
if(isvalue(p_response.primitiveContent.any_1[0].AE_optional) and if(isvalue(p_response.primitiveContent.aE_optional) and
not(ispresent(p_response.primitiveContent.any_1[0].AE_optional.resourceName))) { not(ispresent(p_response.primitiveContent.aE_optional.resourceName))) {
p_response.primitiveContent.any_1[0].AE_optional.resourceName := p_request.primitiveContent.any_1[0].AE_optional.resourceName; p_response.primitiveContent.aE_optional.resourceName := p_request.primitiveContent.aE_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.aE_optional.resourceName)
} }
} }
case (int3) { case (int3) {
if(isvalue(p_response.primitiveContent.any_1[0].Container_optional) and if(isvalue(p_response.primitiveContent.container_optional) and
not(ispresent(p_response.primitiveContent.any_1[0].Container_optional.resourceName))) { not(ispresent(p_response.primitiveContent.container_optional.resourceName))) {
p_response.primitiveContent.any_1[0].Container_optional.resourceName := p_request.primitiveContent.any_1[0].Container_optional.resourceName; p_response.primitiveContent.container_optional.resourceName := p_request.primitiveContent.container_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.container_optional.resourceName)
} }
} }
case (int4) { case (int4) {
if(isvalue(p_response.primitiveContent.any_1[0].ContentInstance_optional) and if(isvalue(p_response.primitiveContent.contentInstance_optional) and
not(ispresent(p_response.primitiveContent.any_1[0].ContentInstance_optional.resourceName))) { not(ispresent(p_response.primitiveContent.contentInstance_optional.resourceName))) {
p_response.primitiveContent.any_1[0].ContentInstance_optional.resourceName := p_request.primitiveContent.any_1[0].ContentInstance_optional.resourceName; p_response.primitiveContent.contentInstance_optional.resourceName := p_request.primitiveContent.contentInstance_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.contentInstance_optional.resourceName)
} }
} }
case (int15) { case (int15) {
if (isvalue(p_response.primitiveContent.any_1[0].PollingChannel_optional) and if (isvalue(p_response.primitiveContent.pollingChannel_optional) and
not(ispresent(p_response.primitiveContent.any_1[0].PollingChannel_optional.resourceName))) { not(ispresent(p_response.primitiveContent.pollingChannel_optional.resourceName))) {
p_response.primitiveContent.any_1[0].PollingChannel_optional.resourceName := p_request.primitiveContent.any_1[0].PollingChannel_optional.resourceName; p_response.primitiveContent.pollingChannel_optional.resourceName := p_request.primitiveContent.pollingChannel_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.pollingChannel_optional.resourceName)
} }
} }
case (int18) { case (int18) {
if (isvalue(p_response.primitiveContent.any_1[0].Schedule_optional) and if (isvalue(p_response.primitiveContent.schedule_optional) and
not(ispresent(p_response.primitiveContent.any_1[0].Schedule_optional.resourceName))) { not(ispresent(p_response.primitiveContent.schedule_optional.resourceName))) {
p_response.primitiveContent.any_1[0].Schedule_optional.resourceName := p_request.primitiveContent.any_1[0].Schedule_optional.resourceName; p_response.primitiveContent.schedule_optional.resourceName := p_request.primitiveContent.schedule_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.schedule_optional.resourceName)
} }
} }
case (int23) { case (int23) {
if (isvalue(p_response.primitiveContent.any_1[0].Subscription_optional) and if (isvalue(p_response.primitiveContent.subscription_optional) and
not(ispresent(p_response.primitiveContent.any_1[0].Subscription_optional.resourceName))) { not(ispresent(p_response.primitiveContent.subscription_optional.resourceName))) {
p_response.primitiveContent.any_1[0].Subscription_optional.resourceName := p_request.primitiveContent.any_1[0].Subscription_optional.resourceName; p_response.primitiveContent.subscription_optional.resourceName := p_request.primitiveContent.subscription_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.subscription_optional.resourceName)
} }
} }
case (int9) { case (int9) {
if (isvalue(p_response.primitiveContent.any_1[0].Group_optional) and if (isvalue(p_response.primitiveContent.group_optional) and
not(ispresent(p_response.primitiveContent.any_1[0].Group_optional.resourceName))) { not(ispresent(p_response.primitiveContent.group_optional.resourceName))) {
p_response.primitiveContent.any_1[0].Group_optional.resourceName := p_request.primitiveContent.any_1[0].Group_optional.resourceName; p_response.primitiveContent.group_optional.resourceName := p_request.primitiveContent.group_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.group_optional.resourceName)
} }
} }
case else { case else {
...@@ -783,24 +792,24 @@ module OneM2M_Functions { ...@@ -783,24 +792,24 @@ module OneM2M_Functions {
var integer i; var integer i;
var integer v_numberOfAggregatedNotification; var integer v_numberOfAggregatedNotification;
if (ischosen(p_primitiveContent.any_1[0].AE_optional)){ if (ischosen(p_primitiveContent.aE_optional)){
if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource)) { if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource)) {
v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource.AE_optional, p_primitiveContent.any_1[0].AE_optional) v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.AE_optional, p_primitiveContent.aE_optional)
} }
else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive)) { else if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive)) {
v_matchResult :=match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].AE_optional, p_primitiveContent.any_1[0].AE_optional) v_matchResult :=match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.aE_optional, p_primitiveContent.aE_optional)
} }
else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification)) { else if (ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification)) {
v_matchResult := true; v_matchResult := true;
v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list); v_numberOfAggregatedNotification := lengthof(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list);
for(i := 0; i< v_numberOfAggregatedNotification; i := i + 1){ for(i := 0; i< v_numberOfAggregatedNotification; i := i + 1){
if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.resource)) { if(ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource)) {
if(not (match(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.resource.AE_optional, p_primitiveContent.any_1[0].AE_optional))){ if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.resource.AE_optional, p_primitiveContent.aE_optional))){
v_matchResult := false; v_matchResult := false;
} }
} }
else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive)) { else if(ischosen(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive)) {
if(not (match(p_requestPrimitive.primitiveContent.any_1[0].AggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].AE_optional, p_primitiveContent.any_1[0].AE_optional))){ if(not (match(p_requestPrimitive.primitiveContent.aggregatedNotification.notification_list[i].notificationEvent.representation.responsePrimitive.primitiveContent.aE_optional, p_primitiveContent.aE_optional))){
v_matchResult := false; v_matchResult := false;
} }
} }
...@@ -812,12 +821,12 @@ module OneM2M_Functions { ...@@ -812,12 +821,12 @@ module OneM2M_Functions {
} }
if (ischosen(p_primitiveContent.any_1[0].Container_optional)){ if (ischosen(p_primitiveContent.container_optional)){
if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource)) { if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource)) {
v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.resource.Container_optional, p_primitiveContent.any_1[0].Container_optional) v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.resource.Container_optional, p_primitiveContent.container_optional)
} }
else if(ischosen(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive)) { else if(ischosen(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive)) {
v_matchResult := match(p_requestPrimitive.primitiveContent.any_1[0].Notification.notificationEvent.representation.responsePrimitive.primitiveContent.any_1[0].Container_optional, p_primitiveContent.any_1[0].Container_optional) v_matchResult := match(p_requestPrimitive.primitiveContent.notification.notificationEvent.representation.responsePrimitive.primitiveContent.container_optional, p_primitiveContent.container_optional)
} }
} }
...@@ -906,7 +915,7 @@ module OneM2M_Functions { ...@@ -906,7 +915,7 @@ module OneM2M_Functions {
function f_ae_preamble_registerAe() runs on AeTester return integer { function f_ae_preamble_registerAe() runs on AeTester return integer {
var MsgIn v_request; var MsgIn v_request;
var Contents[-] v_modifiedResource; var PrimitiveContent v_modifiedResource;
var integer v_resourceIndex, v_parentIndex; var integer v_resourceIndex, v_parentIndex;
var RequestPrimitive v_rp; var RequestPrimitive v_rp;
...@@ -919,7 +928,7 @@ module OneM2M_Functions { ...@@ -919,7 +928,7 @@ module OneM2M_Functions {
v_parentIndex := f_getResourceIndex(v_rp.to_); v_parentIndex := f_getResourceIndex(v_rp.to_);
v_resourceIndex := f_ae_createResource(v_rp.primitiveContent, v_parentIndex, v_rp.resourceType, v_modifiedResource); v_resourceIndex := f_ae_createResource(v_rp.primitiveContent, v_parentIndex, v_rp.resourceType, v_modifiedResource);
if(v_resourceIndex != -1) { if(v_resourceIndex != -1) {
mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_rp.requestIdentifier, {any_1 := {v_modifiedResource}}))); mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_rp.requestIdentifier, v_modifiedResource)));
setverdict(pass, __SCOPE__&":INFO: Application registered successfuly"); setverdict(pass, __SCOPE__&":INFO: Application registered successfuly");
} }
else { else {
...@@ -951,14 +960,14 @@ module OneM2M_Functions { ...@@ -951,14 +960,14 @@ module OneM2M_Functions {
* @param p_modifiedResource Assigned and/or modified fields * @param p_modifiedResource Assigned and/or modified fields
* @return Internal resource index of the saved resource or -1 * @return Internal resource index of the saved resource or -1
*/ */
function f_ae_createResource(in PrimitiveContent p_resource, in integer p_parentIndex, in ResourceType p_resourceType, out Contents[-] p_modifiedResource) runs on AeTester return integer { function f_ae_createResource(in PrimitiveContent p_resource, in integer p_parentIndex, in ResourceType p_resourceType, out PrimitiveContent p_modifiedResource) runs on AeTester return integer {
var integer v_resourceIndex; var integer v_resourceIndex;
// AE TODO To review the code (use of indexes, generation of value for certain attributes, etc..) // AE TODO To review the code (use of indexes, generation of value for certain attributes, etc..)
if(p_resourceType == int2 and ispresent(p_resource)) { if(p_resourceType == int2 and ispresent(p_resource)) {
if(ischosen(p_resource.any_1[0].AE_optional)){ if(ischosen(p_resource.aE_optional)){
var AE_optional v_ae := p_resource.any_1[0].AE_optional; var AE_optional v_ae := p_resource.aE_optional;
var AE_optional v_aeModified; var AE_optional v_aeModified;
v_resourceIndex := lengthof(vc_resourcesList) - 1; v_resourceIndex := lengthof(vc_resourcesList) - 1;
...@@ -978,8 +987,8 @@ module OneM2M_Functions { ...@@ -978,8 +987,8 @@ module OneM2M_Functions {
v_aeModified.aE_ID := v_ae.aE_ID; v_aeModified.aE_ID := v_ae.aE_ID;
v_aeModified.resourceName := v_ae.resourceName; v_aeModified.resourceName := v_ae.resourceName;
p_resource.any_1[0].AE_optional := v_ae; p_resource.aE_optional := v_ae;
p_modifiedResource.AE_optional := v_aeModified; p_modifiedResource.aE_optional := v_aeModified;
return f_setResource(p_resource, p_parentIndex); return f_setResource(p_resource, p_parentIndex);
} }
...@@ -1023,7 +1032,7 @@ module OneM2M_Functions { ...@@ -1023,7 +1032,7 @@ module OneM2M_Functions {
altstep a_ae_cf03() runs on AeTester { altstep a_ae_cf03() runs on AeTester {
var MsgIn v_request; var MsgIn v_request;
var Contents[-] v_modifiedResource; var PrimitiveContent v_modifiedResource;
var integer v_resourceIndex, v_parentIndex; var integer v_resourceIndex, v_parentIndex;
var RequestPrimitive v_rp; var RequestPrimitive v_rp;
...@@ -1032,7 +1041,7 @@ module OneM2M_Functions { ...@@ -1032,7 +1041,7 @@ module OneM2M_Functions {
v_parentIndex := f_getResourceIndex(v_rp.to_); v_parentIndex := f_getResourceIndex(v_rp.to_);
v_resourceIndex := f_ae_createResource(v_rp.primitiveContent, v_parentIndex, v_rp.resourceType, v_modifiedResource); v_resourceIndex := f_ae_createResource(v_rp.primitiveContent, v_parentIndex, v_rp.resourceType, v_modifiedResource);
if(v_resourceIndex != -1) { if(v_resourceIndex != -1) {
mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_rp.requestIdentifier, {any_1 := {v_modifiedResource}}))); mcaPort.send(m_response(m_responsePrimitive_content(int2001, v_rp.requestIdentifier, v_modifiedResource)));
} }
else { else {
mcaPort.send(m_response(m_responsePrimitive(int5000, v_request.primitive.requestPrimitive.requestIdentifier))); mcaPort.send(m_response(m_responsePrimitive(int5000, v_request.primitive.requestPrimitive.requestIdentifier)));
...@@ -1072,26 +1081,26 @@ module OneM2M_Functions { ...@@ -1072,26 +1081,26 @@ module OneM2M_Functions {
} }
if (p_resourceType == int9) {//group if (p_resourceType == int9) {//group
if(match(valueof(p_request.primitiveContent.any_1[0].Group_optional.memberIDs), v_defaultListOfURIs )){ if(match(valueof(p_request.primitiveContent.group_optional.memberIDs), v_defaultListOfURIs )){
p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)}; p_request.primitiveContent.group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)};
} }
} }
if(p_resourceType == int3){//container if(p_resourceType == int3){//container
//when a container is created by hosting cse for storing location information, the container is seen as a location container //when a container is created by hosting cse for storing location information, the container is seen as a location container
if(PX_IS_LOC_CONTAINER){ if(PX_IS_LOC_CONTAINER){
p_request.primitiveContent.any_1[0].Container_optional.locationID := f_getResourceId(vc_resourcesList[p_parentIndex].resource);//resourceID of the locationPolicy p_request.primitiveContent.container_optional.locationID := f_getResourceId(vc_resourcesList[p_parentIndex].resource);//resourceID of the locationPolicy
} }
if(ispresent(p_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs)) { if(ispresent(p_request.primitiveContent.container_optional.accessControlPolicyIDs)) {
if(match(valueof(p_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs), v_defaultAcpIDs )){ if(match(valueof(p_request.primitiveContent.container_optional.accessControlPolicyIDs), v_defaultAcpIDs )){
p_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)}; p_request.primitiveContent.container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)};
} }
} }
} }
if (p_resourceType == int15) {//pollingChannel if (p_resourceType == int15) {//pollingChannel
if(ischosen(vc_resourcesList[p_parentIndex].resource.any_1[0].AE_optional)) { if(ischosen(vc_resourcesList[p_parentIndex].resource.aE_optional)) {
p_request.from_ := vc_resourcesList[p_parentIndex].resource.any_1[0].AE_optional.aE_ID; p_request.from_ := vc_resourcesList[p_parentIndex].resource.aE_optional.aE_ID;
} }
} }
...@@ -1099,18 +1108,26 @@ module OneM2M_Functions { ...@@ -1099,18 +1108,26 @@ module OneM2M_Functions {
} }
if (p_resourceType == int23) {//subscription if (p_resourceType == int23) {//subscription
if(match(valueof(p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI), v_defaultListOfURIs )){ //notificationURI
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_parentIndex)}; if(match(valueof(p_request.primitiveContent.subscription_optional.notificationURI), v_defaultListOfURIs )){
p_request.primitiveContent.subscription_optional.notificationURI := {f_getResourceAddress(p_parentIndex)};
}
//creator attribute
if(ispresent(p_request.primitiveContent.subscription_optional.creator)) {
p_request.primitiveContent.subscription_optional.creator := f_getCreator(p_parentIndex);
}
//accessControlPolicyIds
if(ispresent(p_request.primitiveContent.subscription_optional.accessControlPolicyIDs)) {
if(match(valueof(p_request.primitiveContent.subscription_optional.accessControlPolicyIDs), v_defaultAcpIDs )){
p_request.primitiveContent.subscription_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)};
}
}
}
if (p_resourceType == int4) {//contentInstance
//creator attribute
if(ispresent(p_request.primitiveContent.contentInstance_optional.creator)) {
p_request.primitiveContent.contentInstance_optional.creator := f_getCreator(p_parentIndex);
} }
/*if(PX_FROM_IS_AE_ID) {
if(PX_UNSTRUCTURED){
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {vc_aeAux.aE_ID};
} else {
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {PX_CSE_ID & "/" & vc_aeAux.aE_ID};
}
} else {
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {"/" & PX_CSE_NAME & "/" & PX_AEAUX_NAME};//c_aeAuxName
}*/
} }
return valueof(p_request); return valueof(p_request);
...@@ -1207,32 +1224,32 @@ module OneM2M_Functions { ...@@ -1207,32 +1224,32 @@ module OneM2M_Functions {
*/ */
function f_getResourceId(PrimitiveContent p_contentResource) return XSD.ID { function f_getResourceId(PrimitiveContent p_contentResource) return XSD.ID {
if(ischosen(p_contentResource.any_1[0].AccessControlPolicy_optional)) { if(ischosen(p_contentResource.accessControlPolicy_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].AccessControlPolicy_optional.resourceID); return f_resourceIdCleaner(p_contentResource.accessControlPolicy_optional.resourceID);
} }
if(ischosen(p_contentResource.any_1[0].Container_optional)) { if(ischosen(p_contentResource.container_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].Container_optional.resourceID); return f_resourceIdCleaner(p_contentResource.container_optional.resourceID);
} }
if(ischosen(p_contentResource.any_1[0].ContentInstance_optional)) { if(ischosen(p_contentResource.contentInstance_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].ContentInstance_optional.resourceID); return f_resourceIdCleaner(p_contentResource.contentInstance_optional.resourceID);
} }
if(ischosen(p_contentResource.any_1[0].Schedule_optional)) { if(ischosen(p_contentResource.schedule_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].Schedule_optional.resourceID); return f_resourceIdCleaner(p_contentResource.schedule_optional.resourceID);
} }
if(ischosen(p_contentResource.any_1[0].PollingChannel_optional)) { if(ischosen(p_contentResource.pollingChannel_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].PollingChannel_optional.resourceID); return f_resourceIdCleaner(p_contentResource.pollingChannel_optional.resourceID);
} }
if(ischosen(p_contentResource.any_1[0].Subscription_optional)) { if(ischosen(p_contentResource.subscription_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].Subscription_optional.resourceID); return f_resourceIdCleaner(p_contentResource.subscription_optional.resourceID);
} }
if(ischosen(p_contentResource.any_1[0].Group_optional)) { if(ischosen(p_contentResource.group_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].Group_optional.resourceID); return f_resourceIdCleaner(p_contentResource.group_optional.resourceID);
} }
if(ischosen(p_contentResource.any_1[0].AE_optional)) { if(ischosen(p_contentResource.aE_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].AE_optional.resourceID); return f_resourceIdCleaner(p_contentResource.aE_optional.resourceID);
} }
if(ischosen(p_contentResource.any_1[0].ServiceSubscribedAppRule_optional)) { if(ischosen(p_contentResource.serviceSubscribedAppRule_optional)) {
return f_resourceIdCleaner(p_contentResource.any_1[0].ServiceSubscribedAppRule_optional.resourceID); return f_resourceIdCleaner(p_contentResource.serviceSubscribedAppRule_optional.resourceID);
} }
log(""&__SCOPE__&":WARNING: Primitive Content Kind not implemented"); log(""&__SCOPE__&":WARNING: Primitive Content Kind not implemented");
...@@ -1248,32 +1265,32 @@ module OneM2M_Functions { ...@@ -1248,32 +1265,32 @@ module OneM2M_Functions {
*/ */
function f_getResourceName(PrimitiveContent p_contentResource) return XSD.ID { function f_getResourceName(PrimitiveContent p_contentResource) return XSD.ID {
if(ischosen(p_contentResource.any_1[0].AccessControlPolicy_optional)) { if(ischosen(p_contentResource.accessControlPolicy_optional)) {
return p_contentResource.any_1[0].AccessControlPolicy_optional.resourceName; return p_contentResource.accessControlPolicy_optional.resourceName;
} }
if(ischosen(p_contentResource.any_1[0].Container_optional)) { if(ischosen(p_contentResource.container_optional)) {
return p_contentResource.any_1[0].Container_optional.resourceName; return p_contentResource.container_optional.resourceName;
} }
if(ischosen(p_contentResource.any_1[0].ContentInstance_optional)) { if(ischosen(p_contentResource.contentInstance_optional)) {
return p_contentResource.any_1[0].ContentInstance_optional.resourceName; return p_contentResource.contentInstance_optional.resourceName;
} }
if(ischosen(p_contentResource.any_1[0].Schedule_optional)) { if(ischosen(p_contentResource.schedule_optional)) {
return p_contentResource.any_1[0].Schedule_optional.resourceName; return p_contentResource.schedule_optional.resourceName;
} }
if(ischosen(p_contentResource.any_1[0].PollingChannel_optional)) { if(ischosen(p_contentResource.pollingChannel_optional)) {
return p_contentResource.any_1[0].PollingChannel_optional.resourceName; return p_contentResource.pollingChannel_optional.resourceName;
} }
if(ischosen(p_contentResource.any_1[0].Subscription_optional)) { if(ischosen(p_contentResource.subscription_optional)) {
return p_contentResource.any_1[0].Subscription_optional.resourceName; return p_contentResource.subscription_optional.resourceName;
} }
if(ischosen(p_contentResource.any_1[0].Group_optional)) { if(ischosen(p_contentResource.group_optional)) {
return p_contentResource.any_1[0].Group_optional.resourceName; return p_contentResource.group_optional.resourceName;
} }
if(ischosen(p_contentResource.any_1[0].AE_optional)) { if(ischosen(p_contentResource.aE_optional)) {
return p_contentResource.any_1[0].AE_optional.resourceName; return p_contentResource.aE_optional.resourceName;
} }
if(ischosen(p_contentResource.any_1[0].ServiceSubscribedAppRule_optional)) { if(ischosen(p_contentResource.serviceSubscribedAppRule_optional)) {
return p_contentResource.any_1[0].ServiceSubscribedAppRule_optional.resourceName; return p_contentResource.serviceSubscribedAppRule_optional.resourceName;
} }
log(__SCOPE__&":WARNING: Primitive Content Kind not implemented"); log(__SCOPE__&":WARNING: Primitive Content Kind not implemented");
...@@ -1294,8 +1311,8 @@ module OneM2M_Functions { ...@@ -1294,8 +1311,8 @@ module OneM2M_Functions {
} }
if(PX_FROM_IS_AE_ID) { if(PX_FROM_IS_AE_ID) {
if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional)) { if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.aE_optional)) {
return vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional.aE_ID; return vc_resourcesList[p_targetResourceIndex].resource.aE_optional.aE_ID;
} else { } else {
return f_getOriginator(vc_resourcesList[p_targetResourceIndex].parentIndex); return f_getOriginator(vc_resourcesList[p_targetResourceIndex].parentIndex);
} }
...@@ -1303,6 +1320,26 @@ module OneM2M_Functions { ...@@ -1303,6 +1320,26 @@ module OneM2M_Functions {
return PX_SUPER_USER; return PX_SUPER_USER;
} }
} }
/**
* @desc Resolution of the creator attribute for a given resource
* @param p_targetResourceIndex Internal resource index of the given resource
* @return AE-ID or CSE-ID of the entity creating the given resource
* @verdict
*/
function f_getCreator(integer p_targetResourceIndex := -1) runs on CseTester return XSD.ID {
if(p_targetResourceIndex == -1) {
return PX_CSE_ID;
}
if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.aE_optional)) {
return vc_resourcesList[p_targetResourceIndex].resource.aE_optional.aE_ID;
} else {
return f_getCreator(vc_resourcesList[p_targetResourceIndex].parentIndex);
}
}
/** /**
* @desc Return of a index of a specific attribute from an attributeList by attributeName * @desc Return of a index of a specific attribute from an attributeList by attributeName
...@@ -1323,6 +1360,26 @@ module OneM2M_Functions { ...@@ -1323,6 +1360,26 @@ module OneM2M_Functions {
return -1; return -1;
} }
/**
* @desc Resolution of the announcement target CSE PoA
* @param p_protocolBinding Protocol Binding
* @param p_announcementTargetAddress Announcement Target Address
* @param p_announcementTargetResource Announcement Target Resource
* @return p_annoucementTargetPoA Announcemenet Target PoA
*/
function f_getAnnouncementTargetPoA(in charstring p_protocolBinding := PX_PROTOCOL_BINDING, in charstring p_announcementTargetAddress := PX_CSE1_ADDRESS, charstring p_announcementTargetResource := "/CseBaseTester" ) return charstring {
if(p_protocolBinding == "HTTP") {
return "http://" & p_announcementTargetAddress & "/" & p_announcementTargetResource;
} else if (p_protocolBinding == "COAP") {
return "coap://" & p_announcementTargetAddress & "/" & p_announcementTargetResource;
} else if (p_protocolBinding == "MQTT") {
return "mqtt://" & PX_SUT_ADDRESS & "/" & p_announcementTargetResource;//TODO
} else {
return "ws://" & p_announcementTargetAddress & "/" & p_announcementTargetResource;
}
}
/** /**
...@@ -1424,23 +1481,23 @@ module OneM2M_Functions { ...@@ -1424,23 +1481,23 @@ module OneM2M_Functions {
*/ */
function f_setAcpId(template RequestPrimitive p_requestPrimitive, template AcpType p_accessControlPolicyIDs) runs on CseTester return RequestPrimitive{ function f_setAcpId(template RequestPrimitive p_requestPrimitive, template AcpType p_accessControlPolicyIDs) runs on CseTester return RequestPrimitive{
if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].AE_optional)){ if (ischosen(p_requestPrimitive.primitiveContent.aE_optional)){
p_requestPrimitive.primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; p_requestPrimitive.primitiveContent.aE_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
} }
else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Container_optional)){ else if (ischosen(p_requestPrimitive.primitiveContent.container_optional)){
p_requestPrimitive.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; p_requestPrimitive.primitiveContent.container_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
} }
else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Group_optional)){ else if (ischosen(p_requestPrimitive.primitiveContent.group_optional)){
p_requestPrimitive.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; p_requestPrimitive.primitiveContent.group_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
} }
else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].ServiceSubscribedAppRule_optional)){ else if (ischosen(p_requestPrimitive.primitiveContent.serviceSubscribedAppRule_optional)){
p_requestPrimitive.primitiveContent.any_1[0].ServiceSubscribedAppRule_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; p_requestPrimitive.primitiveContent.serviceSubscribedAppRule_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
} }
else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional)){ else if (ischosen(p_requestPrimitive.primitiveContent.subscription_optional)){
p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; p_requestPrimitive.primitiveContent.subscription_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
} }
else if (ischosen(p_requestPrimitive.primitiveContent.any_1[0].LocationPolicy_optional)){ else if (ischosen(p_requestPrimitive.primitiveContent.locationPolicy_optional)){
p_requestPrimitive.primitiveContent.any_1[0].LocationPolicy_optional.accessControlPolicyIDs := p_accessControlPolicyIDs; p_requestPrimitive.primitiveContent.locationPolicy_optional.accessControlPolicyIDs := p_accessControlPolicyIDs;
} }
return valueof(p_requestPrimitive); return valueof(p_requestPrimitive);
} }
...@@ -1452,8 +1509,8 @@ module OneM2M_Functions { ...@@ -1452,8 +1509,8 @@ module OneM2M_Functions {
*/ */
function f_getAeId(integer p_targetResourceIndex := -1) runs on AeTester return XSD.ID { function f_getAeId(integer p_targetResourceIndex := -1) runs on AeTester return XSD.ID {
if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional)) { if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.aE_optional)) {
return vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional.aE_ID; return vc_resourcesList[p_targetResourceIndex].resource.aE_optional.aE_ID;
} }
log("f_getAeId: WARNING: p_targetResourceIndex does not refer to AE resource"); log("f_getAeId: WARNING: p_targetResourceIndex does not refer to AE resource");
...@@ -1475,7 +1532,6 @@ module OneM2M_Functions { ...@@ -1475,7 +1532,6 @@ module OneM2M_Functions {
*/ */
function f_checkCseTesterStatus() runs on CseTester { function f_checkCseTesterStatus() runs on CseTester {
log(getverdict());
if (getverdict != pass) { if (getverdict != pass) {
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResources();
// Tear down // Tear down
...@@ -1560,232 +1616,232 @@ module OneM2M_Functions { ...@@ -1560,232 +1616,232 @@ module OneM2M_Functions {
function f_getTemplateFromPrimitiveContent (in template PrimitiveContent p_primitiveContent) return template PrimitiveContent{ function f_getTemplateFromPrimitiveContent (in template PrimitiveContent p_primitiveContent) return template PrimitiveContent{
var template PrimitiveContent v_primitiveContent := omit; var template PrimitiveContent v_primitiveContent := omit;
if(ischosen(p_primitiveContent.any_1[0].Container_optional)){ // Container if(ischosen(p_primitiveContent.container_optional)){ // Container
v_primitiveContent.any_1 := {{Container_optional := mw_contentContainerBase}}; v_primitiveContent := {container_optional := mw_contentContainerBase};
if(ispresent(p_primitiveContent.any_1[0].Container_optional.labels)){ if(ispresent(p_primitiveContent.container_optional.labels)){
v_primitiveContent.any_1[0].Container_optional.labels := ?; v_primitiveContent.container_optional.labels := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs)){ if(ispresent(p_primitiveContent.container_optional.accessControlPolicyIDs)){
v_primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := ?; v_primitiveContent.container_optional.accessControlPolicyIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.dynamicAuthorizationConsultationIDs)){ if(ispresent(p_primitiveContent.container_optional.dynamicAuthorizationConsultationIDs)){
v_primitiveContent.any_1[0].Container_optional.dynamicAuthorizationConsultationIDs := ?; v_primitiveContent.container_optional.dynamicAuthorizationConsultationIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.announceTo)){ if(ispresent(p_primitiveContent.container_optional.announceTo)){
v_primitiveContent.any_1[0].Container_optional.announceTo := ?; v_primitiveContent.container_optional.announceTo := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.announcedAttribute)){ if(ispresent(p_primitiveContent.container_optional.announcedAttribute)){
v_primitiveContent.any_1[0].Container_optional.announcedAttribute := ?; v_primitiveContent.container_optional.announcedAttribute := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.creator)){ if(ispresent(p_primitiveContent.container_optional.creator)){
v_primitiveContent.any_1[0].Container_optional.creator := ?; v_primitiveContent.container_optional.creator := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.maxNrOfInstances)){ if(ispresent(p_primitiveContent.container_optional.maxNrOfInstances)){
v_primitiveContent.any_1[0].Container_optional.maxNrOfInstances := ?; v_primitiveContent.container_optional.maxNrOfInstances := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.maxByteSize)){ if(ispresent(p_primitiveContent.container_optional.maxByteSize)){
v_primitiveContent.any_1[0].Container_optional.maxByteSize := ?; v_primitiveContent.container_optional.maxByteSize := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.maxInstanceAge)){ if(ispresent(p_primitiveContent.container_optional.maxInstanceAge)){
v_primitiveContent.any_1[0].Container_optional.maxInstanceAge := ?; v_primitiveContent.container_optional.maxInstanceAge := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.locationID)){ if(ispresent(p_primitiveContent.container_optional.locationID)){
v_primitiveContent.any_1[0].Container_optional.locationID := ?; v_primitiveContent.container_optional.locationID := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.ontologyRef)){ if(ispresent(p_primitiveContent.container_optional.ontologyRef)){
v_primitiveContent.any_1[0].Container_optional.ontologyRef := ?; v_primitiveContent.container_optional.ontologyRef := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Container_optional.disableRetrieval)){ if(ispresent(p_primitiveContent.container_optional.disableRetrieval)){
v_primitiveContent.any_1[0].Container_optional.disableRetrieval := ?; v_primitiveContent.container_optional.disableRetrieval := ?;
} }
} }
else if(ischosen(p_primitiveContent.any_1[0].AE_optional)){ // AE else if(ischosen(p_primitiveContent.aE_optional)){ // AE
v_primitiveContent.any_1 := {{AE_optional := mw_contentAeBase}}; v_primitiveContent := {aE_optional := mw_contentAeBase};
if(ispresent(p_primitiveContent.any_1[0].AE_optional.labels)){ if(ispresent(p_primitiveContent.aE_optional.labels)){
v_primitiveContent.any_1[0].AE_optional.labels := ?; v_primitiveContent.aE_optional.labels := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs)){ if(ispresent(p_primitiveContent.aE_optional.accessControlPolicyIDs)){
v_primitiveContent.any_1[0].AE_optional.accessControlPolicyIDs := ?; v_primitiveContent.aE_optional.accessControlPolicyIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.dynamicAuthorizationConsultationIDs)){ if(ispresent(p_primitiveContent.aE_optional.dynamicAuthorizationConsultationIDs)){
v_primitiveContent.any_1[0].AE_optional.dynamicAuthorizationConsultationIDs := ?; v_primitiveContent.aE_optional.dynamicAuthorizationConsultationIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.announceTo)){ if(ispresent(p_primitiveContent.aE_optional.announceTo)){
v_primitiveContent.any_1[0].AE_optional.announceTo := ?; v_primitiveContent.aE_optional.announceTo := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.announcedAttribute)){ if(ispresent(p_primitiveContent.aE_optional.announcedAttribute)){
v_primitiveContent.any_1[0].AE_optional.announcedAttribute := ?; v_primitiveContent.aE_optional.announcedAttribute := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.appName)){ if(ispresent(p_primitiveContent.aE_optional.appName)){
v_primitiveContent.any_1[0].AE_optional.appName := ?; v_primitiveContent.aE_optional.appName := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.pointOfAccess)){ if(ispresent(p_primitiveContent.aE_optional.pointOfAccess)){
v_primitiveContent.any_1[0].AE_optional.pointOfAccess := ?; v_primitiveContent.aE_optional.pointOfAccess := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.ontologyRef)){ if(ispresent(p_primitiveContent.aE_optional.ontologyRef)){
v_primitiveContent.any_1[0].AE_optional.ontologyRef := ?; v_primitiveContent.aE_optional.ontologyRef := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.nodeLink)){ if(ispresent(p_primitiveContent.aE_optional.nodeLink)){
v_primitiveContent.any_1[0].AE_optional.nodeLink := ?; v_primitiveContent.aE_optional.nodeLink := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.contentSerialization)){ if(ispresent(p_primitiveContent.aE_optional.contentSerialization)){
v_primitiveContent.any_1[0].AE_optional.contentSerialization := ?; v_primitiveContent.aE_optional.contentSerialization := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AE_optional.e2eSecInfo)){ if(ispresent(p_primitiveContent.aE_optional.e2eSecInfo)){
v_primitiveContent.any_1[0].AE_optional.e2eSecInfo := ?; v_primitiveContent.aE_optional.e2eSecInfo := ?;
} }
} }
else if(ischosen(p_primitiveContent.any_1[0].AccessControlPolicy_optional)){ // ACP else if(ischosen(p_primitiveContent.accessControlPolicy_optional)){ // ACP
v_primitiveContent.any_1 := {{AccessControlPolicy_optional := mw_contentAcpBase}}; v_primitiveContent := {accessControlPolicy_optional := mw_contentAcpBase};
if(ispresent(p_primitiveContent.any_1[0].AccessControlPolicy_optional.labels)){ if(ispresent(p_primitiveContent.accessControlPolicy_optional.labels)){
v_primitiveContent.any_1[0].AccessControlPolicy_optional.labels := ?; v_primitiveContent.accessControlPolicy_optional.labels := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo)){ if(ispresent(p_primitiveContent.accessControlPolicy_optional.announceTo)){
v_primitiveContent.any_1[0].AccessControlPolicy_optional.announceTo := ?; v_primitiveContent.accessControlPolicy_optional.announceTo := ?;
} }
} }
else if(ischosen(p_primitiveContent.any_1[0].ContentInstance_optional)){ // ContentInstance else if(ischosen(p_primitiveContent.contentInstance_optional)){ // ContentInstance
v_primitiveContent.any_1 := {{ContentInstance_optional := mw_contentContentInstanceBase}}; v_primitiveContent := {contentInstance_optional := mw_contentContentInstanceBase};
if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.labels)){ if(ispresent(p_primitiveContent.contentInstance_optional.labels)){
v_primitiveContent.any_1[0].ContentInstance_optional.labels := ?; v_primitiveContent.contentInstance_optional.labels := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.announceTo)){ if(ispresent(p_primitiveContent.contentInstance_optional.announceTo)){
v_primitiveContent.any_1[0].ContentInstance_optional.announceTo := ?; v_primitiveContent.contentInstance_optional.announceTo := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.announcedAttribute)){ if(ispresent(p_primitiveContent.contentInstance_optional.announcedAttribute)){
v_primitiveContent.any_1[0].ContentInstance_optional.announcedAttribute := ?; v_primitiveContent.contentInstance_optional.announcedAttribute := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.creator)){ if(ispresent(p_primitiveContent.contentInstance_optional.creator)){
v_primitiveContent.any_1[0].ContentInstance_optional.creator := ?; v_primitiveContent.contentInstance_optional.creator := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.contentInfo)){ if(ispresent(p_primitiveContent.contentInstance_optional.contentInfo)){
v_primitiveContent.any_1[0].ContentInstance_optional.contentInfo := ?; v_primitiveContent.contentInstance_optional.contentInfo := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.contentRef)){ if(ispresent(p_primitiveContent.contentInstance_optional.contentRef)){
v_primitiveContent.any_1[0].ContentInstance_optional.contentRef := ?; v_primitiveContent.contentInstance_optional.contentRef := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].ContentInstance_optional.ontologyRef)){ if(ispresent(p_primitiveContent.contentInstance_optional.ontologyRef)){
v_primitiveContent.any_1[0].ContentInstance_optional.ontologyRef := ?; v_primitiveContent.contentInstance_optional.ontologyRef := ?;
} }
} }
else if(ischosen(p_primitiveContent.any_1[0].Group_optional)){ // Group else if(ischosen(p_primitiveContent.group_optional)){ // Group
v_primitiveContent.any_1 := {{Group_optional := mw_contentGroupBase}}; v_primitiveContent := {group_optional := mw_contentGroupBase};
if(ispresent(p_primitiveContent.any_1[0].Group_optional.labels)){ if(ispresent(p_primitiveContent.group_optional.labels)){
v_primitiveContent.any_1[0].Group_optional.labels := ?; v_primitiveContent.group_optional.labels := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs)){ if(ispresent(p_primitiveContent.group_optional.accessControlPolicyIDs)){
v_primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := ?; v_primitiveContent.group_optional.accessControlPolicyIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.dynamicAuthorizationConsultationIDs)){ if(ispresent(p_primitiveContent.group_optional.dynamicAuthorizationConsultationIDs)){
v_primitiveContent.any_1[0].Group_optional.dynamicAuthorizationConsultationIDs := ?; v_primitiveContent.group_optional.dynamicAuthorizationConsultationIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.announceTo)){ if(ispresent(p_primitiveContent.group_optional.announceTo)){
v_primitiveContent.any_1[0].Group_optional.announceTo := ?; v_primitiveContent.group_optional.announceTo := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.announcedAttribute)){ if(ispresent(p_primitiveContent.group_optional.announcedAttribute)){
v_primitiveContent.any_1[0].Group_optional.announcedAttribute := ?; v_primitiveContent.group_optional.announcedAttribute := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.creator)){ if(ispresent(p_primitiveContent.group_optional.creator)){
v_primitiveContent.any_1[0].Group_optional.creator := ?; v_primitiveContent.group_optional.creator := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.membersAccessControlPolicyIDs)){ if(ispresent(p_primitiveContent.group_optional.membersAccessControlPolicyIDs)){
v_primitiveContent.any_1[0].Group_optional.membersAccessControlPolicyIDs := ?; v_primitiveContent.group_optional.membersAccessControlPolicyIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.memberTypeValidated)){ if(ispresent(p_primitiveContent.group_optional.memberTypeValidated)){
v_primitiveContent.any_1[0].Group_optional.memberTypeValidated := ?; v_primitiveContent.group_optional.memberTypeValidated := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.consistencyStrategy)){ if(ispresent(p_primitiveContent.group_optional.consistencyStrategy)){
v_primitiveContent.any_1[0].Group_optional.consistencyStrategy := ?; v_primitiveContent.group_optional.consistencyStrategy := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Group_optional.groupName)){ if(ispresent(p_primitiveContent.group_optional.groupName)){
v_primitiveContent.any_1[0].Group_optional.groupName := ?; v_primitiveContent.group_optional.groupName := ?;
} }
} }
else if(ischosen(p_primitiveContent.any_1[0].PollingChannel_optional)){ // PollingChannel else if(ischosen(p_primitiveContent.pollingChannel_optional)){ // PollingChannel
v_primitiveContent.any_1 := {{PollingChannel_optional := mw_contentPollingChannelBase}}; v_primitiveContent := {pollingChannel_optional := mw_contentPollingChannelBase};
if(ispresent(p_primitiveContent.any_1[0].PollingChannel_optional.labels)){ if(ispresent(p_primitiveContent.pollingChannel_optional.labels)){
v_primitiveContent.any_1[0].PollingChannel_optional.labels := ?; v_primitiveContent.pollingChannel_optional.labels := ?;
} }
} }
else if(ischosen(p_primitiveContent.any_1[0].Schedule_optional)){ // Schedule else if(ischosen(p_primitiveContent.schedule_optional)){ // Schedule
v_primitiveContent.any_1 := {{Schedule_optional := mw_contentScheduleBase}}; v_primitiveContent := {schedule_optional := mw_contentScheduleBase};
if(ispresent(p_primitiveContent.any_1[0].Schedule_optional.labels)){ if(ispresent(p_primitiveContent.schedule_optional.labels)){
v_primitiveContent.any_1[0].Schedule_optional.labels := ?; v_primitiveContent.schedule_optional.labels := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Schedule_optional.announceTo)){ if(ispresent(p_primitiveContent.schedule_optional.announceTo)){
v_primitiveContent.any_1[0].Schedule_optional.announceTo := ?; v_primitiveContent.schedule_optional.announceTo := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Schedule_optional.announcedAttribute)){ if(ispresent(p_primitiveContent.schedule_optional.announcedAttribute)){
v_primitiveContent.any_1[0].Schedule_optional.announcedAttribute := ?; v_primitiveContent.schedule_optional.announcedAttribute := ?;
} }
} }
else if(ischosen(p_primitiveContent.any_1[0].Subscription_optional)){ // Schedule else if(ischosen(p_primitiveContent.subscription_optional)){ // Schedule
v_primitiveContent.any_1 := {{Subscription_optional := mw_contentSubscriptionBase}}; v_primitiveContent := {subscription_optional := mw_contentSubscriptionBase};
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.labels)){ if(ispresent(p_primitiveContent.subscription_optional.labels)){
v_primitiveContent.any_1[0].Subscription_optional.labels := ?; v_primitiveContent.subscription_optional.labels := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs)){ if(ispresent(p_primitiveContent.subscription_optional.accessControlPolicyIDs)){
v_primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := ?; v_primitiveContent.subscription_optional.accessControlPolicyIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.dynamicAuthorizationConsultationIDs)){ if(ispresent(p_primitiveContent.subscription_optional.dynamicAuthorizationConsultationIDs)){
v_primitiveContent.any_1[0].Subscription_optional.dynamicAuthorizationConsultationIDs := ?; v_primitiveContent.subscription_optional.dynamicAuthorizationConsultationIDs := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.creator)){ if(ispresent(p_primitiveContent.subscription_optional.creator)){
v_primitiveContent.any_1[0].Subscription_optional.creator := ?; v_primitiveContent.subscription_optional.creator := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.eventNotificationCriteria)){ if(ispresent(p_primitiveContent.subscription_optional.eventNotificationCriteria)){
v_primitiveContent.any_1[0].Subscription_optional.eventNotificationCriteria := ?; v_primitiveContent.subscription_optional.eventNotificationCriteria := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.expirationCounter)){ if(ispresent(p_primitiveContent.subscription_optional.expirationCounter)){
v_primitiveContent.any_1[0].Subscription_optional.expirationCounter := ?; v_primitiveContent.subscription_optional.expirationCounter := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.groupID)){ if(ispresent(p_primitiveContent.subscription_optional.groupID)){
v_primitiveContent.any_1[0].Subscription_optional.groupID := ?; v_primitiveContent.subscription_optional.groupID := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.notificationForwardingURI)){ if(ispresent(p_primitiveContent.subscription_optional.notificationForwardingURI)){
v_primitiveContent.any_1[0].Subscription_optional.notificationForwardingURI := ?; v_primitiveContent.subscription_optional.notificationForwardingURI := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.batchNotify)){ if(ispresent(p_primitiveContent.subscription_optional.batchNotify)){
v_primitiveContent.any_1[0].Subscription_optional.batchNotify := ?; v_primitiveContent.subscription_optional.batchNotify := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.rateLimit)){ if(ispresent(p_primitiveContent.subscription_optional.rateLimit)){
v_primitiveContent.any_1[0].Subscription_optional.rateLimit := ?; v_primitiveContent.subscription_optional.rateLimit := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.preSubscriptionNotify)){ if(ispresent(p_primitiveContent.subscription_optional.preSubscriptionNotify)){
v_primitiveContent.any_1[0].Subscription_optional.preSubscriptionNotify := ?; v_primitiveContent.subscription_optional.preSubscriptionNotify := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.pendingNotification)){ if(ispresent(p_primitiveContent.subscription_optional.pendingNotification)){
v_primitiveContent.any_1[0].Subscription_optional.pendingNotification := ?; v_primitiveContent.subscription_optional.pendingNotification := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.notificationStoragePriority)){ if(ispresent(p_primitiveContent.subscription_optional.notificationStoragePriority)){
v_primitiveContent.any_1[0].Subscription_optional.notificationStoragePriority := ?; v_primitiveContent.subscription_optional.notificationStoragePriority := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.latestNotify)){ if(ispresent(p_primitiveContent.subscription_optional.latestNotify)){
v_primitiveContent.any_1[0].Subscription_optional.latestNotify := ?; v_primitiveContent.subscription_optional.latestNotify := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.notificationContentType)){ if(ispresent(p_primitiveContent.subscription_optional.notificationContentType)){
v_primitiveContent.any_1[0].Subscription_optional.notificationContentType := ?; v_primitiveContent.subscription_optional.notificationContentType := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.notificationEventCat)){ if(ispresent(p_primitiveContent.subscription_optional.notificationEventCat)){
v_primitiveContent.any_1[0].Subscription_optional.notificationEventCat := ?; v_primitiveContent.subscription_optional.notificationEventCat := ?;
} }
if(ispresent(p_primitiveContent.any_1[0].Subscription_optional.subscriberURI)){ if(ispresent(p_primitiveContent.subscription_optional.subscriberURI)){
v_primitiveContent.any_1[0].Subscription_optional.subscriberURI := ?; v_primitiveContent.subscription_optional.subscriberURI := ?;
} }
} }
return v_primitiveContent; return v_primitiveContent;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* @author oneM2M * @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $ * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $
* $Id: OneM2M_Pixits.ttcn 247 2017-03-27 17:09:55Z reinaortega $ * $Id: OneM2M_Pixits.ttcn 288 2017-05-19 07:18:08Z reinaortega $
* @desc Module containing Pixits for oneM2M * @desc Module containing Pixits for oneM2M
* *
*/ */
...@@ -25,8 +25,12 @@ module OneM2M_Pixits { ...@@ -25,8 +25,12 @@ module OneM2M_Pixits {
modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"/ae_test", "/MyAcp"}; modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"/ae_test", "/MyAcp"};
modulepar charstring PX_SUT_ADDRESS := "127.0.0.1:8080"; modulepar charstring PX_SUT_ADDRESS := "127.0.0.1:8080";
modulepar charstring PX_AE1_ADDRESS := "127.0.0.1:3131";
modulepar charstring PX_AE2_ADDRESS := "127.0.0.1:3132";
modulepar charstring PX_TESTER_ADDRESS := "127.0.0.1:3131"; modulepar charstring PX_CSE1_ADDRESS := "127.0.0.1:3141";
modulepar charstring PX_XML_NAMESPACE := "m2m=""http://www.onem2m.org/xml/protocols"""; modulepar charstring PX_XML_NAMESPACE := "m2m=""http://www.onem2m.org/xml/protocols""";
...@@ -36,11 +40,11 @@ module OneM2M_Pixits { ...@@ -36,11 +40,11 @@ module OneM2M_Pixits {
modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId"; modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId";
modulepar XSD.AnyURI PX_URI_CSE := "in-name";//TODO to be deleted
modulepar boolean PX_UNSTRUCTURED := false; modulepar boolean PX_UNSTRUCTURED := false;
modulepar XSD.ID PX_AE_ID_STEM := ""; modulepar XSD.ID PX_AE1_ID_STEM := "";
modulepar XSD.ID PX_AE2_ID_STEM := "";
modulepar XSD.ID PX_SUPER_USER := "admin:admin"; modulepar XSD.ID PX_SUPER_USER := "admin:admin";
...@@ -57,13 +61,12 @@ module OneM2M_Pixits { ...@@ -57,13 +61,12 @@ module OneM2M_Pixits {
modulepar charstring PX_PROTOCOL_BINDING := "HTTP"; modulepar charstring PX_PROTOCOL_BINDING := "HTTP";
modulepar boolean PX_FROM_IS_AE_ID := true; modulepar boolean PX_FROM_IS_AE_ID := true;
//@Martin
//for checking whether the locationPolicy creation request is originated from a ASN-AE //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 //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_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_MN_CSE := false; //default //set it to true when running Share-based location testcases
//@Martin
//constant parameters for LOC //constant parameters for LOC
modulepar XSD.Token PX_LOCATION_TARGET_ID := "{LOCATION-TARGET-ID}"; //SUPPOSE TO BE RECEIVED FROM LOCATION SERVER modulepar XSD.Token PX_LOCATION_TARGET_ID := "{LOCATION-TARGET-ID}"; //SUPPOSE TO BE RECEIVED FROM LOCATION SERVER
modulepar XSD.AnyURI PX_LOCATION_SERVER_ADDRESS := "{LOCATION-SERVER-ADDRESS}"; modulepar XSD.AnyURI PX_LOCATION_SERVER_ADDRESS := "{LOCATION-SERVER-ADDRESS}";
......
This diff is collapsed.
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* @author oneM2M * @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $ * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $
* $Id: OneM2M_TypesAndValues.ttcn 249 2017-03-30 12:24:57Z reinaortega $ * $Id: OneM2M_TypesAndValues.ttcn 287 2017-05-19 06:59:12Z reinaortega $
* @desc Module containing types and values for oneM2M * @desc Module containing types and values for oneM2M
* *
*/ */
...@@ -16,10 +16,7 @@ module OneM2M_TypesAndValues { ...@@ -16,10 +16,7 @@ module OneM2M_TypesAndValues {
import from XSD all; import from XSD all;
import from OneM2M_Types all; import from OneM2M_Types all;
/* Constants */ /* Constants */
const charstring c_uri_cse := "/~/in-cse/";
const charstring c_cse_name := "in-cse";
const XSD.String c_defaultResourceName := "MyResource"; const XSD.String c_defaultResourceName := "MyResource";
const XSD.String c_defaultGroupResourceName := "MyGroupResource"; const XSD.String c_defaultGroupResourceName := "MyGroupResource";
const XSD.String c_defaultAccessControlPolicyResourceName := "MyAccessControlPolicyResource"; const XSD.String c_defaultAccessControlPolicyResourceName := "MyAccessControlPolicyResource";
...@@ -35,6 +32,8 @@ module OneM2M_TypesAndValues { ...@@ -35,6 +32,8 @@ module OneM2M_TypesAndValues {
const XSD.ID c_aeAuxName := "MyAe"; const XSD.ID c_aeAuxName := "MyAe";
const XSD.String c_acpAuxName := "MyAcp"; const XSD.String c_acpAuxName := "MyAcp";
const charstring c_invalid_location_update_period := "-PT30M10S" ;//duration set to invalid value (minus value) const charstring c_invalid_location_update_period := "-PT30M10S" ;//duration set to invalid value (minus value)
const XSD.ID c_resourceShortNameLatest := "la"; //<latest>
const XSD.ID c_resourceShortNameOldest := "ol"; //<oldest>
//AccessControlOperations //AccessControlOperations
const XSD.Integer c_C := 1; const XSD.Integer c_C := 1;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* @author oneM2M * @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_TestControl.ttcn $ * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_TestControl.ttcn $
* $Id: OneM2M_TestControl.ttcn 246 2017-03-27 17:07:30Z reinaortega $ * $Id: OneM2M_TestControl.ttcn 254 2017-05-02 15:55:08Z reinaortega $
* @desc Test control module for oneM2M * @desc Test control module for oneM2M
* *
*/ */
...@@ -187,21 +187,25 @@ module OneM2M_TestControl { ...@@ -187,21 +187,25 @@ module OneM2M_TestControl {
execute(TC_CSE_DMR_DEL_BV_004_05()); execute(TC_CSE_DMR_DEL_BV_004_05());
execute(TC_CSE_DMR_DEL_BV_004_06()); execute(TC_CSE_DMR_DEL_BV_004_06());
execute(TC_CSE_DMR_DEL_BV_005()); execute(TC_CSE_DMR_DEL_BV_005());
execute(TC_CSE_DMR_DEL_BV_007());
execute(TC_CSE_DMR_DEL_BO_008());
execute(TC_CSE_DMR_DEL_BV_009());
execute(TC_CSE_DMR_DEL_BO_010());
execute(TC_CSE_LOC_BV_001()); execute(TC_CSE_LOC_BV_001());
execute(TC_CSE_LOC_BV_002()); execute(TC_CSE_LOC_BV_002());
execute(TC_CSE_LOC_BO_001()); execute(TC_CSE_LOC_BO_003());
execute(TC_CSE_LOC_BO_002()); execute(TC_CSE_LOC_BO_004());
execute(TC_CSE_LOC_BI_001()); execute(TC_CSE_LOC_BI_005());
execute(TC_CSE_LOC_BV_003()); execute(TC_CSE_LOC_BV_006());
execute(TC_CSE_LOC_BV_004()); execute(TC_CSE_LOC_BV_007());
execute(TC_CSE_LOC_BV_005()); execute(TC_CSE_LOC_BV_008());
execute(TC_CSE_LOC_BV_006_01()); execute(TC_CSE_LOC_BV_009_01());
execute(TC_CSE_LOC_BV_006_02()); execute(TC_CSE_LOC_BV_009_02());
execute(TC_CSE_LOC_BV_006_03()); execute(TC_CSE_LOC_BV_009_03());
//execute(TC_CSE_LOC_BV_007()); //execute(TC_CSE_LOC_BV_007());
//execute(TC_CSE_LOC_BV_008()); //execute(TC_CSE_LOC_BV_008());
execute(TC_CSE_LOC_BV_009()); execute(TC_CSE_LOC_BV_012());
execute(TC_CSE_LOC_BV_010()); execute(TC_CSE_LOC_BV_013());
execute(TC_CSE_GMG_BV_001()); execute(TC_CSE_GMG_BV_001());
execute(TC_CSE_GMG_BV_002()); execute(TC_CSE_GMG_BV_002());
execute(TC_CSE_GMG_BV_003()); execute(TC_CSE_GMG_BV_003());
......
This diff is collapsed.
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment