Commit 9cfafe9b authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Compilation errors corrections after REG_testcases merge


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent fc9368e4
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 225 2017-03-08 15:36:54Z reinaortega $
* $Id: OneM2M_Templates.ttcn 226 2017-03-09 08:58:45Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
......@@ -393,18 +393,50 @@ module OneM2M_Templates {
tokenRequestIndicator := *
}
/**
* @desc Base CREATE request primitive for AE resource (AUX)
*/
template RequestPrimitive m_createAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := "") := {
operation := int1,
to_ := p_to,
from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
requestIdentifier := testcasename() & "-m_createAEAnnc" & f_rnd(1, 1000000),
resourceType := int10002,
primitiveContent := {
any_1 := {{AEAnnc_optional := m_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_appId, p_to & "/" & p_stemId)}}
},
roleIDs := 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,
tokens := omit,
tokenIDs := omit,
localTokenIDs := omit,
tokenRequestIndicator := omit
};
/**
* @desc Base CREATE request primitive for AE resource (AUX)
*/
//Added by @Naum
template RequestPrimitive mw_createAEannc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := omit) := {
template RequestPrimitive mw_createAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := "") := {
operation := int1,
to_ := p_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("Credential-ID:None", p_accessControlPolicyIds, p_appId, p_to & "/" & p_stemId)}}
any_1 := {{AEAnnc_optional := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_appId, p_to & "/" & p_stemId)}}
},
roleIDs := *,
originatingTimestamp := *,
......@@ -844,8 +876,31 @@ module OneM2M_Templates {
group ContentCreate {
template AEAnnc_optional m_contentCreateAEAnnc (in template (omit) Labels p_labels, in template (omit) AcpType p_accessControlPolicyIds, XSD.ID p_appId := PX_APP_ID, in template (omit) XSD.AnyURI p_nodeLink := omit) := {
resourceName := omit,//O TODO
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
creationTime := omit,//NP
lastModifiedTime := omit,//NP
labels := p_labels,//O
accessControlPolicyIDs := p_accessControlPolicyIds,//O
expirationTime := omit,//O
dynamicAuthorizationConsultationIDs := omit, //TODO Check whether it is optional or mandatory for create operation
link := omit,//M TODO Put the right value
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 := p_nodeLink,//NP
requestReachability := true,//M
contentSerialization := omit,//O
e2eSecInfo := omit, //O TODO Check whether it is optional or mandatory for create operation
choice := omit//NP
};
template AEAnnc_optional mw_contentCreateAEannc (in template (omit) XSD.String p_labels, in template (omit) AcpType p_accessControlPolicyIds, XSD.ID p_appId := PX_APP_ID, XSD.AnyURI p_nodeLink := omit) := {
template AEAnnc_optional mw_contentCreateAEAnnc (in template (omit) Labels p_labels, in template (omit) AcpType p_accessControlPolicyIds, XSD.ID p_appId := PX_APP_ID, in template (omit) XSD.AnyURI p_nodeLink := omit) := {
resourceName := *,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -2306,10 +2361,10 @@ module OneM2M_Templates {
* @param p_statusCode Status code
* @param p_requestId Request ID of the corresponding request
*/
template (value) ResponsePrimitive m_responsePrimitive(in ResponseStatusCode p_statusCode, in RequestID p_requestId) := {
template (value) ResponsePrimitive m_responsePrimitive(in ResponseStatusCode p_statusCode, in RequestID p_requestId, in template (omit) PrimitiveContent p_content := omit) := {
responseStatusCode := p_statusCode,
requestIdentifier := p_requestId,
primitiveContent := omit,
primitiveContent := p_content,
to_ := omit,
from_ := omit,
originatingTimestamp := omit,
......@@ -2404,21 +2459,6 @@ module OneM2M_Templates {
assignedTokenIdentifiers := omit,
tokenRequestInformation := omit
};
template ResponsePrimitive m_responsePrimitiveCreate(in template PrimitiveContent p_content := omit) := {
responseStatusCode := int2001,
requestIdentifier := testcasename() & "-m_responseNotification" & f_rnd(1, 1000000),,
primitiveContent := p_content,
to_ := omit,
from_ := omit,
originatingTimestamp := omit,
resultExpirationTimestamp := omit,
eventCategory := omit,
contentStatus := omit,
contentOffset := omit,
assignedTokenIdentifiers := omit,
tokenRequestInformation := omit
};
}//end group ResponsePrimitives
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 225 2017-03-08 15:36:54Z reinaortega $
* $Id: OneM2M_Testcases.ttcn 226 2017-03-09 08:58:45Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
......@@ -308,7 +308,7 @@ module OneM2M_Testcases {
tc_ac.start;
alt {
[] mccPort.receive(mw_request(mw_createAEannc(omit, omit, "APP_ID"))) {
[] mccPort.receive(mw_request(mw_createAEAnnc(-, -, -, "APP_ID", -))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
}
......@@ -397,7 +397,7 @@ module OneM2M_Testcases {
tc_ac.start;
alt {
[] mccPort.receive(mw_request(mw_createAEannc(omit, "CSE_ID", "/S", "APP_ID", "S-AE-ID-STEM"))) {
[] mccPort.receive(mw_request(mw_createAEAnnc(omit, "CSE_ID", "/S", "APP_ID", "S-AE-ID-STEM"))) {
tc_ac.stop;
setverdict(pass, testcasename() & ": AE creation redirected.");
}
......@@ -433,7 +433,7 @@ module OneM2M_Testcases {
f_cse_postamble_deleteResources(); //to deregister the AE, I don't know if it's correct like this?
//Test Body
v_request := valueof(mw_createAEannc(omit, "CSE_ID", "/S", "APP_ID", "S-AE-ID-STEM"));
v_request := valueof(m_createAEAnnc(-, "CSE_ID", "/S", "APP_ID", "S-AE-ID-STEM")); //TODO to double check all parameters
v_request := f_getUpdateRequestPrimitive(v_resourceType,v_cseBaseIndex, v_request);
......@@ -477,9 +477,9 @@ module OneM2M_Testcases {
v_cseBaseIndex := f_cse_preamble_createServiceSubscribedAppRule({"S"});//c_CRUDNDi);
//Test Body
v_request := valueof(m_responsePrimitiveCreate({any_1 := {{AEAnnc_optional := mw_contentCreateAEannc("Credential-ID:None", omit, PX_APP_ID, "/CSE_ID/S-AE-ID-STEM")}}}));
v_request := valueof(m_responsePrimitive(int2001, "To_be_defined", {any_1 := {{AEAnnc_optional := m_contentCreateAEAnnc({"Credential-ID:None"}, omit, PX_APP_ID, "/CSE_ID/S-AE-ID-STEM")}}}));
mccPort.send(m_request(v_request));
mccPort.send(m_response(v_request));
tc_ac.start;
alt {
......
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