Commit 468da382 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega

Merge branch 'Release2-onwards' into Release3-onwards

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parents b5cad8ad 44462b33
[submodule "LibOneM2M/oneM2M_Types"]
path = LibOneM2M/oneM2M_Types
url = https://git.onem2m.org/TST/ATS-oneM2M-Types-Release-3.git
......@@ -1226,11 +1226,6 @@ module OneM2M_Functions {
setverdict(inconc, __SCOPE__&":INFO: Error while registering application");
stop;
}
[] mcaPort.receive {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
stop;
};
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while registering resource");
stop;
......
This diff is collapsed.
/**
* Copyright Notification
* No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
* All rights reserved.
*
* @author oneM2M/ETSI
* @desc Useful types
*
*/
module UsefulTtcn3Types {
type integer byte (-128 .. 127) with { variant "/* 8 bit */" };
type integer unsignedbyte (0 .. 255) with { variant "/*unsigned 8 bit*/" };
type integer short (-32768 .. 32767) with { variant "/*16 bit*/" };
type integer unsignedshort (0 .. 65535) with { variant "/*unsigned 16 bit*/" };
type integer long (-2147483648 .. 2147483647) with { variant "/*32 bit*/" };
type integer unsignedlong (0 .. 4294967295) with { variant "/*unsigned 32 bit*/" };
type integer longlong /* ( -9223372036854775808 .. 9223372036854775807 ) */ with { variant "/*64 bit*/" };
type integer unsignedlonglong /* ( 0 .. 18446744073709551615 ) */ with { variant "/*unsigned 64 bit*/" };
type float IEEE754float with { variant "/*IEEE754 float*/" };
type float IEEE754double with { variant "/*IEEE754 double*/" };
type float IEEE754extfloat with { variant "/*IEEE754 extended float*/" };
type float IEEE754extdouble with { variant "/*IEEE754 extended double*/" };
type universal charstring utf8string with { variant "/*UTF-8*/" };
type universal charstring bmpstring ( char ( 0,0,0,0 ) .. char ( 0,0,255,255) ) with { variant "/*UCS-2*/" };
type universal charstring utf16string ( char ( 0,0,0,0 ) .. char ( 0,16,255,255) ) with { variant "/*UTF-16*/" };
type universal charstring iso8859string ( char ( 0,0,0,0 ) .. char ( 0,0,0,255) ) with { variant "/*8 bit*/" };
type record IDLfixed
{
unsignedshort digits,
short scale,
charstring value_
}
with {
variant "/*IDL:fixed FORMAL/01-12-01 v.2.6*/";
};
/*
type charstring char length (1);
NOTE 1: The name of this useful type is the same as the TTCN-3 keyword used to denote universal
charstring values in the quadraple form. In general it is disallowed to use TTCN-3 keywords as
identifiers. The "char" useful type is a solitary exception and allowed only for backward compatibility
with previous versions of the TTCN-3 standard. (except Titan doesn't)
NOTE 2: The special string "8 bit" defined in clause 28.2.3 may be used with this type to specify a given encoding
for its values. Also, other properties of the base type can be changed by using attribute mechanisms.
*/
type universal charstring uchar length (1);
/*
NOTE: Special strings defined in clause 28.2.3 except "8 bit" may be used with this type to specify a given
encoding for its values. Also, other properties of the base type can be changed by using attribute
mechanisms.
*/
type bitstring bit length (1);
type hexstring hex length (1);
type octetstring octet length (1);
}
with {
encode "XML";
}
/**
* Copyright Notification
* No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
* All rights reserved.
*
* @author oneM2M/ETSI
* @desc XSD Aux
*
*/
module XSD {
import from UsefulTtcn3Types all;
//These constants are used in the XSD date/time type definitions
const charstring
dash := "-",
cln := ":",
year := "[0-9]#4",
yearExpansion := "(-([1-9][0-9]#(0,))#(,1))#(,1)",
month := "(0[1-9]|1[0-2])",
dayOfMonth := "(0[1-9]|[12][0-9]|3[01])",
hour := "([01][0-9]|2[0-3])",
minute := "([0-5][0-9])",
second := "([0-5][0-9])",
sFraction := "(.[0-9]#(1,))#(,1)",
endOfDayExt := "24:00:00(.0#(1,))#(,1)",
nums := "[0-9]#(1,)",
ZorTimeZoneExt := "(Z|[+-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))#(,1)",
durTime := "(T[0-9]#(1,)"&
"(H([0-9]#(1,)(M([0-9]#(1,)(S|.[0-9]#(1,)S))#(,1)|.[0-9]#(1,)S|S))#(,1)|"&
"M([0-9]#(1,)(S|.[0-9]#(1,)S)|.[0-9]#(1,)M)#(,1)|"&
"S|"&
".[0-9]#(1,)S))";
//anySimpleType
type XMLCompatibleString AnySimpleType
with {
variant "XSD:anySimpleType";
};
//anyType;
type record AnyType
{
record of String embed_values optional,
record of String attr optional,
record of String elem_list
}
with {
variant "XSD:anyType";
//variant "embedValues";
//variant (attr) "anyAttributes";
//variant (elem_list) "anyElement";
};
// String types
type XMLCompatibleString String
with {
variant "XSD:string";
};
type XMLStringWithNoCRLFHT NormalizedString
with {
variant "XSD:normalizedString";
};
type NormalizedString Token
with {
variant "XSD:token";
};
type XMLStringWithNoWhitespace Name
with {
variant "XSD:Name";
};
type XMLStringWithNoWhitespace NMTOKEN
with {
variant "XSD:NMTOKEN";
};
type Name NCName
with {
variant "XSD:NCName";
};
type NCName ID
with {
variant "XSD:ID";
};
type NCName IDREF
with {
variant "XSD:IDREF";
};
type NCName ENTITY
with {
variant "XSD:ENTITY";
};
type octetstring HexBinary
with {
variant "XSD:hexBinary";
};
type octetstring Base64Binary
with {
variant "XSD:base64Binary";
};
type XMLStringWithNoCRLFHT AnyURI
with {
variant "XSD:anyURI";
};
type charstring Language (pattern "[a-zA-Z]#(1,8)(-\w#(1,8))#(0,)")
with {
variant "XSD:language";
};
// Integer types
type integer Integer
with {
variant "XSD:integer";
};
type integer PositiveInteger (1 .. infinity)
with {
variant "XSD:positiveInteger";
};
type integer NonPositiveInteger (-infinity .. 0)
with {
variant "XSD:nonPositiveInteger";
};
type integer NegativeInteger (-infinity .. -1)
with {
variant "XSD:negativeInteger";
};
type integer NonNegativeInteger (0 .. infinity)
with {
variant "XSD:nonNegativeInteger";
};
type longlong Long
with {
variant "XSD:long";
};
type unsignedlonglong UnsignedLong
with {
variant "XSD:unsignedLong";
};
type long Int
with {
variant "XSD:int";
};
type unsignedlong UnsignedInt
with {
variant "XSD:unsignedInt";
};
type short Short
with {
variant "XSD:short";
};
type unsignedshort UnsignedShort
with {
variant "XSD:unsignedShort";
};
type byte Byte
with {
variant "XSD:byte";
};
type unsignedbyte UnsignedByte
with {
variant "XSD:unsignedByte";
};
// Float types
type float Decimal
with {
variant "XSD:decimal";
};
type IEEE754float Float
with {
variant "XSD:float";
};
type IEEE754double Double
with {
variant "XSD:double";
};
// Time types
type charstring Duration (pattern
"{dash}#(,1)P({nums}(Y({nums}(M({nums}D{durTime}#(,1)|{durTime}#(,1))|D{durTime}#(,1))|" &
"{durTime}#(,1))|M({nums}D{durTime}#(,1)|{durTime}#(,1))|D{durTime}#(,1))|{durTime})")
with {
variant "XSD:duration";
};
type charstring DateTime (pattern
"{yearExpansion}{year}{dash}{month}{dash}{dayOfMonth}T({hour}{cln}{minute}{cln}{second}" &
"{sFraction}|{endOfDayExt}){ZorTimeZoneExt}" )
with {
variant "XSD:dateTime";
};
type charstring Time (pattern
"({hour}{cln}{minute}{cln}{second}{sFraction}|{endOfDayExt}){ZorTimeZoneExt}" )
with {
variant "XSD:time";
};
type charstring Date (pattern
"{yearExpansion}{year}{dash}{month}{dash}{dayOfMonth}{ZorTimeZoneExt}" )
with {
variant "XSD:date";
};
type charstring GYearMonth (pattern
"{yearExpansion}{year}{dash}{month}{ZorTimeZoneExt}" )
with {
variant "XSD:gYearMonth";
};
type charstring GYear (pattern
"{yearExpansion}{year}{ZorTimeZoneExt}" )
with {
variant "XSD:gYear";
};
type charstring GMonthDay (pattern
"{dash}{dash}{month}{dash}{dayOfMonth}{ZorTimeZoneExt}" )
with {
variant "XSD:gMonthDay";
};
type charstring GDay (pattern
"{dash}{dash}{dash}{dayOfMonth}{ZorTimeZoneExt}" )
with {
variant "XSD:gDay";
};
type charstring GMonth (pattern
"{dash}{dash}{month}{ZorTimeZoneExt}" )
with {
variant "XSD:gMonth";
};
// Sequence types
type record of NMTOKEN NMTOKENS
with {
variant "XSD:NMTOKENS";
};
type record of IDREF IDREFS
with {
variant "XSD:IDREFS";
};
type record of ENTITY ENTITIES
with {
variant "XSD:ENTITIES";
};
type record QName
{
AnyURI uri optional,
NCName name
}
with {
variant "XSD:QName";
};
// Boolean type
type boolean Boolean
with {
variant "XSD:boolean";
};
//TTCN-3 type definitions supporting the mapping of W3C XML Schema built-in datatypes
type utf8string XMLCompatibleString
(
char(0,0,0,9)..char(0,0,0,9),
char(0,0,0,10)..char(0,0,0,10),
char(0,0,0,13)..char(0,0,0,13),
char(0,0,0,32)..char(0,0,215,255),
char(0,0,224,0)..char(0,0,255,253),
char(0,1,0,0)..char(0,16,255,253)
);
type utf8string XMLStringWithNoWhitespace
(
char(0,0,0,33)..char(0,0,215,255),
char(0,0,224,0)..char(0,0,255,253),
char(0,1,0,0)..char(0,16,255,253)
);
type utf8string XMLStringWithNoCRLFHT
(
char(0,0,0,32)..char(0,0,215,255),
char(0,0,224,0)..char(0,0,255,253),
char(0,1,0,0)..char(0,16,255,253)
);
}
with{
encode "XML"
}
Subproject commit 5aefeaaf923fac72b7661bf58dae798d55d23bb3
......@@ -8215,6 +8215,8 @@ module OneM2M_PermutationFunctions {
var ListOfURIs v_memberIDs;
var AcpType v_acpIds;
var template RequestPrimitive v_createAcp := m_createAcp("PermissionForEveryone", -, -);
var template RequestPrimitive v_createContainerInAE1 := m_createContainerBase;
var template RequestPrimitive v_createContainerInAE2 := m_createContainerBase;
// Test control
if(not(PICS_ACP_SUPPORT)) {
......@@ -8244,9 +8246,11 @@ module OneM2M_PermutationFunctions {
v_ae2LocalIndex := f_getLatestResource(vc_ae2);
v_containerIndex_1 := f_cse_createResource(int3, m_createContainerBase, v_aeIndex_1); // AE1 child resource
v_createContainerInAE1 := f_setAcpId(v_createContainerInAE1, v_acpIds);
v_containerIndex_1 := f_cse_createResource(int3, v_createContainerInAE1, v_aeIndex_1); // AE1 child resource
vc_ae2.start(f_cse_createResource(int3, m_createContainerBase, v_aeIndex_2));
v_createContainerInAE2 := f_setAcpId(v_createContainerInAE2, v_acpIds);
vc_ae2.start(f_cse_createResource(int3, v_createContainerInAE2, v_aeIndex_2));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
......@@ -8823,6 +8827,7 @@ module OneM2M_PermutationFunctions {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_aeIndex2 := -1;
var integer v_acpIndex := -1;
var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
var RequestPrimitive v_updateRequest;
......@@ -8832,14 +8837,19 @@ module OneM2M_PermutationFunctions {
// Test control
// Test component configuration
f_cf01Up();
f_cf01Up(true);
// Test adapter configuration
// Preamble
v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
v_aeIndex2 := f_getLatestResource(vc_ae2);
v_accessControlRule_1 := valueof(m_createAcr({ f_getOriginator(v_aeIndex), PX_SUPER_AE_ID}, int63));
v_setOfArcs.accessControlRule_list := {v_accessControlRule_1};
v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs));
......@@ -8847,7 +8857,7 @@ module OneM2M_PermutationFunctions {
// Test Body
p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
p_requestPrimitive.from_ := "UnknowOriginator";
p_requestPrimitive.from_ := f_getResourceId(vc_resourcesList[v_aeIndex2].resource);
p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000);
f_send(e_mcaPort, m_request(valueof(p_requestPrimitive)));
......@@ -9029,13 +9039,14 @@ module OneM2M_PermutationFunctions {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_aeIndex2 := -1;
var integer v_acpIndex := -1;
var RequestPrimitive v_createRequest;
// Test control
// Test component configuration
f_cf01Up();
f_cf01Up(true);
// Test adapter configuration
......@@ -9045,9 +9056,14 @@ module OneM2M_PermutationFunctions {
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
v_aeIndex2 := f_getLatestResource(vc_ae2);
// Test Body
p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
p_requestPrimitive.from_ := "UnknowOriginator";
p_requestPrimitive.from_ := f_getResourceId(vc_resourcesList[v_aeIndex2].resource);
p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000);
f_send(e_mcaPort, m_request(valueof(p_requestPrimitive)));
......
......@@ -634,7 +634,7 @@ module OneM2M_Testcases_AE_Release_1 {
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;
var template RequestPrimitive v_createAe := mw_createAe;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid AE CREATE Registration Request containing attribute ContentSerialization";
v_utRequest.requestPrimitive.primitiveContent.aE.contentSerialization := {applicationxml};
v_utRequest.requestPrimitive.primitiveContent.aE.contentSerialization := {xml};
v_utRequest.forcedFields := {{name := "contentSerialization", value_ := "UNINITIALIZED"}};
v_createAe.primitiveContent.aE.contentSerialization := ?;//Check value other than UNINITIALIZED, done by typing
v_cse1.start(f_AE_REG_CRE_002(v_utRequest,v_createAe,v_action));
......@@ -1161,7 +1161,7 @@ module OneM2M_Testcases_AE_Release_1 {
var template RequestPrimitive v_expectedUpdateRequestAe;
var template UtTriggerPrimitive v_utRequest := m_utUpdateAe;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for AE updating attribute contentSerialization to ";
v_utRequest.requestPrimitive.primitiveContent.aE.contentSerialization := {applicationxml};
v_utRequest.requestPrimitive.primitiveContent.aE.contentSerialization := {xml};
v_utRequest.forcedFields := {{name := "contentSerialization", value_ := "UNINITIALIZED"}};
v_expectedUpdateRequestAe.primitiveContent.aE := mw_contentUpdateAe;
......
......@@ -545,7 +545,7 @@ module OneM2M_Testcases_CSE_Release_1 {
f_send(e_mcaPort, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4107))) {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4126))) {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation rejected.");
}
......
......@@ -2002,7 +2002,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_contentResponse.container := mw_contentContainer_allOmit;
v_contentResponse.container.lastModifiedTime := ?;
v_contentResponse.container.stateTag := ?;
v_contentResponse.container.labels := ?;
v_contentResponse.container.labels := omit;
v_updateRequest.primitiveContent.container.labels := {"VALUE_1"};
v_ae1.start(f_CSE_DMR_UPD_022(int3, m_createContainerBase, v_contentResponse, int3, m_createContainerBase, v_updateRequest));//Container
......@@ -2017,7 +2017,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_contentResponse.group_ := mw_contentGroup_allOmit;
v_contentResponse.group_.lastModifiedTime := ?;
v_contentResponse.group_.labels := ?;
v_contentResponse.group_.labels := omit;
v_updateRequest.primitiveContent.group_.labels := {"VALUE_1"};
v_ae1.start(f_CSE_DMR_UPD_022(int9, m_createGroupBase, v_contentResponse, int23, m_createSubscriptionBase, v_updateRequest));//Group
......@@ -2032,7 +2032,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_contentResponse.accessControlPolicy := mw_contentAcp_allOmit;
v_contentResponse.accessControlPolicy.lastModifiedTime := ?;
v_contentResponse.accessControlPolicy.labels := ?;
v_contentResponse.accessControlPolicy.labels := omit;
v_updateRequest.primitiveContent.accessControlPolicy.labels := {"VALUE_1"};
v_ae1.start(f_CSE_DMR_UPD_022(int1, m_createAcpBase,v_contentResponse, int23, m_createSubscriptionBase, v_updateRequest));//AccessControlPolicy
......
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