Commit 4ac06145 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Moved to XSD v1.9.0


Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent 0ce4bd48
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 105 2016-08-31 13:01:46Z reinaortega $
* $Id: OneM2M_Templates.ttcn 120 2016-09-20 14:48:51Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
......@@ -1109,7 +1109,6 @@ module OneM2M_Templates {
memberTypeValidated := omit,//NP
consistencyStrategy := omit,//O
groupName := omit,//O
fanOutPoint := omit,//NP
choice := omit//NP
};
......@@ -1127,9 +1126,7 @@ module OneM2M_Templates {
creationTime := omit,//NP
lastModifiedTime := omit,//NP
labels := omit,//O
accessControlPolicyIDs := p_accessControlPolicyIDs,//O
expirationTime := omit,//O
pollingChannelURI := omit//NP
expirationTime := omit//O
};
/**
......@@ -1256,8 +1253,6 @@ module OneM2M_Templates {
currentByteSize := omit,//NP
locationID := omit,//O
ontologyRef := omit,//O
latest := omit,//NP
oldest := omit,//NP
choice := omit//NP
};
......@@ -1358,7 +1353,6 @@ module OneM2M_Templates {
memberTypeValidated := omit,//NP
consistencyStrategy := omit,//NP
groupName := omit,//O
fanOutPoint := omit,//NP
choice := omit//NP
};
......@@ -1374,9 +1368,7 @@ module OneM2M_Templates {
creationTime := omit,//NP
lastModifiedTime := omit,//NP
labels := omit,//O
accessControlPolicyIDs := omit,//O
expirationTime := omit,//O
pollingChannelURI := omit//NP
expirationTime := omit//O
};
/**
......@@ -1478,8 +1470,6 @@ module OneM2M_Templates {
currentByteSize := omit,//NP
locationID := omit,//O
ontologyRef := omit,//O
latest := omit,//NP
oldest := omit,//NP
choice := omit//NP
};
......@@ -1625,7 +1615,6 @@ module OneM2M_Templates {
memberTypeValidated := *,//O
consistencyStrategy := *,//O
groupName := *,//O
fanOutPoint := omit,//M
choice := *//O
};
......@@ -1650,7 +1639,6 @@ module OneM2M_Templates {
memberTypeValidated := omit,//M
consistencyStrategy := omit,//O
groupName := omit,//O
fanOutPoint := omit,//M
choice := omit//O
}
......@@ -1693,7 +1681,6 @@ module OneM2M_Templates {
memberTypeValidated := omit,//M
consistencyStrategy := omit,//O
groupName := omit,//O
fanOutPoint := omit,//M
choice := {childResource_list := ?}//O
}
......@@ -1709,9 +1696,7 @@ module OneM2M_Templates {
creationTime := ?,//M
lastModifiedTime := ?,//M
labels := *,//O
accessControlPolicyIDs := *,//O
expirationTime := ?,//M
pollingChannelURI := ?//M
expirationTime := ?//M
};
template PollingChannel_optional mw_contentPollingChannel_allOmit := {
......@@ -1722,9 +1707,7 @@ module OneM2M_Templates {
creationTime := omit,//M
lastModifiedTime := omit,//M
labels := omit,//O
accessControlPolicyIDs := omit,//O
expirationTime := omit,//M
pollingChannelURI := omit//M
expirationTime := omit//M
};
template Schedule_optional mw_contentScheduleBase := {
......@@ -1939,8 +1922,6 @@ module OneM2M_Templates {
currentByteSize := ?,//M
locationID := *,//O
ontologyRef := *,//O
latest := omit,//M
oldest := omit,//M
choice := *//O
};
......@@ -1965,8 +1946,6 @@ module OneM2M_Templates {
currentByteSize := omit,//M
locationID := omit,//O
ontologyRef := omit,//O
latest := omit,//M
oldest := omit,//M
choice := omit//O
}
......@@ -2009,8 +1988,6 @@ module OneM2M_Templates {
currentByteSize := omit,//M
locationID := omit,//O
ontologyRef := omit,//O
latest := omit,//M
oldest := omit,//M
choice := {childResource_list := ?}//O
}
......
......@@ -7,13 +7,12 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_Types.ttcn $
* $Id: OneM2M_Types.ttcn 103 2016-08-30 09:39:32Z reinaortega $
* $Id: OneM2M_Types.ttcn 120 2016-09-20 14:48:51Z reinaortega $
* @desc Test System module for oneM2M
*
*/
module OneM2M_Types {
import from XSD all;
......@@ -241,8 +240,8 @@ module OneM2M_Types {
Timestamp expirationTime,
XSD.AnyURI link,
XSD.String appName optional,
XSD.String app_ID,
XSD.ID aE_ID,
XSD.String app_ID optional,
XSD.ID aE_ID optional,
PoaList pointOfAccess optional,
XSD.AnyURI ontologyRef optional,
XSD.AnyURI nodeLink optional,
......@@ -872,11 +871,12 @@ module OneM2M_Types {
type XSD.String Timestamp //(pattern "\d#(4)(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|30|31)T([01]\d|2[0-3])[0-5]\d[0-5]\d(,\d#(1,6))#(0,1)")
type XSD.String Timestamp // FIXME (pattern "\d#(4)(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|30|31)T([01]\d|2[0-3])[0-5]\d[0-5]\d(,\d#(1,6))#(0,1)")
with {
variant "name as uncapitalized";
};
type union AbsRelTimestamp
{
Timestamp alt_,
......@@ -971,7 +971,7 @@ module OneM2M_Types {
};
type XSD.String ScheduleEntry //FIXME To be added (pattern "(([*]|[1-5]#(0,1)\d([,\-][1-5]#(0,1)\d)*)[\q{0,0,0,20}\q{0,0,0,10}\t\r]+)#(2)([*]|((1#(0,1)\d|2[0-3])([,\-](1#(0,1)\d|2[0-3]))*))[\q{0,0,0,20}\q{0,0,0,10}\t\r]+([*]|(([1-9]|1\d|2\d|3[01])([,\-]([1-9]|1\d|2\d|3[01]))*))[\q{0,0,0,20}\q{0,0,0,10}\t\r]+([*]|(([1-9]|1[0-2])([,\-]([1-9]|1[0-2]))*))[\q{0,0,0,20}\q{0,0,0,10}\t\r]+([*]|([0-6]([,\-][0-6])*))")
type XSD.String ScheduleEntry //FIXME To be added (pattern "(([*]|[1-5]#(0,1)\d([,-][1-5]#(0,1)\d)*)[\q{0,0,0,20}\q{0,0,0,10}\t\r]+)#(2)([*]|((1#(0,1)\d|2[0-3])([,-](1#(0,1)\d|2[0-3]))*))[\q{0,0,0,20}\q{0,0,0,10}\t\r]+([*]|(([1-9]|1\d|2\d|3[01])([,-]([1-9]|1\d|2\d|3[01]))*))[\q{0,0,0,20}\q{0,0,0,10}\t\r]+([*]|(([1-9]|1[0-2])([,-]([1-9]|1[0-2]))*))[\q{0,0,0,20}\q{0,0,0,10}\t\r]+([*]|([0-6]([,-][0-6])*))")
with {
variant "name as uncapitalized";
};
......@@ -991,6 +991,13 @@ module OneM2M_Types {
};
type record length(1 .. infinity) of ResourceType ResourceTypeList
with {
variant "name as uncapitalized";
variant "list";
};
......@@ -1052,6 +1059,7 @@ module OneM2M_Types {
//variant (deliveryAggregation) "text 'false' as '0'";
};
type record of anytype Contents; // FIXME added by AMB, necessary for Codec
type record PrimitiveContent
......@@ -1066,8 +1074,6 @@ module OneM2M_Types {
};
type record FilterCriteria
{
Timestamp createdBefore optional,
......@@ -1079,7 +1085,7 @@ module OneM2M_Types {
Timestamp expireBefore optional,
Timestamp expireAfter optional,
Labels labels optional,
ResourceType resourceType optional,
ResourceTypeList resourceType optional,
XSD.NonNegativeInteger sizeAbove optional,
XSD.PositiveInteger sizeBelow optional,
record of TypeOfContent contentType_list,
......@@ -1451,6 +1457,23 @@ module OneM2M_Types {
};
type record SubordinateResource
{
XSD.NCName resourceName,
ResourceType resourceType,
XSD.ID resourceID,
NhURI parentID,
Timestamp creationTime,
Timestamp lastModifiedTime,
Labels labels optional,
Timestamp expirationTime
}
with {
variant "name as uncapitalized";
variant (resourceName) "attribute";
};
type record AnnouncedSubordinateResource
{
XSD.NCName resourceName,
......@@ -1539,8 +1562,6 @@ module OneM2M_Types {
XSD.NonNegativeInteger currentByteSize,
XSD.AnyURI locationID optional,
XSD.AnyURI ontologyRef optional,
XSD.AnyURI latest,
XSD.AnyURI oldest,
union {
record length(1 .. infinity) of ChildResourceRef childResource_list,
record length(1 .. infinity) of union {
......@@ -1676,6 +1697,7 @@ module OneM2M_Types {
record length(1 .. infinity) of ChildResourceRef childResource_list,
record length(1 .. infinity) of union {
RemoteCSE remoteCSE,
RemoteCSEAnnc remoteCSEAnnc,
Node node,
AE aE,
Container container,
......@@ -2072,6 +2094,11 @@ module OneM2M_Types {
int4103(4103),
int4104(4104),
int4105(4105),
int4106(4106),
int4107(4107),
int4108(4108),
int4109(4109),
int4110(4110),
int5000(5000),
int5001(5001),
int5103(5103),
......@@ -2082,10 +2109,10 @@ module OneM2M_Types {
int5205(5205),
int5206(5206),
int5207(5207),
int5209(5209),
int6003(6003),
int6005(6005),
int6010(6010),
int6011(6011),
int6020(6020),
int6021(6021),
int6022(6022),
......@@ -2117,6 +2144,7 @@ module OneM2M_Types {
type enumerated MemberType
{
int0(0),
int1(1),
int2(2),
int3(3),
......@@ -2140,7 +2168,6 @@ module OneM2M_Types {
int21(21),
int22(22),
int23(23),
int24(24),
int10001(10001),
int10002(10002),
int10003(10003),
......@@ -2150,7 +2177,9 @@ module OneM2M_Types {
int10013(10013),
int10014(10014),
int10016(10016),
int10018(10018)
int10018(10018),
int20001(20001),
int20002(20002)
}
with {
variant "useNumber";
......@@ -2792,14 +2821,13 @@ module OneM2M_Types {
record length(1 .. infinity) of XSD.NCName announcedAttribute,
XSD.ID creator optional,
MemberType memberType,
XSD.PositiveInteger currentNrOfMembers,
XSD.NonNegativeInteger currentNrOfMembers,
XSD.PositiveInteger maxNrOfMembers,
ListOfURIs memberIDs,
record of XSD.AnyURI memberIDs,
ListOfURIs membersAccessControlPolicyIDs optional,
XSD.Boolean memberTypeValidated,
ConsistencyStrategy consistencyStrategy optional,
XSD.String groupName optional,
XSD.AnyURI fanOutPoint,
union {
record length(1 .. infinity) of ChildResourceRef childResource_list,
record length(1 .. infinity) of Subscription subscription_list
......@@ -2810,6 +2838,7 @@ module OneM2M_Types {
variant "element";
variant (resourceName) "attribute";
variant (announcedAttribute) "list";
variant (memberIDs) "list";
//variant (memberTypeValidated) "text 'true' as '1'";
//variant (memberTypeValidated) "text 'false' as '0'";
variant (choice) "untagged";
......@@ -2833,9 +2862,9 @@ module OneM2M_Types {
Timestamp expirationTime,
XSD.AnyURI link,
MemberType memberType optional,
XSD.PositiveInteger currentNrOfMembers optional,
XSD.NonNegativeInteger currentNrOfMembers optional,
XSD.PositiveInteger maxNrOfMembers optional,
ListOfURIs memberIDs optional,
record of XSD.AnyURI memberIDs,
ListOfURIs membersAccessControlPolicyIDs optional,
XSD.Boolean memberTypeValidated optional,
ConsistencyStrategy consistencyStrategy optional,
......@@ -2849,6 +2878,7 @@ module OneM2M_Types {
variant "name as uncapitalized";
variant "element";
variant (resourceName) "attribute";
variant (memberIDs) "list";
//variant (memberTypeValidated) "text 'true' as '1'";
//variant (memberTypeValidated) "text 'false' as '0'";
variant (choice) "untagged";
......@@ -3222,9 +3252,7 @@ module OneM2M_Types {
Timestamp creationTime,
Timestamp lastModifiedTime,
Labels labels optional,
AcpType accessControlPolicyIDs optional,
Timestamp expirationTime,
XSD.AnyURI pollingChannelURI
Timestamp expirationTime
}
with {
variant "name as uncapitalized";
......@@ -3338,11 +3366,18 @@ module OneM2M_Types {
record length(1 .. infinity) of ChildResourceRef childResource_list,
record length(1 .. infinity) of union {
Container container,
ContainerAnnc containerAnnc,
Group group_,
GroupAnnc groupAnnc,
AccessControlPolicy accessControlPolicy,
AccessControlPolicyAnnc accessControlPolicyAnnc,
Subscription subscription,
PollingChannel pollingChannel,
Schedule schedule
Schedule schedule,
NodeAnnc nodeAnnc,
RemoteCSEAnnc remoteCSEAnnc,
AEAnnc aEAnnc,
LocationPolicyAnnc locationPolicyAnnc
} choice_list
} choice optional
}
......@@ -3363,6 +3398,7 @@ module OneM2M_Types {
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";
};
......@@ -3397,7 +3433,9 @@ module OneM2M_Types {
Subscription subscription,
PollingChannel pollingChannel,
ScheduleAnnc scheduleAnnc,
LocationPolicyAnnc locationPolicyAnnc
LocationPolicyAnnc locationPolicyAnnc,
RemoteCSEAnnc remoteCSEAnnc,
AEAnnc aEAnnc
} choice_list
} choice optional
}
......@@ -3415,6 +3453,7 @@ module OneM2M_Types {
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";
};
......@@ -3496,8 +3535,6 @@ module OneM2M_Types {
};
type record ResponsePrimitive
{
ResponseStatusCode responseStatusCode,
......@@ -3543,6 +3580,13 @@ module OneM2M_Types {
};
type XSD.String DebugInfo
with {
variant "name as uncapitalized";
variant "element";
};
type record ResourceWrapper
{
union {
......@@ -3591,7 +3635,7 @@ module OneM2M_Types {
StatsConfig statsConfig,
Subscription subscription
} choice,
ListOfURIs uRIList
XSD.AnyURI uRI
}
with {
variant "name as uncapitalized";
......@@ -3599,13 +3643,13 @@ module OneM2M_Types {
variant (choice.aE) "name as capitalized";
variant (choice.cSEBase) "name as capitalized";
variant (choice.group_) "name as 'group'";
variant (uRIList) "name as capitalized";
variant (uRI) "name as capitalized";
};
type record AggregatedResponse_1
{
record length(1 .. infinity) of ResponsePrimitive responsePrimitive_list
record of ResponsePrimitive responsePrimitive_list
}
with {
variant "name as 'aggregatedResponse'";
......@@ -3996,8 +4040,6 @@ module OneM2M_Types {
variant "name as uncapitalized";
};
/* Additional types */
group optionalResourceTypes {
......@@ -4180,8 +4222,6 @@ group optionalResourceTypes {
XSD.NonNegativeInteger currentByteSize optional,
XSD.AnyURI locationID optional,
XSD.AnyURI ontologyRef optional,
XSD.AnyURI latest optional,
XSD.AnyURI oldest optional,
union {
record length(1 .. infinity) of ChildResourceRef childResource_list,
record length(1 .. infinity) of union {
......@@ -4279,7 +4319,6 @@ group optionalResourceTypes {
XSD.Boolean memberTypeValidated optional,
ConsistencyStrategy consistencyStrategy optional,
XSD.String groupName optional,
XSD.AnyURI fanOutPoint optional,
union {
record length(1 .. infinity) of ChildResourceRef childResource_list,
record length(1 .. infinity) of Subscription subscription_list
......@@ -4308,9 +4347,7 @@ group optionalResourceTypes {
Timestamp creationTime optional,
Timestamp lastModifiedTime optional,
Labels labels optional,
AcpType accessControlPolicyIDs optional,
Timestamp expirationTime optional,
XSD.AnyURI pollingChannelURI optional
Timestamp expirationTime optional
}
with {
variant "name as uncapitalized";
......
/*******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
//
// File: UsefulTtcn3Types.ttcn
// Description:
// References:
// Rev:
// Prodnr:
// Updated:
// Contact: http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
/**
* 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 ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/UsefulTtcn3Types.ttcn $
* $Id: UsefulTtcn3Types.ttcn 120 2016-09-20 14:48:51Z reinaortega $
* @desc Test System module for oneM2M
*
*/
module UsefulTtcn3Types {
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/XSD.ttcn $
* $Id: XSD.ttcn 102 2016-08-30 09:28:49Z reinaortega $
* $Id: XSD.ttcn 120 2016-09-20 14:48:51Z reinaortega $
* @desc Test System module for oneM2M
*
*/
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 105 2016-08-31 13:01:46Z reinaortega $
* $Id: OneM2M_Testcases.ttcn 120 2016-09-20 14:48:51Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
......@@ -3202,15 +3202,14 @@ module OneM2M_Testcases {
// Local variables
var Labels v_labels_1 := {"VALUE_1"};
var Labels v_labels_2 := {"To be deleted"};
var AcpType v_acp := {"ACP_ID"};
var AttributeList_1 v_nullFields;
var template RequestPrimitive v_createRequest := m_createPollingChannelBase;
var template RequestPrimitive v_updateRequest := m_updatePollingChannelBase;
var ResponsePrimitive v_responsePrimitive;
v_createRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_1;//Attribute 3
//No Attribute 1
v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs := v_acp;//Attribute 2
// No Attribute 1
// TODO Find another attribute 2
v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.labels := v_labels_2;//Attribute 3
v_nullFields := {"labels"};
......@@ -3223,9 +3222,8 @@ module OneM2M_Testcases {
//Check attribute 1
//Check attribute 2
if(not match(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs, valueof(v_updateRequest.primitiveContent.any_1[0].PollingChannel_optional.accessControlPolicyIDs))){
setverdict(fail, testcasename() & ": Error: ACPI attribute not added correctly")
}
// TODO Add checking for attribute 2
//Check attribute 3
if(ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.labels)){
setverdict(fail, testcasename() & ": Error: Labels attribute not deleted correctly")
......@@ -4262,7 +4260,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createGroupBase;
v_createRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;
//v_createRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;FIXME
v_createRequest.primitiveContent.any_1[0].Group_optional.resourceType := c_RessourceType1;
......@@ -4331,7 +4329,7 @@ module OneM2M_Testcases {
v_request := valueof(m_retrieveResource(f_getResourceAddress(-2) & "/" & v_resourceId));
v_request.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;
//v_request.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;FIXME
// Test control
......@@ -4395,7 +4393,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
v_updateRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;
//v_updateRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;FIXME
// Test control
......@@ -4464,7 +4462,7 @@ module OneM2M_Testcases {
var template RequestPrimitive v_deleteRequest := m_deleteRequest(c_deleteAddress);
v_deleteRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;
//v_deleteRequest.primitiveContent.any_1[0].Group_optional.fanOutPoint := c_fanoutPointAddress;FIXME
// Test control
......@@ -4855,7 +4853,7 @@ module OneM2M_Testcases {
mcaPort.send(m_request(valueof(v_createRequest)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int6011))) -> value v_response {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int6010))) -> value v_response {//TODO Fix responseStatusCode
tc_ac.stop;
setverdict(pass, testcasename() & ": unsuccessful validation of the resource type during the creation of the group");
}
......
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