Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
f-interop-contributors
utils
Commits
9b2878ea
Commit
9b2878ea
authored
Sep 18, 2017
by
Federico Sismondi
Browse files
pixit information should be provided in the MsgConfigurationExecuted
message
parent
9ab34d3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
messages.py
View file @
9b2878ea
...
...
@@ -27,7 +27,7 @@ Usage:
>>> from messages import * # doctest: +SKIP
>>> m = MsgTestCaseSkip()
>>> m
MsgTestCaseSkip(_api_version = 0.1.4
1
, _type = testcoordination.testcase.skip, node = someNode, testcase_id = TD_COAP_CORE_02_v01, )
MsgTestCaseSkip(_api_version = 0.1.4
2
, _type = testcoordination.testcase.skip, node = someNode, testcase_id = TD_COAP_CORE_02_v01, )
>>> m.routing_key
'control.testcoordination'
>>> m.message_id # doctest: +SKIP
...
...
@@ -38,18 +38,18 @@ MsgTestCaseSkip(_api_version = 0.1.41, _type = testcoordination.testcase.skip, n
# also we can modify some of the fields (rewrite the default ones)
>>> m = MsgTestCaseSkip(testcase_id = 'TD_COAP_CORE_03_v01')
>>> m
MsgTestCaseSkip(_api_version = 0.1.4
1
, _type = testcoordination.testcase.skip, node = someNode, testcase_id = TD_COAP_CORE_03_v01, )
MsgTestCaseSkip(_api_version = 0.1.4
2
, _type = testcoordination.testcase.skip, node = someNode, testcase_id = TD_COAP_CORE_03_v01, )
>>> m.testcase_id
'TD_COAP_CORE_03_v01'
# and even export the message in json format (for example for sending the message though the amqp event bus)
>>> m.to_json()
'{"_api_version": "0.1.4
1
", "_type": "testcoordination.testcase.skip", "node": "someNode", "testcase_id": "TD_COAP_CORE_03_v01"}'
'{"_api_version": "0.1.4
2
", "_type": "testcoordination.testcase.skip", "node": "someNode", "testcase_id": "TD_COAP_CORE_03_v01"}'
# We can use the Message class to import json into Message objects:
>>> m=MsgTestSuiteStart()
>>> m.to_json()
'{"_api_version": "0.1.4
1
", "_type": "testcoordination.testsuite.start", "description": "Event test suite START"}'
'{"_api_version": "0.1.4
2
", "_type": "testcoordination.testsuite.start", "description": "Event test suite START"}'
>>> json_message = m.to_json()
>>> obj=Message.from_json(json_message)
>>> type(obj)
...
...
@@ -62,7 +62,7 @@ MsgTestCaseSkip(_api_version = 0.1.41, _type = testcoordination.testcase.skip, n
# the error reply (note that we pass the message of the request to build the reply):
>>> err = MsgErrorReply(m)
>>> err
MsgErrorReply(_api_version = 0.1.4
1
, _type = sniffing.start, error_code = Some error code TBD, error_message = Some error message TBD, ok = False, )
MsgErrorReply(_api_version = 0.1.4
2
, _type = sniffing.start, error_code = Some error code TBD, error_message = Some error message TBD, ok = False, )
>>> m.reply_to
'control.sniffing.service.reply'
>>> err.routing_key
...
...
@@ -80,7 +80,7 @@ import time
import
json
import
uuid
API_VERSION
=
'0.1.4
1
'
API_VERSION
=
'0.1.4
2
'
# TODO use metaclasses instead?
...
...
@@ -563,6 +563,7 @@ class MsgTestingToolConfigured(Message):
}
class
MsgSessionCreated
(
Message
):
"""
Requirements: Session Orchestrator MUST publish message on common-services channel (on every session creation)
...
...
@@ -804,13 +805,15 @@ class MsgConfigurationExecuted(Message):
Description:
- Message used for indicating that the IUT has been configured as requested
- pixit must be included in this message (pixit = Protocol Implementaiton eXtra Information for Testing)
"""
routing_key
=
"control.testcoordination"
_msg_data_template
=
{
"_type"
:
"testcoordination.configuration.executed"
,
"description"
:
"Event IUT has been configured"
,
"node"
:
"coap_server"
"node"
:
"coap_server"
,
"ipv6_address"
:
"bbbb::1"
# example of pixit
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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