Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ATS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TST
ATS
Commits
e75ee72f
Commit
e75ee72f
authored
5 years ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#68
Signed-off-by:
reinaortega
<
miguelangel.reinaortega@etsi.org
>
parent
95d81d07
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
OneM2M_PermutationFunctions.ttcn
+61
-42
61 additions, 42 deletions
OneM2M_PermutationFunctions.ttcn
with
61 additions
and
42 deletions
OneM2M_PermutationFunctions.ttcn
+
61
−
42
View file @
e75ee72f
...
@@ -925,10 +925,11 @@ module OneM2M_PermutationFunctions {
...
@@ -925,10 +925,11 @@ module OneM2M_PermutationFunctions {
// Local variables
// Local variables
var
RequestPrimitive
v_request
;
var
RequestPrimitive
v_request
;
var
RequestPrimitive
v_groupRequest
:=
m_createGroupBase
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_groupIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
...
@@ -943,22 +944,26 @@ module OneM2M_PermutationFunctions {
...
@@ -943,22 +944,26 @@ module OneM2M_PermutationFunctions {
// Preamble
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
v_groupRequest
.
primitiveContent
.
group_
.
memberIDs
:=
{
f_getResourceId
(
vc_resourcesList
[
v_resourceIndex
].
resource
)};
v_groupIndex
:=
f_cse_createResource
(
int9
,
v_groupRequest
,
v_aeIndex
);
// Test Body
// Test Body
v_request
:=
f_getCreateRequestPrimitive
(
int3
,
m_createContainerBase
,
v_aeIndex
);
//Force usage of Hybrid Hierarchical addressing method
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod
:=
e_hybrid
;
v_addressingMethod
:=
e_nonHierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
v_request
.
to_
:=
f_getResourceAddress
(
v_groupIndex
,
v_addressingMethod
,
p_primitiveScope
);
v_request
:=
f_getCreateRequestPrimitive
(
int3
,
m_createContainerBase
,
v_resourceIndex
);
v_request
.
to_
:=
v_request
.
to_
&
"/fopt"
;
v_request
.
to_
:=
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
);
f_send
(
e_mca_port
,
m_request
(
v_request
));
f_send
(
e_mca_port
,
m_request
(
v_request
));
tc_ac
.
start
;
tc_ac
.
start
;
alt
{
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int200
1
)))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int200
0
)))
->
value
vc_response
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
":
Container resource created using hierarchical
addressing
method
"
);
setverdict
(
pass
,
__SCOPE__
&
":
Fanout operation performed successfully by using hybrid
addressing"
);
}
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
...
@@ -1161,9 +1166,11 @@ module OneM2M_PermutationFunctions {
...
@@ -1161,9 +1166,11 @@ module OneM2M_PermutationFunctions {
// Local variables
// Local variables
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_groupIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
var
RequestPrimitive
v_request
;
var
RequestPrimitive
v_groupRequest
:=
m_createGroupBase
;
// Test control
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
...
@@ -1181,17 +1188,22 @@ module OneM2M_PermutationFunctions {
...
@@ -1181,17 +1188,22 @@ module OneM2M_PermutationFunctions {
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
v_groupRequest
.
primitiveContent
.
group_
.
memberIDs
:=
{
f_getResourceId
(
vc_resourcesList
[
v_resourceIndex
].
resource
)};
v_groupIndex
:=
f_cse_createResource
(
int9
,
v_groupRequest
,
v_aeIndex
);
// Test Body
// Test Body
//Force usage of Hybrid Hierarchical addressing method
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod
:=
e_hybrid
;
v_addressingMethod
:=
e_nonHierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
v_request
:=
m_retrieve
(
f_getResourceAddress
(
v_groupIndex
,
v_addressingMethod
,
p_primitiveScope
),
f_getOriginator
(
v_groupIndex
));
v_request
.
to_
:=
v_request
.
to_
&
"/fopt"
;
f_send
(
e_mca_port
,
m_request
(
m_retrieve
(
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
),
f_getOriginator
(
v_resourceIndex
))));
f_send
(
e_mca_port
,
m_request
(
v_request
));
tc_ac
.
start
;
tc_ac
.
start
;
alt
{
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2000
)))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2000
)))
->
value
vc_response
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
":
Container resource retrieved
using hybrid addressing
method
"
);
setverdict
(
pass
,
__SCOPE__
&
":
Fanout operation performed successfully by
using hybrid addressing"
);
}
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
...
@@ -1199,10 +1211,10 @@ module OneM2M_PermutationFunctions {
...
@@ -1199,10 +1211,10 @@ module OneM2M_PermutationFunctions {
}
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while ret
riev
ing container resource using h
ybrid
addressing method"
);
setverdict
(
fail
,
__SCOPE__
&
": Error while
c
re
a
ting container resource using h
ierarchical
addressing method"
);
}
}
[]
tc_ac
.
timeout
{
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while ret
riev
ing resource"
);
setverdict
(
fail
,
__SCOPE__
&
": No answer while
c
re
a
ting resource"
);
}
}
}
}
...
@@ -1211,7 +1223,7 @@ module OneM2M_PermutationFunctions {
...
@@ -1211,7 +1223,7 @@ module OneM2M_PermutationFunctions {
// Tear down
// Tear down
f_cf01Down
();
f_cf01Down
();
}
//end f_CSE_GEN_RET_004
}
//end f_CSE_GEN_RET_004
}
// end of group Retrieve
}
// end of group Retrieve
...
@@ -1410,11 +1422,12 @@ module OneM2M_PermutationFunctions {
...
@@ -1410,11 +1422,12 @@ module OneM2M_PermutationFunctions {
function
f_CSE_GEN_UPD_004
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
system
CseSystem
{
function
f_CSE_GEN_UPD_004
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
system
CseSystem
{
// Local variables
// Local variables
var
RequestPrimitive
v_groupRequest
:=
m_createGroupBase
;
var
RequestPrimitive
v_updateRequest
:=
valueof
(
m_updateContainerBase
);
var
RequestPrimitive
v_updateRequest
:=
valueof
(
m_updateContainerBase
);
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_groupIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
...
@@ -1432,22 +1445,24 @@ module OneM2M_PermutationFunctions {
...
@@ -1432,22 +1445,24 @@ module OneM2M_PermutationFunctions {
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
v_groupRequest
.
primitiveContent
.
group_
.
memberIDs
:=
{
f_getResourceId
(
vc_resourcesList
[
v_resourceIndex
].
resource
)};
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod
:=
e_hybrid
;
v_primitiveScope
:=
p_primitiveScope
;
v_groupIndex
:=
f_cse_createResource
(
int9
,
v_groupRequest
,
v_aeIndex
);
// Test Body
v_updateRequest
:=
f_getUpdateRequestPrimitive
(
int9
,
v_groupIndex
,
v_updateRequest
);
v_updateRequest
.
primitiveContent
.
container
.
labels
:=
{
"MyLabel"
};
v_updateRequest
.
primitiveContent
.
container
.
labels
:=
{
"MyLabel"
};
//Force usage of Hybrid Hierarchical addressing method
v_updateRequest
:=
f_getUpdateRequestPrimitive
(
int3
,
v_resourceIndex
,
v_updateRequest
);
v_addressingMethod
:=
e_nonHierarchical
;
v_updateRequest
.
to_
:=
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
);
v_updateRequest
.
to_
:=
f_getResourceAddress
(
v_groupIndex
,
v_addressingMethod
,
p_primitiveScope
);
v_updateRequest
.
to_
:=
v_updateRequest
.
to_
&
"/fopt"
;
f_send
(
e_mca_port
,
m_request
(
v_updateRequest
));
f_send
(
e_mca_port
,
m_request
(
v_updateRequest
));
tc_ac
.
start
;
tc_ac
.
start
;
alt
{
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int200
4
)))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int200
0
)))
->
value
vc_response
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
":
Container resource updated using hierarchical
addressing
method
"
);
setverdict
(
pass
,
__SCOPE__
&
":
Fanout operation performed successfully by using hybrid
addressing"
);
}
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
...
@@ -1455,10 +1470,10 @@ module OneM2M_PermutationFunctions {
...
@@ -1455,10 +1470,10 @@ module OneM2M_PermutationFunctions {
}
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while
upd
ating container resource using hierarchical addressing method"
);
setverdict
(
fail
,
__SCOPE__
&
": Error while
cre
ating container resource using hierarchical addressing method"
);
}
}
[]
tc_ac
.
timeout
{
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while
upd
ating resource"
);
setverdict
(
fail
,
__SCOPE__
&
": No answer while
cre
ating resource"
);
}
}
}
}
...
@@ -1467,7 +1482,7 @@ module OneM2M_PermutationFunctions {
...
@@ -1467,7 +1482,7 @@ module OneM2M_PermutationFunctions {
// Tear down
// Tear down
f_cf01Down
();
f_cf01Down
();
}
//end f_CSE_GEN_UPD_004
}
//end f_CSE_GEN_UPD_004
}
// end of group Update
}
// end of group Update
...
@@ -1658,10 +1673,11 @@ module OneM2M_PermutationFunctions {
...
@@ -1658,10 +1673,11 @@ module OneM2M_PermutationFunctions {
// Local variables
// Local variables
var
RequestPrimitive
v_request
;
var
RequestPrimitive
v_request
;
var
RequestPrimitive
v_groupRequest
:=
m_createGroupBase
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_groupIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
...
@@ -1679,19 +1695,22 @@ module OneM2M_PermutationFunctions {
...
@@ -1679,19 +1695,22 @@ module OneM2M_PermutationFunctions {
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
v_groupRequest
.
primitiveContent
.
group_
.
memberIDs
:=
{
f_getResourceId
(
vc_resourcesList
[
v_resourceIndex
].
resource
)};
v_groupIndex
:=
f_cse_createResource
(
int9
,
v_groupRequest
,
v_aeIndex
);
// Test Body
// Test Body
//Force usage of Hybrid Hierarchical addressing method
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod
:=
e_hybrid
;
v_addressingMethod
:=
e_nonHierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
v_request
:=
valueof
(
m_delete
(
f_getResourceAddress
(
v_groupIndex
,
v_addressingMethod
,
p_primitiveScope
),
f_getOriginator
(
v_resourceIndex
)));
v_request
.
to_
:=
v_request
.
to_
&
"/fopt"
;
v_request
:=
valueof
(
m_delete
(
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
),
f_getOriginator
(
v_resourceIndex
)));
f_send
(
e_mca_port
,
m_request
(
v_request
));
f_send
(
e_mca_port
,
m_request
(
v_request
));
tc_ac
.
start
;
tc_ac
.
start
;
alt
{
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int200
2
)))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int200
0
)))
->
value
vc_response
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
":
Container resource deleted using hierarchical
addressing
method
"
);
setverdict
(
pass
,
__SCOPE__
&
":
Fanout operation performed successfully by using hybrid
addressing"
);
}
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
...
@@ -1699,10 +1718,10 @@ module OneM2M_PermutationFunctions {
...
@@ -1699,10 +1718,10 @@ module OneM2M_PermutationFunctions {
}
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while
dele
ting container resource using hierarchical addressing method"
);
setverdict
(
fail
,
__SCOPE__
&
": Error while
crea
ting container resource using hierarchical addressing method"
);
}
}
[]
tc_ac
.
timeout
{
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while
dele
ting resource"
);
setverdict
(
fail
,
__SCOPE__
&
": No answer while
crea
ting resource"
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment