Commits (2)
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.
# IUT roles
LibCommon_Time.PX_TAC := 30.0
#LibCommon_Time.PX_TWAIT := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;
LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"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_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application'
# LibMec_Pixits
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).
LogFile := "../logs/AtsMec/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
#TimeStampFormat := DateTime
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.39,port=30030,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)"
#system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)"
system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)"
[DEFINE]
# In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE].
[INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.
[ORDERED_INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.
[EXTERNAL_COMMANDS]
# This section can define external commands (shell scripts) to be executed by the ETS
# whenever a control part or test case is started or terminated.
#BeginTestCase := ""
#EndTestCase := ""
#BeginControlPart := ""
#EndControlPart := ""
[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsMec_TestControl.control
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.
[COMPONENTS]
# This section consists of rules restricting the location of created PTCs.
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.
# IUT roles
LibCommon_Time.PX_TAC := 30.0
#LibCommon_Time.PX_TWAIT := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;
LibHttp_Pics.PICS_HEADER_HOST := "try-mec.etsi.org" #"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_Pics.PICS_ROOT_API := "/sbx1y8q0x9/mep1" # Need to sign in on https://try-mec.etsi.org/, section 'Try-it from your MEC application'
# LibMec_Pixits
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).
LogFile := "../logs/AtsMec/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
#TimeStampFormat := DateTime
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.1.39,port=30030,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=try-mec.etsi.org,port=443,use_ssl=1)"
#system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1)"
system.httpPort_notif.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server_mode=1,local_port=80,use_ssl=0)"
[DEFINE]
# In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE].
[INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.
[ORDERED_INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.
[EXTERNAL_COMMANDS]
# This section can define external commands (shell scripts) to be executed by the ETS
# whenever a control part or test case is started or terminated.
#BeginTestCase := ""
#EndTestCase := ""
#BeginControlPart := ""
#EndControlPart := ""
[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsMec_TestControl.control
[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.
[COMPONENTS]
# This section consists of rules restricting the location of created PTCs.
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
......@@ -12,10 +12,34 @@ module AtsMec_TrafficManagementAPI_TestControl {
control {
if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) {
execute(TC_MEC_MEC015_SRV_TM_001_OK());
execute(TC_MEC_MEC015_SRV_TM_001_OK_01());
execute(TC_MEC_MEC015_SRV_TM_001_OK_02());
execute(TC_MEC_MEC015_SRV_TM_001_OK_03());
execute(TC_MEC_MEC015_SRV_TM_001_OK_04());
execute(TC_MEC_MEC015_SRV_TM_001_BR());
execute(TC_MEC_MEC015_SRV_TM_001_NF_01());
execute(TC_MEC_MEC015_SRV_TM_001_NF_02());
execute(TC_MEC_MEC015_SRV_TM_001_NF_03());
execute(TC_MEC_MEC015_SRV_TM_002_OK());
execute(TC_MEC_MEC015_SRV_TM_002_BR());
execute(TC_MEC_MEC015_SRV_TM_002_NF());
execute(TC_MEC_MEC015_SRV_TM_002_BR_01());
execute(TC_MEC_MEC015_SRV_TM_002_BR_02());
execute(TC_MEC_MEC015_SRV_TM_003_OK());
execute(TC_MEC_MEC015_SRV_TM_003_NF());
execute(TC_MEC_MEC015_SRV_TM_004_OK());
execute(TC_MEC_MEC015_SRV_TM_004_BR_01());
execute(TC_MEC_MEC015_SRV_TM_004_BR_02());
execute(TC_MEC_MEC015_SRV_TM_004_NF());
execute(TC_MEC_MEC015_SRV_TM_005_OK());
execute(TC_MEC_MEC015_SRV_TM_005_BR_01());
execute(TC_MEC_MEC015_SRV_TM_005_BR_02());
execute(TC_MEC_MEC015_SRV_TM_005_NF());
execute(TC_MEC_MEC015_SRV_TM_006_OK());
execute(TC_MEC_MEC015_SRV_TM_006_NF());
}
} // End of 'control' statement
......
......@@ -40,6 +40,20 @@ module AtsMec_WlanInformationAPI_TestControl {
execute(TC_MEC_MEC028_SRV_WAI_010_NF());
execute(TC_MEC_MEC028_SRV_WAI_011_OK());
execute(TC_MEC_MEC028_SRV_WAI_012_OK());
execute(TC_MEC_MEC028_SRV_WAI_013_OK());
execute(TC_MEC_MEC028_SRV_WAI_013_BR());
execute(TC_MEC_MEC028_SRV_WAI_014_OK());
execute(TC_MEC_MEC028_SRV_WAI_014_NF());
execute(TC_MEC_MEC028_SRV_WAI_015_OK());
execute(TC_MEC_MEC028_SRV_WAI_015_NF());
execute(TC_MEC_MEC028_SRV_WAI_016_OK());
execute(TC_MEC_MEC028_SRV_WAI_016_NF());
}
} // End of 'control' statement
......
......@@ -40,7 +40,7 @@ module TrafficManagementAPI_Functions {
httpPort.send(
m_http_request(
m_http_request_post(
PX_ME_BWM_URI,
PICS_ROOT_API & PX_ME_BWM_URI,
v_headers,
m_http_message_body_json(
m_body_json_bw_info(
......@@ -60,16 +60,18 @@ module TrafficManagementAPI_Functions {
mw_bw_info(
p_app_instance_id
)))))) -> value v_response {
var charstring_list v_bw_allocation_id;
var charstring_list v_header_location;
tc_ac.stop;
log("f_create_bw_allocation_resource: BwInfo resource created: ", v_response);
f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id);
if (lengthof(v_bw_allocation_id) != 0) {
p_bw_allocation_id := v_bw_allocation_id[0];
p_bw_info := v_response.response.body.json_body.bwInfo;
}
f_get_header(valueof(v_response.response.header), "Location", v_header_location);
p_bw_allocation_id := regexp(
v_header_location[0],
"?+" & PX_ME_BWM_URI & "/(?*)",
0
);
p_bw_info := v_response.response.body.json_body.bwInfo;
}
[] tc_ac.timeout {
log("f_create_bw_allocation_resource: Expected message not received");
......@@ -87,7 +89,7 @@ module TrafficManagementAPI_Functions {
httpPort.send(
m_http_request(
m_http_request_delete(
PX_ME_BWM_URI & "/" & p_bw_allocation_id,
PICS_ROOT_API & PX_ME_BWM_URI & "/" & p_bw_allocation_id,
v_headers
)));
tc_ac.start;
......
module TrafficManagementAPI_Pixits {
// JSON
import from Json all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
......@@ -8,9 +11,19 @@ module TrafficManagementAPI_Pixits {
// LibMec/LocationAPI
import from LocationAPI_TypesAndValues all;
modulepar Address PX_APP_INSTANCE_ID := "appInst01";
modulepar Json.String PX_APP_INSTANCE_ID := "appInst01";
modulepar Json.String PX_APP_ALLOCATION_ID := "appAllocationId01";
modulepar Json.String PX_APP_NAME := "appName01";
modulepar Json.String PX_UNKNOWN_APP_INSTANCE_ID := "appInst99";
modulepar Json.String PX_UNKNOWN_APP_NAME := "appName99";
modulepar Json.String PX_UNKNOWN_APP_ALLOCATION_ID := "appAllocationId99";
modulepar Address PX_UNKNOWN_APP_INSTANCE_ID := "appInst99";
modulepar Json.String PX_UNKNOWN_BW_ALLOCATION_ID := "bwAllocationId99";
modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1";
......
......@@ -18,6 +18,7 @@ module TrafficManagementAPI_Templates {
in BwRequestType p_requestType,
in FixedAllocation p_fixedAllocation,
in AllocationDirection p_allocationDirection,
in template (omit) Json.String p_appName := omit,
in template (omit) AllocationId p_allocationId := omit,
in template (omit) SessionFilter p_sessionFilter := omit,
in template (omit) FixedBWPriority p_fixedBWPriority := omit
......@@ -25,6 +26,7 @@ module TrafficManagementAPI_Templates {
allocationId := p_allocationId,
timeStamp := omit,
appInsId := p_appInsId,
appName := p_appName,
requestType := p_requestType,
sessionFilter := p_sessionFilter,
fixedBWPriority := p_fixedBWPriority,
......@@ -37,6 +39,7 @@ module TrafficManagementAPI_Templates {
template (present) BwRequestType p_requestType := ?,
template (present) FixedAllocation p_fixedAllocation := ?,
template (present) AllocationDirection p_allocationDirection := ?,
template Json.String p_appName := *,
template AllocationId p_allocationId := *,
template SessionFilter p_sessionFilter := *,
template FixedBWPriority p_fixedBWPriority := *
......@@ -44,6 +47,7 @@ module TrafficManagementAPI_Templates {
allocationId := p_allocationId,
timeStamp := *,
appInsId := p_appInsId,
appName := p_appName,
requestType := p_requestType,
sessionFilter := p_sessionFilter,
fixedBWPriority := p_fixedBWPriority,
......
......@@ -21,7 +21,8 @@ module TrafficManagementAPI_TypesAndValues {
type record BwInfo {
AllocationId allocationId optional,
TimeStamp timeStamp optional,
AppInsId appInsId,
AppInsId appInsId optional,
Json.String appName,
BwRequestType requestType,
SessionFilter sessionFilter optional,
FixedBWPriority fixedBWPriority optional,
......
......@@ -129,7 +129,8 @@ module WlanInformationAPI_Functions {
} // End of function f_delete_assoc_sta_subscription
function f_create_measurement_config(
out MeasurementConfig p_measurement_config
out MeasurementConfig p_measurement_config,
out Json.String p_measurement_config_id
) runs on HttpComponent {
var Headers v_headers;
var HttpMessage v_response;
......@@ -138,7 +139,7 @@ module WlanInformationAPI_Functions {
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements",
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS,
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
......@@ -169,7 +170,13 @@ module WlanInformationAPI_Functions {
tc_ac.stop;
p_measurement_config := v_response.response.body.json_body.measurementConfig;
p_measurement_config_id := regexp(
oct2char(unichar2oct(p_measurement_config.links.self_.href)),
"?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)",
0
);
log("f_create_measurement_config: INFO: IUT successfully responds to the subscription: ", p_measurement_config);
log("f_create_measurement_config: INFO: p_measurement_config_id = ", p_measurement_config_id);
}
[] tc_ac.timeout {
log("f_create_measurement_config: INCONC: Expected message not received");
......@@ -179,21 +186,15 @@ module WlanInformationAPI_Functions {
} // End of function "f_create_measurement_config
function f_delete_measurement_config(
in MeasurementConfig p_measurement_config
in Json.String p_measurement_config_id
) runs on HttpComponent {
var Headers v_headers;
var charstring v_uri := regexp(
oct2char(unichar2oct(p_measurement_config.links.self_.href)),
"?+(" & PX_ME_WLAN_URI & "?*)",
0
);
log("====> v_uri: ", v_uri);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & v_uri,
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & p_measurement_config_id,
v_headers
)));
......
......@@ -34,6 +34,8 @@ module LibMec_Pixits {
modulepar charstring PX_ME_WLAN_URI_SUB := "wai/v2/subscriptions";
modulepar charstring PX_ME_WLAN_URI_MEAS := "wai/v2/measurements";
modulepar charstring PX_ME_V2X_URI := "vis/v1";
modulepar charstring PX_ME_V2X_QUERIES_URI := "/vis/v1/queries";
......