Commit 0c1068e1 authored by Federico Sismondi's avatar Federico Sismondi

added test cmd on CLI for sending TAT analysis request for 6LoWPAN test case

parent 42531be1
......@@ -80,5 +80,35 @@ PCAP_COAP_TC4_OVER_TUN_INTERFACE_base64 = "1MOyoQIABAAAAAAAAAAAAMgAAAAAAAAA+pK2W
"AAAAAAAAABFjOPSwAMfvlghANgApO2Wf6ZAQA9AAAAPQAAAAAAAB5gDDiOABERQLu7AAAAAAAA" \
"AAAAAAAAAAG7uwAAAAAAAAAAAAAAAAACwtcWMwAR3stAAQKStHRlc3Q="
PCAP_ONEM2M_TD_M2M_NH_01_FAIL = "1MOyoQIABAAAAAAAAAAAAMgAAABlAAAA/jUkWqGgAABSAAAAUgAAAGAKN4UAKhFAu7sAAAAAAAAAAAAAAAAAAru7AAAAAAAAAAAAAAAAAAHMoRYzACpJckQB9YsBNhTVsX4GaW4tY3NlETJRMtviYWRtaW46YWRtaW7+NSRaxwsCAMgAAACTAQAAYAwxYAFrEUC7uwAAAAAAAAAAAAAAAAABu7sAAAAAAAAAAAAAAAAAAhYzzKEBa94yZEX1iwE2FNXBMtLwB9D/ewogICAibTJtOmNiIiA6IHsKICAgICAgInJuIiA6ICJpbi1uYW1lIiwKICAgICAgInR5IiA6IDUsCiAgICAgICJyaSIgOiAiL2luLWNzZSIsCiAgICAgICJjdCIgOiAiMjAxNzEyMDNUMTczNTA0IiwKICAgICAgImx0IiA6ICIyMDE3MTIwM1Q="
PCAP_ONEM2M_TD_M2M_NH_01_PASS = "1MOyoQIABAAAAAAAAAAAAMgAAABlAAAA1VskWu05BABZAAAAWQAAAGANsjEAMRFAu7sAAAAAAAAAAAAAAAAAAbu7AAAAAAAAAAAAAAAAAAKiSBYzADGFs0QBTnZKvq7SsX4GaW4tY3NlETJRMtviYWRtaW46YWRtaW4WMTAwNjg11VskWgYbBQDIAAAAmgEAAGACBPsBchFAu7sAAAAAAAAAAAAAAAAAAru7AAAAAAAAAAAAAAAAAAEWM6JIAXLWT2RFTnZKvq7SwTLW6DEwMDY4NYIH0P97CiAgICJtMm06Y2IiIDogewogICAgICAicm4iIDogImluLW5hbWUiLAogICAgICAidHkiIDogNSwKICAgICAgInJpIiA6ICIvaW4tY3NlIiwKICAgICAgImN0IiA6ICIyMDE3MTIwM1QxNzM1MDQiLAogICAgICAibHQiIDogIjIw"
\ No newline at end of file
PCAP_ONEM2M_TD_M2M_NH_01_FAIL = "1MOyoQIABAAAAAAAAAAAAMgAAABlAAAA/jUkWqGgAABSAAAAUgAAAGAKN4UAKhFAu7sAAAAAAAAAAAAAAAAA" \
"Aru7AAAAAAAAAAAAAAAAAAHMoRYzACpJckQB9YsBNhTVsX4GaW4tY3NlETJRMtviYWRtaW46YWRtaW7+NSRa" \
"xwsCAMgAAACTAQAAYAwxYAFrEUC7uwAAAAAAAAAAAAAAAAABu7sAAAAAAAAAAAAAAAAAAhYzzKEBa94yZEX1" \
"iwE2FNXBMtLwB9D/ewogICAibTJtOmNiIiA6IHsKICAgICAgInJuIiA6ICJpbi1uYW1lIiwKICAgICAgInR5" \
"IiA6IDUsCiAgICAgICJyaSIgOiAiL2luLWNzZSIsCiAgICAgICJjdCIgOiAiMjAxNzEyMDNUMTczNTA0IiwK" \
"ICAgICAgImx0IiA6ICIyMDE3MTIwM1Q="
PCAP_ONEM2M_TD_M2M_NH_01_PASS = "1MOyoQIABAAAAAAAAAAAAMgAAABlAAAA1VskWu05BABZAAAAWQAAAGANsjEAMRFAu7sAAAAAAAAAAAAAAAAA" \
"Abu7AAAAAAAAAAAAAAAAAAKiSBYzADGFs0QBTnZKvq7SsX4GaW4tY3NlETJRMtviYWRtaW46YWRtaW4WMTAw" \
"Njg11VskWgYbBQDIAAAAmgEAAGACBPsBchFAu7sAAAAAAAAAAAAAAAAAAru7AAAAAAAAAAAAAAAAAAEWM6JI" \
"AXLWT2RFTnZKvq7SwTLW6DEwMDY4NYIH0P97CiAgICJtMm06Y2IiIDogewogICAgICAicm4iIDogImluLW5h" \
"bWUiLAogICAgICAid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iOJeFr/GAoAQAAAAEAAAABBzDMjALv/wBru/8AYqv/AGu7/wBh7MzqHA" \
"KmNAAAAAP6AAAAAAAAAGsD/7hrA/7sBAhjA/+4awP+qAAAAAAAAI4l4WnWbCgAwAAAAMAAAAEHMySMAqv/AGu7/" \
"wBi7/8Aa7v/AGHszOogAHLnAAAAA/oAAAAAAAAAawP/uGsD/uw=="
# import base64
# with open('tmp/TD_6LoWPAN_FORMAT_HC_01.pcap', "rb") as file:
# enc = base64.b64encode(file.read())
# print(enc)
......@@ -567,7 +567,15 @@ def enter_debug_context():
message = MsgSessionConfiguration(**SIXLOWPAN_TT_CONFIGURATION) # builds a config message
publish_message(message)
@cli.command()
def _test_tat_analyze_6lowpan():
"""
Send example 6lowpan tat analysis request
"""
_echo_input("Executing debug message %s" % sys._getframe().f_code.co_name)
from message_examples import SIXLOWPAN_TAT_ANALYZE
message = MsgInteropTestCaseAnalyze(**SIXLOWPAN_TAT_ANALYZE)
publish_message(message)
@cli.command()
def _configure_coap_tt():
......
from examples_pcap_base64 import PCAP_6LOWPAN_FORMAT_HC_01
SIXLOWPAN_TAT_ANALYZE = {
'protocol': '6lowpan',
'testcase_id': 'TD_6LOWPAN_FORMAT_HC_01',
'file_enc': 'pcap_base64',
'filename': 'TD_6LOWPAN_FORMAT_HC_01.pcap',
'value': PCAP_6LOWPAN_FORMAT_HC_01,
}
SIXLOWPAN_TT_CONFIGURATION = {
"users": [
"u1",
......
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