Commit 4d76e6a1 authored by Antonio Castillo Verdugo's avatar Antonio Castillo Verdugo
Browse files

TP/oneM2M/CSE/REG/CRE/BV/011


TP/oneM2M/CSE/REG/CRE/BV/012
TP/oneM2M/CSE/REG/CRE/BV/015_01
TP/oneM2M/CSE/REG/CRE/BV/015_02
TP/oneM2M/CSE/REG/CRE/BV/015_03
TP/oneM2M/CSE/REG/CRE/BV/015_04
TP/oneM2M/CSE/DMR/RET/BV/013_09
TP/oneM2M/CSE/DMR/RET/BV/015_09
TP/oneM2M/CSE/DMR/RET/BV/016_09
TP/oneM2M/CSE/DMR/RET/BV/017_09
TP/oneM2M/CSE/DMR/RET/BO/018_09
TP/oneM2M/CSE/DMR/RET/BO/019_09
Signed-off-by: Antonio Castillo Verdugo's avataracverdugo <acverdugo@at4wireless.com>
parent 0fdcafe9
......@@ -46,6 +46,9 @@ module OneM2M_Functions {
} // end f_cf01Up
/**
* @desc Ports mapping and default behaviour activation for Config 02
*/
function f_cf02Up() runs on CseTester {
// Variables
......@@ -83,6 +86,26 @@ module OneM2M_Functions {
//Initialze the IUT
} // end f_cf03Up
/**
* @desc Ports mapping and default behaviour activation for Config 04
*/
function f_cf04Up() runs on CseTester {
// Variables
vc_config := e_cf04;
// Map
map(self:mccPort, system:mccPort);
map(self:acPort, system:acPort);
activate(a_default());
activate(a_cse_cf04());
// Connect
//Initialze the IUT
} // end f_cf03Up
/**
* @desc Ports unmapping
......@@ -134,6 +157,15 @@ module OneM2M_Functions {
unmap(self:acPort, system:acPort);
}
/**
* @desc Ports unmapping for Config 04
*/
function f_cf04Down() runs on CseTester {
unmap(self:mccPort, system:mccPort);
unmap(self:acPort, system:acPort);
}
}//end group configFunctions
group CseFunctions {
......@@ -757,6 +789,13 @@ module OneM2M_Functions {
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.pollingChannel_optional.resourceName)
}
}
case (int16) {
if (isvalue(p_response.primitiveContent.remoteCSE_optional) and
not(ispresent(p_response.primitiveContent.remoteCSE_optional.resourceName))) {
p_response.primitiveContent.remoteCSE_optional.resourceName := p_request.primitiveContent.remoteCSE_optional.resourceName;
log(__SCOPE__ & ": Info: resourceName not returned. Using the one provided in the request: " & p_request.primitiveContent.remoteCSE_optional.resourceName)
}
}
case (int18) {
if (isvalue(p_response.primitiveContent.schedule_optional) and
not(ispresent(p_response.primitiveContent.schedule_optional.resourceName))) {
......@@ -867,6 +906,43 @@ module OneM2M_Functions {
unmap(self:acPort, system:acPort);
} //end f_cse_notifyProcedure
function f_registerRemoteCse(in template RequestPrimitive p_requestPrimitive) runs on CseTester return integer{
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_resourceIndex := -1;
v_request := f_getCreateRequestPrimitive(int16, p_requestPrimitive, -1);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type RemoteCSE created successfuly");
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, -1);
vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_resourceIndex};
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Error while creating resource type RemoteCSE");
}
[] mccPort.receive {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while creating resource type RemoteCSE");
}
}
f_checkCseTesterStatus();
return v_resourceIndex;
}
}//end group helpingFunctions
......@@ -897,7 +973,18 @@ module OneM2M_Functions {
log(__SCOPE__&": WARNING: Unexpected message received");
repeat;
}
}
}
/**
* @desc Cse altstep for config 04
*/
altstep a_cse_cf04() runs on CseTester {
[] mccPort.receive {
log(__SCOPE__&": WARNING: Unexpected message received");
repeat;
}
}
}//end group altstepFunctions
......
......@@ -38,6 +38,8 @@ module OneM2M_Pixits {
modulepar XSD.ID PX_CSE_ID := "cseId";
modulepar XSD.ID PX_CSE1_ID := "MyCSEId";
modulepar XSD.ID PX_CSE_RESOURCE_ID := "cseResourceId";
modulepar XSD.ID PX_AE1_ID_STEM := "";
......
......@@ -455,6 +455,15 @@ module OneM2M_Templates {
primitiveContent := {container_optional := m_contentCreateContainer}
};
/**
* @desc Base CREATE request primitive for remoteCSE resource
*/
template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName := c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID) modifies m_create := {
requestIdentifier := testcasename() & "-m_createRemoteCSE" & f_rnd(1, 1000000),
resourceType := int16,
primitiveContent := {remoteCSE_optional := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
};
/**
* @desc CREATE request primitive for Container resource wiht no resourceName provided
*/
......@@ -1402,6 +1411,36 @@ module OneM2M_Templates {
choice := omit//NP
};
/**
* @desc Base primitiveContent for CREATE operation for Container resource
* @param p_name Resource name
*/
template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID):= {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
creationTime := omit,//NP
lastModifiedTime := omit,//NP
labels := omit,//O
accessControlPolicyIDs := p_accessControlPolicyIds,//O
expirationTime := omit,//O
dynamicAuthorizationConsultationIDs := omit,
announceTo := omit,//O
announcedAttribute := omit,//O
cseType := omit,//O
pointOfAccess := omit,//O
cSEBase := "/" & p_cSEBase,//M
cSE_ID := "/" & p_cSE_ID,//M
m2M_Ext_ID := omit,//O
trigger_Recipient_ID := omit,//O
requestReachability := true,//M
nodeLink := omit,//O
e2eSecInfo := omit,//O
triggerReferenceNumber := omit,//O
choice := omit//O
};
/**
* @desc Base reception template of primitiveContent for CREATE operation for ContainerAnnc resource
*/
......@@ -2118,6 +2157,58 @@ module OneM2M_Templates {
expirationTime := *//M
}
template RemoteCSE_optional m_contentRemoteCSE_allOmit := {
resourceName := omit,//M
resourceType := omit,//M
resourceID := omit,//M
parentID := omit,//M
creationTime := omit,//M
lastModifiedTime := omit,//M
labels := omit,//O
accessControlPolicyIDs := omit,//O
expirationTime := omit,//M
dynamicAuthorizationConsultationIDs := omit,//O
announceTo := omit,//O
announcedAttribute := omit,//O
cseType := omit,//O
pointOfAccess := omit,//O
cSEBase := omit,//M
cSE_ID := omit,//M
m2M_Ext_ID := omit,//O
trigger_Recipient_ID := omit,//O
requestReachability := omit,//M
nodeLink := omit,//O
e2eSecInfo := omit,//O
triggerReferenceNumber := omit,//O
choice := omit//O
};
template RemoteCSE_optional mw_contentRemoteCSEBase := {
resourceName := ?,//M
resourceType := ?,//M
resourceID := ?,//M
parentID := ?,//M
creationTime := ?,//M
lastModifiedTime := ?,//M
labels := *,//O
accessControlPolicyIDs := *,//O
expirationTime := ?,//M
dynamicAuthorizationConsultationIDs := *,//O
announceTo := *,//O
announcedAttribute := *,//O
cseType := *,//O
pointOfAccess := *,//O
cSEBase := ?,//M
cSE_ID := ?,//M
m2M_Ext_ID := *,//O
trigger_Recipient_ID := *,//O
requestReachability := ?,//M
nodeLink := *,//O
e2eSecInfo := *,//O
triggerReferenceNumber := *,//O
choice := *//O
};
template Schedule_optional mw_contentScheduleBase := {
resourceName := ?,//M
resourceType := ?,//M
......
......@@ -42,6 +42,7 @@ module OneM2M_TestSystem {
//global variables
var AE_optional vc_aeAux;//TODO To be removed
var RemoteCSE_optional vc_remoteCSEAux;//TODO To be removed
var AccessControlPolicy_optional vc_acpAux;
var integer vc_acpAuxIndex := -1;
......
......@@ -1642,6 +1642,7 @@ type union PrimitiveContent {
Node_optional node_optional,
NodeAnnc_optional nodeAnnc_optional,
PollingChannel_optional pollingChannel_optional,
RemoteCSE_optional remoteCSE_optional,
Schedule_optional schedule_optional,
ScheduleAnnc_optional scheduleAnnc_optional,
ServiceSubscribedAppRule_optional serviceSubscribedAppRule_optional,
......@@ -7324,6 +7325,72 @@ with {
variant (resourceName) "attribute";
};
type record RemoteCSE_optional
{
ResourceName resourceName optional,
ResourceType resourceType optional,
XSD.ID resourceID optional,
NhURI parentID optional,
Timestamp creationTime optional,
Timestamp lastModifiedTime optional,
Labels labels optional,
AcpType accessControlPolicyIDs optional,
Timestamp expirationTime optional,
ListOfURIs dynamicAuthorizationConsultationIDs optional,
ListOfURIs announceTo optional,
record length(1 .. infinity) of XSD.NCName announcedAttribute optional,
CseTypeID cseType optional,
PoaList pointOfAccess optional,
XSD.AnyURI cSEBase optional,
XSD.ID cSE_ID optional,
ExternalID m2M_Ext_ID optional,
TriggerRecipientID trigger_Recipient_ID optional,
XSD.Boolean requestReachability optional,
XSD.AnyURI nodeLink optional,
E2eSecInfo e2eSecInfo optional,
XSD.UnsignedInt triggerReferenceNumber optional,
union {
record length(1 .. infinity) of ChildResourceRef childResource_list,
record length(1 .. infinity) of union {
NodeAnnc nodeAnnc,
Container container,
ContainerAnnc containerAnnc,
Group group_,
GroupAnnc groupAnnc,
AccessControlPolicy accessControlPolicy,
AccessControlPolicyAnnc accessControlPolicyAnnc,
Subscription subscription,
PollingChannel pollingChannel,
Schedule schedule,
TimeSeries timeSeries,
TimeSeriesAnnc timeSeriesAnnc,
LocationPolicyAnnc locationPolicyAnnc,
AEAnnc aEAnnc,
Sg_flexContainerResource_group sg_flexContainerResource,
Sg_announcedFlexContainerResource_group sg_announcedFlexContainerResource
} choice_list
} choice optional
}
with {
variant "name as uncapitalized";
variant "element";
variant (resourceName) "attribute";
variant (announcedAttribute) "list";
variant (cSEBase) "name as capitalized";
variant (cSE_ID) "name as 'CSE-ID'";
variant (m2M_Ext_ID) "name as 'M2M-Ext-ID'";
variant (trigger_Recipient_ID) "name as 'Trigger-Recipient-ID'";
//variant (requestReachability) "text 'true' as '1'";
//variant (requestReachability) "text 'false' as '0'";
variant (choice) "untagged";
variant (choice.childResource_list) "untagged";
variant (choice.childResource_list[-]) "name as 'childResource'";
variant (choice.choice_list) "untagged";
variant (choice.choice_list[-]) "untagged";
variant (choice.choice_list[-].group_) "name as 'group'";
variant (choice.choice_list[-].aEAnnc) "name as capitalized";
};
type record Schedule_optional
{
ResourceName resourceName optional,
......
......@@ -25,10 +25,12 @@ module OneM2M_TypesAndValues {
const XSD.String c_defaultSubscriptionResourceName := "MySubscriptionResource";
const XSD.String c_defaultContentInstanceResourceName := "MyContentInstanceResource";
const XSD.String c_defaultContainerResourceName := "MyContainerResource";
const XSD.String c_defaultRemoteCSEResourceName := "MyRemoteCSEResource";
const XSD.String c_defaultMgmtObjResourceName := "MyMgmtObjResource";
const XSD.String c_defaultAeResourceName := "MyAeResource";
const XSD.String c_defaultLocationPolicyResourceName := "MyLocationPolicyResource";
const XSD.String c_defaultNodeResourceName := "MyNodeResource";
const XSD.String c_defaultNodeID := "MyNodeId";
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)
......@@ -107,7 +109,8 @@ module OneM2M_TypesAndValues {
type enumerated Configurations {
e_cf01,
e_cf02,
e_cf03
e_cf03,
e_cf04
};
......
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