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

Merge branch 'KETI_LOC_UPDATE'


Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parents 1d5ab4e1 d64bfa41
......@@ -438,6 +438,7 @@ module OneM2M_Functions {
* @verdict
*/
function f_getCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_request, integer p_parentIndex) runs on CseTester return RequestPrimitive {
var integer p_locresourceIndex := p_parentIndex;
p_request.from_ := f_getOriginator(p_parentIndex);
......@@ -449,6 +450,14 @@ module OneM2M_Functions {
if (p_resourceType == int9) {//group
p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)};
}
//@Martin
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
if(PX_IS_LOC_CONTAINER){
p_request.primitiveContent.any_1[0].Container_optional.locationID := f_getResourceId(vc_resourcesList[p_locresourceIndex].resource);//resourceID of the locationPolicy
}
}
if (p_resourceType == int15) {//pollingChannel
p_request.from_ := vc_aeAux.aE_ID;
......
......@@ -55,16 +55,21 @@ module OneM2M_Pixits {
modulepar XSD.ID PX_CSE_ID := "in-cse";
modulepar boolean PX_FROM_IS_AE_ID := true;
//@Martin
//for checking whether the locationPolicy creation request is originated from a ASN-AE
//NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT
modulepar boolean PX_IUT_IS_ASN_CSE := false; //default //set it to true when running Device-based location testcases
modulepar boolean PX_IUT_IS_MN_CSE := false; //default //set it to true when running Share-based location testcases
//@Martin
//constant parameters for LOC
modulepar LocationSource PX_LOCATION_SOURCE := int1;//network-defined
//constant parameters for LOC
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}";
modulepar charstring PX_LOCATION_UPDATE_PERIOD := "PT10M10S" ;//10 Minute 10 Seconds
modulepar charstring PX_LOCATION_UPDATE_PERIOD_INVALID := "-PT30M10S" ;//duration set to invalid value (minus value)
modulepar charstring PX_LOCATION_CONTAINER_NAME := "myLoContainer";
modulepar charstring PX_LOCATION_CONTAINER_NAME := "myLoContainer";
modulepar Labels LABELS := {"VALUE_1"};
modulepar Labels LABELS := {"VALUE_1"};
modulepar boolean PX_IS_LOC_CONTAINER := false;//default //set it to true when the container is created to store location information
} // end of module
......@@ -569,7 +569,7 @@ module OneM2M_Templates {
}
};
template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name := omit, in template (value) ListOfURIs p_notificationURI ) modifies m_create := {
template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := {
to_ := f_addPrefix(p_parentResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
......@@ -594,16 +594,24 @@ module OneM2M_Templates {
};
//@Martin
template (value) RequestPrimitive m_createLocationPolicy(XSD.ID p_parentResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) modifies m_create := {
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM, //AE originator id e.g.
requestIdentifier := "m_createLocationPolicy", //the requestIdentifier is supposed to be set similar as "C190XX7T/001" by prepending the AE-ID-Stem and slash(‘/’) in front of it
template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource locationSource, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) modifies m_create := {
requestIdentifier := "m_createLocationPolicy" & f_rnd(1, 1000000), //the requestIdentifier is supposed to be set similar as "C190XX7T/001" by prepending the AE-ID-Stem and slash(‘/’) in front of it
resourceType := int10,
primitiveContent := {
any_1 := {{ LocationPolicy_optional := m_contentCreateLocationPolicy(p_accessControlPolicyIDs, locationUpdatePeriod, locationTargetID, locationServerAddress) }}
any_1 := {{ LocationPolicy_optional := m_contentCreateLocationPolicy(locationSource, p_accessControlPolicyIDs, locationUpdatePeriod, locationTargetID, locationServerAddress) }}
},
resultContent := int1//default
};
//@Martin
template (value) RequestPrimitive m_createNotification(in template (value) Representation resourcePresentation, in template (omit)NotificationEventType notifEventType, in template (omit) XSD.AnyURI subscriptionReference, in template (omit) XSD.AnyURI notifForwardingURI) modifies m_create := {
requestIdentifier := "m_createNotification" & f_rnd(1, 1000000),
primitiveContent := {
any_1 := {{ Notification := m_contentCreateNotification(resourcePresentation, notifEventType, subscriptionReference, notifForwardingURI)}}
},
resultContent := int1 //default
};
}//end group Create
......@@ -1094,30 +1102,51 @@ module OneM2M_Templates {
};
//@Martin
template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.Duration locationUpdatePeriod, in template (value) NodeID locationTargetID, in template (value) XSD.AnyURI locationServerAddress) := {
resourceName := c_defaultResourceName, //O
resourceType := omit, //NP
resourceID := omit, //NP
parentID := omit, //NP
creationTime := omit, //NP
lastModifiedTime := omit, //NP
labels := LABELS,//O
template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (value) LocationSource locationSource, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.Duration locationUpdatePeriod, in template (value) NodeID locationTargetID, in template (value) XSD.AnyURI locationServerAddress) := {
resourceName := c_defaultResourceName, //O
resourceType := omit, //NP
resourceID := omit, //NP
parentID := omit, //NP
creationTime := omit, //NP
lastModifiedTime := omit, //NP
labels := LABELS,//O
accessControlPolicyIDs := p_accessControlPolicyIDs, //O
expirationTime := omit, //O
dynamicAuthorizationConsultationIDs := omit, //O
announceTo := omit, //O
announcedAttribute := omit, //O
locationSource := PX_LOCATION_SOURCE, //M
locationUpdatePeriod := locationUpdatePeriod, //O
locationTargetID := locationTargetID, //O
locationSource := locationSource, //M
locationUpdatePeriod := locationUpdatePeriod, //O
locationTargetID := locationTargetID, //O
locationServer := locationServerAddress,//O
locationContainerID := omit, //NP
locationContainerName := PX_LOCATION_CONTAINER_NAME,//O
locationStatus := omit, //NP
locationStatus := omit, //NP
choice := omit //NP
};
//@Martin
template (value) Notification m_contentCreateNotification (in template (value) Representation p_resourcePresentation,
in template (omit) NotificationEventType p_notifEventType,
in template (omit) XSD.AnyURI p_subReference,
in template (omit) XSD.AnyURI p_notifForwardingURI) := {
notificationEvent := {
representation := p_resourcePresentation,
operationMonitor := {
operation := omit,
originator := omit
},
notificationEventType := p_notifEventType
},
verificationRequest := omit,
subscriptionDeletion := omit,
subscriptionReference := p_subReference,
creator := omit,
notificationForwardingURI := p_notifForwardingURI,
iPEDiscoveryRequest := omit
};
}//end group ContentCreate
group ContentUpdate {
......
......@@ -6929,7 +6929,8 @@ group optionalResourceTypes {
variant (choice.choice_list[-]) "untagged";
};
}
}//end group
group invalidTypes {
......
......@@ -22,6 +22,7 @@ module OneM2M_TypesAndValues {
const XSD.String c_defaultResourceName := "MyResource";
const XSD.ID c_aeAuxName := "MyAe";
const XSD.String c_acpAuxName := "MyAcp";
const charstring c_invalid_location_update_period := "-PT30M10S" ;//duration set to invalid value (minus value)
//AccessControlOperations
const XSD.Integer c_C := 1;
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment