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

New ACP Testcases added according to TST-2016-0211-TS-0018_ACP_Test_purposes_contribution


Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent b145efad
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 163 2016-11-10 08:50:50Z carres $
* $Id: OneM2M_Functions.ttcn 164 2016-11-17 13:54:53Z carres $
* @desc Module containing functions for oneM2M
*
*/
......@@ -919,18 +919,18 @@ module OneM2M_Functions {
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": Attribute of resource type int2 (Ae) updated successfuly");
setverdict(pass, testcasename() & ": Attribute of resource updated successfuly");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while updating resource type int2 (Ae)");
setverdict(fail, testcasename() & ": Error while updating resource");
}
[] mcaPort.receive{
tc_ac.stop;
setverdict(fail, testcasename() & ": Error, unexpected message received");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while updating resource type int2 (Ae) or None notification received");
setverdict(inconc, testcasename() & ": No answer while updating resource");
}
}
}// end f_update_attribute_request
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 162 2016-11-09 09:09:44Z carres $
* $Id: OneM2M_Templates.ttcn 164 2016-11-17 13:54:53Z carres $
* @desc Module containing templates for oneM2M
*
*/
......@@ -269,6 +269,14 @@ module OneM2M_Templates {
}
};
template (value) RequestPrimitive m_updateAcpPrivileges(in template(omit) SetOfAcrs p_privileges := omit, in template(omit) SetOfAcrs p_selfPrivileges := omit) modifies m_update := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)}}
}
};
/**
* @desc Base UPDATE request primitive for Group resource
*/
......@@ -825,27 +833,20 @@ module OneM2M_Templates {
announceTo := omit,//O
announcedAttribute := omit,//O
privileges := {
accessControlRule_list := {
{
accessControlOriginators := p_acor,//{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
accessControlOperations := p_allowedOperations,
accessControlContexts_list := omit,
accessControlAuthenticationFlag := omit
}
}
accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
},//M
selfPrivileges := {
accessControlRule_list := {
{
accessControlOriginators := p_acor, //{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
accessControlOperations := int63,
accessControlContexts_list := omit,
accessControlAuthenticationFlag := omit
}
}
accessControlRule_list := {valueof(m_createAcr(p_acor, int63))}
},//M
choice := omit //NP
};
template (value) AccessControlRule m_createAcr (in template (value) ListOfURIs p_acor, in template (value) AccessControlOperations p_allowedOperations) := {
accessControlOriginators := p_acor,//{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
accessControlOperations := p_allowedOperations,
accessControlContexts_list := omit,
accessControlAuthenticationFlag := omit
}
//added by @Naum
template (value) CSEBase_optional m_contentCreateCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := {
......@@ -1192,6 +1193,22 @@ module OneM2M_Templates {
selfPrivileges := omit,//O
choice := omit //NP
};
template (value) AccessControlPolicy_optional m_contentUpdateAcpPrivileges(in template(omit) SetOfAcrs p_privileges, in template(omit) SetOfAcrs p_selfPrivileges) := {
resourceName := omit,//NP
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
creationTime := omit,//NP
lastModifiedTime := omit,//NP
labels := omit,//O
expirationTime := omit,//O
announceTo := omit,//O
announcedAttribute := omit,//O
privileges := p_privileges,//O
selfPrivileges := p_selfPrivileges,//O
choice := omit //NP
};
/**
* @desc Base primitiveContent for UPDATE operation for Group resource
......
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