Commit 81cfa215 authored by Yann Garcia's avatar Yann Garcia
Browse files

Validation of AtsMec_FederationEnablement (continue)

parent 14526c1f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -38,8 +38,9 @@ The ETSI MEC protocols project builds and tests regularly on the following platf
  - Linux (Ubuntu)
  - Windows ([Cygwin x64](https://cygwin.com/install.html), [Npcap SDK x64](https://nmap.org/npcap/#download) and [OpenSSL-Windows x64](https://www.openssl.org) are required)

Note: The [OpenSSL](https://www.openssl.org) version >= 1.1.1 is also required.

Note: 
- The [OpenSSL](https://www.openssl.org) version >= 1.1.1 is also required.
- The version 11.x.y and more of Ericsson TITAN is required. 

## Installation

+9 −1
Original line number Diff line number Diff line
@@ -20,6 +20,10 @@ int json_codec_mec040::encode (const LibHttp__JsonMessageBodyTypes::JsonBody& ms
    const FederationEnablementAPI__TypesAndValues::SystemInfo& system_info = msg.systemInfo();
    system_info.encode(FederationEnablementAPI__TypesAndValues::SystemInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = /*char2oct(CHARSTRING("{\"SystemInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
  } else if (msg.ischosen(LibHttp__JsonMessageBodyTypes::JsonBody::ALT_systemInfoUpdate)) {
    const FederationEnablementAPI__TypesAndValues::SystemInfoUpdate& system_info_update = msg.systemInfoUpdate();
    system_info_update.encode(FederationEnablementAPI__TypesAndValues::SystemInfoUpdate_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = /*char2oct(CHARSTRING("{\"SystemInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/;
  } else {
    return json_codec::encode(msg, data);
  }
@@ -61,7 +65,7 @@ int json_codec_mec040::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo
  loggers::get_instance().log("json_codec_mec040::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str());
  TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));

  if (it->second.find("\"systemId\"") != std::string::npos) { // Be careful to the order
  if ((it->second.find("\"systemId\"") != std::string::npos) && (it->second.find("\"endPoint\"") == std::string::npos)) { // Be careful to the order
    if (it->second[0] == '[') {
      FederationEnablementAPI__TypesAndValues::SystemInfoList system_info_list;
      system_info_list.decode(FederationEnablementAPI__TypesAndValues::SystemInfoList_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
@@ -71,6 +75,10 @@ int json_codec_mec040::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo
      system_info.decode(FederationEnablementAPI__TypesAndValues::SystemInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
      msg.systemInfo() = system_info;
    }
  } else if (it->second.find("\"endPoint\"") != std::string::npos) {
    FederationEnablementAPI__TypesAndValues::SystemInfoUpdate system_info_update;
    system_info_update.decode(FederationEnablementAPI__TypesAndValues::SystemInfoUpdate_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.systemInfoUpdate() = system_info_update;
  } else {
    return json_codec::decode(p_data, msg, p_params);
  }
+39 −7
Original line number Diff line number Diff line
@@ -8,14 +8,17 @@ LibCommon_Time.PX_TAC := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;

LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.39"
LibHttp_Pics.PICS_HEADER_HOST := "192.168.1.21" #"192.168.1.39"

LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibHttp_Pics.PICS_USE_TOKEN_HEADER    := true
#LibHttp_Pics.PICS_TOKEN_HEADER        := "Basic WrongToken"

# LibMec_Pixits
LibMec_Pics.PICS_ROOT_API             := "/sbxykqjr17/mep1/" # Need to sign in on https://mec-platform.etsi.org/, section 'Try-it from your MEC application'

# LibMec/FederationEnablementAPI
FederationEnablementAPI_Pixits.PX_FED_SUB_CALLBACK_URI         := "http://clientApp.example.com/location_notifications/123456";

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
@@ -33,8 +36,7 @@ LogEventTypes:= Yes

[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
system.httpPort.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1,server=192.168.1.12,port=30030,use_ssl=0)"
#system.httpPort.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)"
system.httpPort.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1,server=mec-platform.etsi.org,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)"
system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)"

[DEFINE]
@@ -72,10 +74,8 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_04
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_05
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - SystemName query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_05
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Multiple SystemName query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_06
AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_06
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - Empty SystemName query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_OK_07
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator - systemProvider query parameters
@@ -93,7 +93,39 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec040)/TCP(debug=1
# Check that the IUT responds with an error when selection is not applicable - SystemProvider
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_NF_03
# Check that the IUT responds with an error when request is malformed
AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_BR
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_001_BR


# Check that the IUT creates a new systemInfo when requested by a MEC Orchestrator
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_002_OK
# Check that the IUT responds with an error on creating an existing systemInfo
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_002_BR
# Check that the IUT responds with a selection of all available systemInfo when requested by a MEC Orchestrator
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_003_OK
# Check that the IUT responds with an error when it receives a request for returning a systemInfo referred with a wrong systemId
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_003_NF
# Check that the IUT responds with an error when it receives a request with an inconsistant URI
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_003_BR
# Check that the IUT updates the systemInfo when requested by a MEC Orchestrator
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_OK_01
# Check that the IUT updates the systemInfo when requested by a MEC Orchestrator
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_OK_02
# Check that the IUT updates the systemInfo when requested by a MEC Orchestrator
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_OK_03
# Check that the IUT responds with an error when requested to update an unknown systemInfo
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_NF
# Check that the IUT responds with an error when requested to update with no data provided
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_004_BR
# Check that the IUT deletes the systemInfo when requested by a MEC Orchestrator
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_005_OK
# Check that the IUT responds with an error when requested to delete an unknown systemInfo
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_005_NF
# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters
#AtsMec_FederationEnablementAPI_TestCases.TC_MEC_MEC040_SRV_MEF_006_OK_01







+3 −3
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign in o
SensorsSharingService_Pixits.PX_SENS_SUB_CALLBACK_URI        := "http://yanngarcia.ddns.net/sens/v1/notif"
SensorsSharingService_Pixits.PX_SENS_DISCOVERY_TYPE          := ""
SensorsSharingService_Pixits.PX_SENS_DISCOVERY_PROPERTY_LIST := "SAREF" # Could be [], string or [string1 string2]
SensorsSharingService_Pixits.PX_SENSOR_IDENTIFIER            := "CNT"
SensorsSharingService_Pixits.PX_SENSOR_IDENTIFIER            := "cnt8WkyGNcEDV"

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
@@ -96,9 +96,9 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec046)/TCP(debug=1
# Check that the IUT responds with an error when the IUT does not have sensor(s)
#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_002_NF
# Check that the IUT responds with the list of SensorData when queried by a MEC Application
#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_003_OK
AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_003_OK
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_003_BR
#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_003_BR
# Check that the IUT responds with an error when the IUT does not have sensor(s)
#AtsMec_SensorsSharingService_TestCases.TC_MEC_MEC046_SRV_SENSLOOKUP_003_NF
# Check that the IUT responds with the list of subscriptions when queried by a MEC Application - No query parameters
+3 −0
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@
		},
		{
			"path": "../mec.pipeline-scripts"
		},
		{
			"path": "../../frameworks/titan/titan.core"
		}
	],
	"settings": {
Loading