Merge STF559_OBI branch into 'Release3-onwards' branch

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent c2e43509
......@@ -14,7 +14,7 @@ module OneM2M_Functions {
import from XSD all;
import from OneM2M_Templates all;
import from OneM2M_Types all;
import from OneM2M_Ports all;
import from OneM2M_Ports all;
import from OneM2M_TypesAndValues all;
import from OneM2M_TestSystem all;
import from OneM2M_Pixits all;
......@@ -578,7 +578,48 @@ module OneM2M_Functions {
// Connect
}
function f_cf07Up(in CseTypeID p_cseType := int2) runs on CseSimu system AeSystem {
// Variables
var charstring v_binding;
var charstring v_binding_in;
var PrimitiveContent v_cSEBaseResource;
var charstring v_host;
vc_cseSimuDesc := PX_TS_CSE1;
//Initialization of component variables
vc_config := e_cf07;
vc_testSystemRole := e_cse;
vc_cseType := p_cseType;
//Creation of CSEBase
v_cSEBaseResource := f_generateLocalResource(-, -1, int5);
vc_cSEBaseIndex := f_setLocalResource(v_cSEBaseResource, int5, -1);
// Map
map(self:mcaPort, system:mcaPort) param (vc_cseSimuDesc.mcaPort);//TODO To be consistent, we should use mcaPortIn for AE testing
map(self:mcaPortIn, system:mcaPortIn) param (vc_cseSimuDesc.mcaPortIn);//TODO To be consistent, we should use mcaPortIn for AE testing
map(self:acPort, system:acPort);
f_setProtocolBinding(vc_cseSimuDesc.mcaPort, vc_cseSimuDesc.mcaPortIn, v_binding, v_host, v_binding_in);
vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcaPort))] := { mcaPort, v_host, v_binding, vc_cseSimuDesc.mcaPort.serialization };
vc_myInterfaces[enum2int(valueof(InterfaceIds:e_mcaPortIn))] := { mcaPortIn, v_host, v_binding_in, vc_cseSimuDesc.mcaPortIn.serialization };
if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort) param (PX_TS_UT);
}
activate(a_default());
vc_cseSimu := activate(a_cse_cf07());
// Connect
//Initialze the IUT
} // End of function f_cf07Up
/**
* @desc Ports unmapping
*/
......@@ -730,6 +771,18 @@ module OneM2M_Functions {
unmap(vc_ae2:acPort, system:acPort);
}// end f_cf06DownCseSimuMaster
function f_cf07Down() runs on CseSimu system AeSystem {
unmap(self:mcaPort, system:mcaPort);
unmap(self:mcaPortIn, system:mcaPortIn);
unmap(self:acPort, system:acPort);
if(PX_UT_IMPLEMENTED){
unmap(self:utPort, system:utPort);
}
} // End of function f_cfDown
}//end group configFunctions
group InfoPortCommunication {
......@@ -4044,9 +4097,15 @@ module OneM2M_Functions {
*/
altstep a_cse_cf06_das() runs on AeSimu {
[] a_cse_aeSimu();
}
}
/**
* @desc Cse altstep for config 07
*/
altstep a_cse_cf07() runs on CseSimu {
[] a_ae_cseSimu();
}
/**
* @desc Altstep for CseSimu
*/
......@@ -7060,6 +7119,11 @@ module OneM2M_Functions {
*/
external function fx_validateESCertKEMessage(XSD.Base64Binary incomingMessage, integer stage) return boolean;
/**
* @desc Retrieve the specified ontology description.
* @param p_ontology_description The ontology description (e.g. /saref).
*/
external function fx_retrieve_formal_ontology(in charstring p_ontology_description) return charstring;
} // end externalFunctions
......
......@@ -6,7 +6,7 @@
* All rights reserved.
*
* @author oneM2M/ETSI
* @desc Module containing Pixits for oneM2M
* @desc Module containing Pixits for oneM2M
*
*/
module OneM2M_Pics {
......@@ -47,7 +47,8 @@ module OneM2M_Pics {
*/
modulepar boolean PICS_IN_CSE := true;
modulepar boolean PICS_MN_CSE := true;
modulepar boolean PICS_ASN_CSE := true;
modulepar boolean PICS_ASN_CSE := true;
modulepar boolean PICS_AE_IPE := false;
/**
* @desc Resource Addressing methods
......@@ -189,6 +190,46 @@ module OneM2M_Pics {
modulepar boolean PICS_SERVICE_SUBSCRIBED_NODE := true;
modulepar boolean PICS_REMOTE_PROVISIONING := true;
}
group Onthology_based_interworking {
/**
* @desc Does the Test System provide an ontology server?
*/
modulepar boolean PICS_TS_ONTOLOGY_SERVER := true;
/**
* @desc Does the SUT support RESTfull API?
*/
modulepar boolean PICS_RESTFULL_API := true;
/**
* @desc Does the SUT support Discovery?
*/
modulepar boolean PICS_AE_IPE_DISCOVERY := true;
/**
* @desc The expected HTTP Content-type header value
*/
modulepar charstring PICS_HEADER_CONTENT_TYPE := "application/xml";
/**
* @desc The expected HTTP server where to retrieve the formal description of the ontology
*/
modulepar charstring PICS_HEADER_HOST := "www.someOrganization.org";
/**
* @desc HTTP Authorization if required
*/
modulepar boolean PICS_USE_TOKEN_HEADER := false;
modulepar charstring PICS_TOKEN_HEADER := "";
/**
* @desc HTTP GET Uri to retrieve the formal description of the ontology
*/
modulepar charstring PICS_OBI_URI := "/someOntology"; // TODO Could it be a Pixit?
}
}
group SecurityAttributes {
......
......@@ -105,14 +105,6 @@ module OneM2M_Pixits {
*/
modulepar PrimitiveScope PX_PRIMITIVE_SCOPE := e_cseRelative;
//WebSocket parameters
modulepar charstring PX_WS_PROTOCOL := "oneM2M.R2.0.xml";
modulepar charstring PX_REQUEST_URI := "/";
//MQTT parameters
modulepar charstring PX_HOSTING_CSE_ID := "CSE-ID";
modulepar charstring PX_CREDENTIAL_ID := "admin:admin";
/**
* @desc Protocol binding to use during test execution
*/
......@@ -364,7 +356,8 @@ module OneM2M_Pixits {
serialization := "json"
}
};
modulepar UtDesc PX_TS_UT := { url := "http://127.0.0.1:43000/" };
modulepar UrlDesc PX_TS_UT := { url := "http://127.0.0.1:43000/" };
modulepar AeSimuComponentDesc PX_TS_DAS := { // DAS component settings
aeIdStem := "",
......@@ -400,7 +393,12 @@ module OneM2M_Pixits {
serialization := "xml"
}
};
/**
* @desc Simulated Ontology Server IP address and listening port
*/
modulepar UrlDesc PX_TS_ONTOLOGY_SERVER := { url := "http://127.0.0.1:80/" };
}
group ExecutionParameters {
......
......@@ -64,7 +64,7 @@ module OneM2M_Ports {
UtTriggerAckPrimitive;
out
UtTriggerPrimitive;
map param (in UtDesc p_utDesc)
map param (in UrlDesc p_utDesc)
}
}//end module
......@@ -209,6 +209,13 @@ module OneM2M_Templates {
vendorInformation := *
};
template RequestPrimitive mw_retrieveFormalOntology(template XSD.ID p_targetResourceAddress := ?, template XSD.ID p_originator := ?, template XSD.AnyURI p_ontologyServerUri := ?) modifies mw_retrieve := {
from_ := p_originator,
requestIdentifier := ?,
primitiveContent := { flexContainer := mw_contentFlexContainer(p_ontologyServerUri) },
releaseVersionIndicator := "3"
};
/**
* @desc RETRIEVE request primitive for a single attribute in To field ("targetResourceAddress#AttributeName")
* @param p_targetResourceAddress Target resource address (including "#AttributeName")
......@@ -2360,6 +2367,10 @@ module OneM2M_Templates {
notification := p_notification
};
template (present) PrimitiveContent mw_primitiveContentFlexContainer(template (present) FlexContainerResource_optional p_flexContainer := ?) := {
flexContainer := p_flexContainer
};
/**
* @desc Base primitiveContent for CREATE operation for AEAnnc resource
......@@ -7264,7 +7275,30 @@ module OneM2M_Templates {
nodeLink := omit //O
}
template (value) DeviceAirConditioner_optional m_contentDeviceAirConditioner_allOmit := {
template (present) FlexContainerResource_optional mw_contentFlexContainer(
template (present) XSD.AnyURI p_ontologyRef := ?
) := {
resourceName := *,//O
resourceType := *,//NP
resourceID := *,//NP
parentID := *,//NP
creationTime := *,//NP
lastModifiedTime := *,//NP
labels := *,//O
accessControlPolicyIDs := *,//O
expirationTime := *,//O
dynamicAuthorizationConsultationIDs := *, //O
announceTo := *,//O
announcedAttribute := *,//O
stateTag := *,//NP
creator := *,//O
containerDefinition := *, //M
ontologyRef := *, //O
contentSize := *, //NP
nodeLink := * //O
}
template DeviceAirConditioner_optional m_contentDeviceAirConditioner_allOmit := {
resourceName := omit,//O
resourceType := omit,//NP
resourceID := omit,//NP
......
......@@ -4100,13 +4100,17 @@ group OtherTypes {
e_cf03,
e_cf04,
e_cf06,
e_cf06DasSimuMaster
e_cf06DasSimuMaster,
e_cf07,
e_cf07OSSimuMaster
};
type enumerated TestSystemRole {
e_cse,
e_ae,
e_das
e_ae_ipe,
e_das,
e_os
};
type NhURI ParentID;
......@@ -4395,7 +4399,7 @@ group OtherTypes {
* @member requestId
* @member url Test System IP address
*/
type record UtDesc {
type record UrlDesc {
charstring url
}
......
This diff is collapsed.
......@@ -24,6 +24,105 @@ module OneM2M_Testcases_AE_Release_3 {
group AE {
group OBI {
group Registration {
/**
* @desc Check that the IUT sends an AE initial registration request when it is started
*/
testcase TC_AE_OBI_REG_001() runs on Tester system AeSystem {
var CseSimu v_cse1Simu := CseSimu.create("CSE1") alive;
v_cse1Simu.start(f_AE_OBI_REG_001());
v_cse1Simu.done;
}
}
group Initialization {
/**
* @desc Check that the IUT starts the Initialization sequence of an Ontology based Interworking
* IPE and retrieves the formal description of the ontology
*/
testcase TC_AE_OBI_INI_001() runs on Tester system AeSystem {
var CseSimu v_os1 := CseSimu.create("OS1") alive;
v_os1.start(f_AE_OBI_INI_001());
v_os1.done;
}
}
group Discovery {
/**
* @desc Check that the IUT starts the Initialization sequence of an Ontology based Interworking
* IPE and retrieves the formal description of the ontology
*/
testcase TC_AE_OBI_DIS_001() runs on Tester system AeSystem {
var CseSimu v_cse1Simu := CseSimu.create("CSE1") alive;
v_cse1Simu.start(f_AE_OBI_DIS_001());
v_cse1Simu.done;
}
/**
* @desc Check that the IUT continues to discover the devices in the non-oneM2M area
*/
testcase TC_AE_OBI_DIS_002() runs on Tester system AeSystem {
var CseSimu v_cse1Simu := CseSimu.create("CSE1") alive;
v_cse1Simu.start(f_AE_OBI_DIS_002());
v_cse1Simu.done;
}
/**
* @desc Check that the IUT continues to discover the devices in the non-oneM2M area
*/
testcase TC_AE_OBI_DIS_003() runs on Tester system AeSystem {
var CseSimu v_cse1Simu := CseSimu.create("CSE1") alive;
v_cse1Simu.start(f_AE_OBI_DIS_003());
v_cse1Simu.done;
}
/**
* @desc Check that the IUT accepts "on demand" discovery
*/
testcase TC_AE_OBI_DIS_004() runs on Tester system AeSystem {
var CseSimu v_cse1Simu := CseSimu.create("CSE1") alive;
v_cse1Simu.start(f_AE_OBI_DIS_004());
v_cse1Simu.done;
}
}
group Retrieve {
/**
* @desc Check that the IUT accepts a retrieval request resource and responds 2000 (OK) status
*/
testcase TC_AE_OBI_RET_001() runs on Tester system AeSystem {
var CseSimu v_cse1Simu := CseSimu.create("CSE1") alive;
v_cse1Simu.start(f_AE_OBI_RET_001());
v_cse1Simu.done;
}
}
}
group HAIM {
group Create {
......@@ -33,21 +132,6 @@ module OneM2M_Testcases_AE_Release_3 {
*/
group g_AE_HAIM_CRE_001 {
testcase TC_AE_HAIM_CRE_001_AIR() runs on Tester system AeSystem {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
var template UtTriggerPrimitive v_utRequest := m_utCreateDeviceAirConditioner;
var template RequestPrimitive v_requestPrimitive := mw_createDeviceAirConditioner;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for deviceAirConditioner device model to ";
var XSD.AnyURI v_containerDefinition := "org.onem2m.home.device.deviceAirConditioner";
v_utRequest.requestPrimitive.primitiveContent.deviceAirConditioner.containerDefinition := v_containerDefinition;
v_requestPrimitive.primitiveContent.deviceAirConditioner.containerDefinition := v_containerDefinition;
v_cse1.start(f_AE_HAIM_CRE_001(v_action, v_utRequest, v_requestPrimitive));
v_cse1.done;
}
testcase TC_AE_HAIM_CRE_001_CLO() runs on Tester system AeSystem {
......
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