Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TST
ATS
Commits
9cfafe9b
Commit
9cfafe9b
authored
Mar 09, 2017
by
Miguel Angel Reina Ortega
Browse files
Compilation errors corrections after REG_testcases merge
Signed-off-by:
reinaortega
<
miguelangel.reinaortega@etsi.org
>
parent
fc9368e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
LibOneM2M/OneM2M_Templates.ttcn
View file @
9cfafe9b
...
...
@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 22
5
2017-03-0
8 15:36:54
Z reinaortega $
* $Id: OneM2M_Templates.ttcn 22
6
2017-03-0
9 08:58:45
Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
...
...
@@ -393,18 +393,50 @@ module OneM2M_Templates {
tokenRequestIndicator
:=
*
}
/**
* @desc Base CREATE request primitive for AE resource (AUX)
*/
template
RequestPrimitive
m_createAEAnnc
(
template
(
omit
)
AcpType
p_accessControlPolicyIds
:=
omit
,
template
(
omit
)
XSD
.
ID
p_to
:=
omit
,
template
(
omit
)
XSD
.
ID
p_from
:=
omit
,
XSD
.
ID
p_appId
,
XSD
.
ID
p_stemId
:=
""
)
:=
{
operation
:=
int1
,
to_
:=
p_to
,
from_
:=
p_from
,
//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
requestIdentifier
:=
testcasename
()
&
"-m_createAEAnnc"
&
f_rnd
(
1
,
1000000
),
resourceType
:=
int10002
,
primitiveContent
:=
{
any_1
:=
{{
AEAnnc_optional
:=
m_contentCreateAEAnnc
({
"Credential-ID:None"
},
p_accessControlPolicyIds
,
p_appId
,
p_to
&
"/"
&
p_stemId
)}}
},
roleIDs
:=
omit
,
originatingTimestamp
:=
omit
,
requestExpirationTimestamp
:=
omit
,
resultExpirationTimestamp
:=
omit
,
operationExecutionTime
:=
omit
,
responseType
:=
omit
,
resultPersistence
:=
omit
,
resultContent
:=
omit
,
eventCategory
:=
omit
,
deliveryAggregation
:=
omit
,
groupRequestIdentifier
:=
omit
,
filterCriteria
:=
omit
,
discoveryResultType
:=
omit
,
tokens
:=
omit
,
tokenIDs
:=
omit
,
localTokenIDs
:=
omit
,
tokenRequestIndicator
:=
omit
};
/**
* @desc Base CREATE request primitive for AE resource (AUX)
*/
//Added by @Naum
template
RequestPrimitive
mw_createAE
a
nnc
(
template
(
omit
)
AcpType
p_accessControlPolicyIds
:=
omit
,
template
(
omit
)
XSD
.
ID
p_to
:=
omit
,
template
(
omit
)
XSD
.
ID
p_from
:=
omit
,
XSD
.
ID
p_appId
,
XSD
.
ID
p_stemId
:=
omit
)
:=
{
template
RequestPrimitive
mw_createAE
A
nnc
(
template
(
omit
)
AcpType
p_accessControlPolicyIds
:=
omit
,
template
(
omit
)
XSD
.
ID
p_to
:=
omit
,
template
(
omit
)
XSD
.
ID
p_from
:=
omit
,
XSD
.
ID
p_appId
,
XSD
.
ID
p_stemId
:=
""
)
:=
{
operation
:=
int1
,
to_
:=
p_to
,
from_
:=
p_from
,
//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
requestIdentifier
:=
?
,
resourceType
:=
int10002
,
primitiveContent
:=
{
any_1
:=
{{
AEAnnc_optional
:=
mw_contentCreateAE
a
nnc
(
"Credential-ID:None"
,
p_accessControlPolicyIds
,
p_appId
,
p_to
&
"/"
&
p_stemId
)}}
any_1
:=
{{
AEAnnc_optional
:=
mw_contentCreateAE
A
nnc
(
{
"Credential-ID:None"
}
,
p_accessControlPolicyIds
,
p_appId
,
p_to
&
"/"
&
p_stemId
)}}
},
roleIDs
:=
*
,
originatingTimestamp
:=
*
,
...
...
@@ -844,8 +876,31 @@ module OneM2M_Templates {
group
ContentCreate
{
template
AEAnnc_optional
m_contentCreateAEAnnc
(
in
template
(
omit
)
Labels
p_labels
,
in
template
(
omit
)
AcpType
p_accessControlPolicyIds
,
XSD
.
ID
p_appId
:=
PX_APP_ID
,
in
template
(
omit
)
XSD
.
AnyURI
p_nodeLink
:=
omit
)
:=
{
resourceName
:=
omit
,
//O TODO
resourceType
:=
omit
,
//NP
resourceID
:=
omit
,
//NP
parentID
:=
omit
,
//NP
creationTime
:=
omit
,
//NP
lastModifiedTime
:=
omit
,
//NP
labels
:=
p_labels
,
//O
accessControlPolicyIDs
:=
p_accessControlPolicyIds
,
//O
expirationTime
:=
omit
,
//O
dynamicAuthorizationConsultationIDs
:=
omit
,
//TODO Check whether it is optional or mandatory for create operation
link
:=
omit
,
//M TODO Put the right value
appName
:=
omit
,
//O
app_ID
:=
p_appId
,
//M
aE_ID
:=
omit
,
//NP
pointOfAccess
:=
omit
,
//{"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
ontologyRef
:=
omit
,
//O
nodeLink
:=
p_nodeLink
,
//NP
requestReachability
:=
true
,
//M
contentSerialization
:=
omit
,
//O
e2eSecInfo
:=
omit
,
//O TODO Check whether it is optional or mandatory for create operation
choice
:=
omit
//NP
};
template
AEAnnc_optional
mw_contentCreateAE
a
nnc
(
in
template
(
omit
)
XSD
.
String
p_labels
,
in
template
(
omit
)
AcpType
p_accessControlPolicyIds
,
XSD
.
ID
p_appId
:=
PX_APP_ID
,
XSD
.
AnyURI
p_nodeLink
:=
omit
)
:=
{
template
AEAnnc_optional
mw_contentCreateAE
A
nnc
(
in
template
(
omit
)
Labels
p_labels
,
in
template
(
omit
)
AcpType
p_accessControlPolicyIds
,
XSD
.
ID
p_appId
:=
PX_APP_ID
,
in
template
(
omit
)
XSD
.
AnyURI
p_nodeLink
:=
omit
)
:=
{
resourceName
:=
*
,
//O
resourceType
:=
omit
,
//NP
resourceID
:=
omit
,
//NP
...
...
@@ -2306,10 +2361,10 @@ module OneM2M_Templates {
* @param p_statusCode Status code
* @param p_requestId Request ID of the corresponding request
*/
template
(
value
)
ResponsePrimitive
m_responsePrimitive
(
in
ResponseStatusCode
p_statusCode
,
in
RequestID
p_requestId
)
:=
{
template
(
value
)
ResponsePrimitive
m_responsePrimitive
(
in
ResponseStatusCode
p_statusCode
,
in
RequestID
p_requestId
,
in
template
(
omit
)
PrimitiveContent
p_content
:=
omit
)
:=
{
responseStatusCode
:=
p_statusCode
,
requestIdentifier
:=
p_requestId
,
primitiveContent
:=
omi
t
,
primitiveContent
:=
p_conten
t
,
to_
:=
omit
,
from_
:=
omit
,
originatingTimestamp
:=
omit
,
...
...
@@ -2404,21 +2459,6 @@ module OneM2M_Templates {
assignedTokenIdentifiers
:=
omit
,
tokenRequestInformation
:=
omit
};
template
ResponsePrimitive
m_responsePrimitiveCreate
(
in
template
PrimitiveContent
p_content
:=
omit
)
:=
{
responseStatusCode
:=
int2001
,
requestIdentifier
:=
testcasename
()
&
"-m_responseNotification"
&
f_rnd
(
1
,
1000000
),,
primitiveContent
:=
p_content
,
to_
:=
omit
,
from_
:=
omit
,
originatingTimestamp
:=
omit
,
resultExpirationTimestamp
:=
omit
,
eventCategory
:=
omit
,
contentStatus
:=
omit
,
contentOffset
:=
omit
,
assignedTokenIdentifiers
:=
omit
,
tokenRequestInformation
:=
omit
};
}
//end group ResponsePrimitives
...
...
OneM2M_Testcases.ttcn
View file @
9cfafe9b
...
...
@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 22
5
2017-03-0
8 15:36:54
Z reinaortega $
* $Id: OneM2M_Testcases.ttcn 22
6
2017-03-0
9 08:58:45
Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
...
...
@@ -308,7 +308,7 @@ module OneM2M_Testcases {
tc_ac
.
start
;
alt
{
[]
mccPort
.
receive
(
mw_request
(
mw_createAE
a
nnc
(
omit
,
omit
,
"APP_ID"
)))
{
[]
mccPort
.
receive
(
mw_request
(
mw_createAE
A
nnc
(
-
,
-
,
-
,
"APP_ID"
,
-
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
testcasename
()
&
": AE creation redirected."
);
}
...
...
@@ -397,7 +397,7 @@ module OneM2M_Testcases {
tc_ac
.
start
;
alt
{
[]
mccPort
.
receive
(
mw_request
(
mw_createAE
a
nnc
(
omit
,
"CSE_ID"
,
"/S"
,
"APP_ID"
,
"S-AE-ID-STEM"
)))
{
[]
mccPort
.
receive
(
mw_request
(
mw_createAE
A
nnc
(
omit
,
"CSE_ID"
,
"/S"
,
"APP_ID"
,
"S-AE-ID-STEM"
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
testcasename
()
&
": AE creation redirected."
);
}
...
...
@@ -433,7 +433,7 @@ module OneM2M_Testcases {
f_cse_postamble_deleteResources
();
//to deregister the AE, I don't know if it's correct like this?
//Test Body
v_request
:=
valueof
(
m
w
_createAE
a
nnc
(
omit
,
"CSE_ID"
,
"/S"
,
"APP_ID"
,
"S-AE-ID-STEM"
));
v_request
:=
valueof
(
m_createAE
A
nnc
(
-
,
"CSE_ID"
,
"/S"
,
"APP_ID"
,
"S-AE-ID-STEM"
));
//TODO to double check all parameters
v_request
:=
f_getUpdateRequestPrimitive
(
v_resourceType
,
v_cseBaseIndex
,
v_request
);
...
...
@@ -477,9 +477,9 @@ module OneM2M_Testcases {
v_cseBaseIndex
:=
f_cse_preamble_createServiceSubscribedAppRule
({
"S"
});
//c_CRUDNDi);
//Test Body
v_request
:=
valueof
(
m_responsePrimitive
Create
(
{
any_1
:=
{{
AEAnnc_optional
:=
m
w
_contentCreateAE
a
nnc
(
"Credential-ID:None"
,
omit
,
PX_APP_ID
,
"/CSE_ID/S-AE-ID-STEM"
)}}}));
v_request
:=
valueof
(
m_responsePrimitive
(
int2001
,
"To_be_defined"
,
{
any_1
:=
{{
AEAnnc_optional
:=
m_contentCreateAE
A
nnc
(
{
"Credential-ID:None"
}
,
omit
,
PX_APP_ID
,
"/CSE_ID/S-AE-ID-STEM"
)}}}));
mccPort
.
send
(
m_re
quest
(
v_request
));
mccPort
.
send
(
m_re
sponse
(
v_request
));
tc_ac
.
start
;
alt
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment