/**
* @author ETSI / TTF T012
* @author ETSI / TTF T012 / TTF T027
* @version $URL:$
* $ID:$
* @desc This module provides the MEC test cases.
......@@ -7,7 +7,7 @@
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
* @see ETSI GS MEC 002, Draft ETSI GS MEC 028 V2.1.1 (2020-06)
* @see ETSI GS MEC 002, Draft ETSI GS MEC 028 V2.3.1 (2022-07)
*/
module AtsMec_WlanInformationAPI_TestCases {
......@@ -43,8 +43,6 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with the list of WLAN Access Point
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_001_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -52,8 +50,8 @@ module AtsMec_WlanInformationAPI_TestCases {
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -70,9 +68,7 @@ module AtsMec_WlanInformationAPI_TestCases {
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -83,7 +79,7 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_ap_info_list
)))) -> value v_response {
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***");
......@@ -101,17 +97,14 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with the list of WLAN Access Point filtered by the macId provided as query parameter
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_002_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -128,9 +121,7 @@ module AtsMec_WlanInformationAPI_TestCases {
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/ap/ap_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -141,7 +132,7 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_ap_info_list
)))) -> value v_response {
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***");
......@@ -159,17 +150,14 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ApInfo.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_002_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -186,9 +174,7 @@ module AtsMec_WlanInformationAPI_TestCases {
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/apId/ap_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -197,7 +183,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) -> value v_response {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
......@@ -215,17 +201,14 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with the list of Station Point
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_003_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -242,9 +225,7 @@ module AtsMec_WlanInformationAPI_TestCases {
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -255,7 +236,7 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_sta_info_list
)))) -> value v_response {
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***");
......@@ -273,17 +254,14 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_004_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -300,9 +278,7 @@ module AtsMec_WlanInformationAPI_TestCases {
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/sta/sta_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -313,7 +289,7 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_sta_info_list
)))) -> value v_response {
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***");
......@@ -331,17 +307,14 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/StationInfo.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_004_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -358,9 +331,7 @@ module AtsMec_WlanInformationAPI_TestCases {
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/staId/sta_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -369,7 +340,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) -> value v_response {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
......@@ -387,18 +358,16 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with the requested list of subscription
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_005_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription; // FIXME Use an array of 3 elements to get a list
var Headers v_headers;
var HttpMessage v_response;
var AssocStaSubscription v_assoc_sta_subscription, v_assoc_sta_subscription_1;
var Json.String v_subscription_id, v_subscription_id_1;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -409,16 +378,15 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id_1);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -429,8 +397,20 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_wlan_subscription_link_list(
mw_subscription_link_list
))))) -> value v_response {
mw_subscription_link_list(
-,
{
*,
mw_subscription(
v_assoc_sta_subscription.links.self_.href,
"AssocStaSubscription"
),
mw_subscription(
v_assoc_sta_subscription_1.links.self_.href,
"AssocStaSubscription"
), *
}
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of subscription ***");
......@@ -443,24 +423,23 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_delete_assoc_sta_subscription(v_subscription_id);
f_delete_assoc_sta_subscription(v_subscription_id_1);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK
/**
* @desc Check that the IUT responds with the requested list of subscription
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2
* @desc Check that the IUT responds with the requested list of subscription when the MEC Platform is queried using a filter on subscription type
*/
testcase TC_MEC_MEC028_SRV_WAI_006_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var HttpMessage v_response;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -471,16 +450,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?subscription_type=assoc_sta",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "subscription_type=assoc_sta",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -493,8 +470,15 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_body_json_wlan_subscription_link_list(
mw_subscription_link_list(
-,
?
)))))) -> value v_response {
{
*,
mw_subscription(
v_assoc_sta_subscription.links.self_.href,
"AssocStaSubscription"
),
*
}
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***");
......@@ -507,23 +491,22 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_delete_assoc_sta_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_006_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_006_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -534,16 +517,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -565,22 +546,20 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_delete_assoc_sta_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_006_BR
/**
* @desc Check that the IUT responds with an error when a request with not existing parameters is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_006_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -595,7 +574,7 @@ module AtsMec_WlanInformationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB,
v_headers
)
)
......@@ -624,28 +603,18 @@ module AtsMec_WlanInformationAPI_TestCases {
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_006_NF
/***
var charstring v_uri;
v_uri := regexp(
oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)),
"?+(" & PX_ME_WLAN_URI & "?*)",
0
);
***/
/**
* @desc Check that the IUT responds with the list of Station Point filtered by the macId provided as query parameter
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2
* @desc Check that the IUT responds with a Notification Subscription
*/
testcase TC_MEC_MEC028_SRV_WAI_007_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -660,7 +629,7 @@ module AtsMec_WlanInformationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB,
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
......@@ -692,9 +661,23 @@ module AtsMec_WlanInformationAPI_TestCases {
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription ***");
// Check HTTP Location header
if (f_check_headers(v_response.response.header) == false) {
log("*** " & testcasename() & ": FAIL: IUT failed in subscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
} else {
var charstring_list v_header_location;
f_get_header(v_response.response.header, "Location", v_header_location);
v_subscription_id := regexp(
v_header_location[0],
"?+" & PX_ME_WLAN_URI_SUB & "/(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription, SubscriptionId: ", v_subscription_id," ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
......@@ -702,22 +685,20 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_response.response.body.json_body.assocStaSubscription);
f_delete_assoc_sta_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_007_OK
/**
* @desc Check that the IUT responds with an error when an invalid Subscription request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_007_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -732,7 +713,7 @@ module AtsMec_WlanInformationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB,
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
......@@ -767,16 +748,14 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when a request with not existing parameters is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Subscription.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_007_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -791,7 +770,7 @@ module AtsMec_WlanInformationAPI_TestCases {
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions&filter=(eq,ap/macId,00:01:02:03:04:04)",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "&filter=(eq,ap/macId,00:01:02:03:04:04)",
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
......@@ -826,19 +805,16 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with the list of Subscription
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_008_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var HttpMessage v_response;
var charstring v_uri;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -849,21 +825,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
v_uri := regexp(
oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)),
"?+" & PX_ME_WLAN_URI & "/subscriptions/" & "(?*)",
0
);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri,
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -879,7 +848,7 @@ module AtsMec_WlanInformationAPI_TestCases {
-,
-, -,
v_assoc_sta_subscription.links
)))))) -> value v_response {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***");
......@@ -892,25 +861,20 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_delete_assoc_sta_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_008_OK
/**
* @desc Check that the IUT responds with an error when a request for existing subscription with incorrect parameters is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_008_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var HttpMessage v_response;
var charstring v_uri := "unknown";
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -921,16 +885,13 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -952,25 +913,21 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_008_NF
/**
* @desc Check that the IUT responds with a Notification Subscription when it is modified
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_009_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var HttpMessage v_response;
var charstring v_uri;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -981,17 +938,12 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
v_uri := regexp(
oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)),
"?+" & PX_ME_WLAN_URI & "/subscriptions/" & "(?*)",
0
);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri,
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
......@@ -1020,7 +972,8 @@ module AtsMec_WlanInformationAPI_TestCases {
v_assoc_sta_subscription.callbackReference,
?,
-, -,
v_assoc_sta_subscription.links )))))) -> value v_response {
v_assoc_sta_subscription.links
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***");
......@@ -1033,23 +986,22 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_response.response.body.json_body.assocStaSubscription);
f_delete_assoc_sta_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_009_OK
/**
* @desc Check that the IUT responds with an error when an invalid field is set in the subscription modification request
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_009_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -1060,17 +1012,17 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/unknown",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
m_assoc_sta_subscription(
v_assoc_sta_subscription.callbackReference,
"", // No callback reference
m_ap_identity(
PX_MAC_ID
),
......@@ -1101,24 +1053,89 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_delete_assoc_sta_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_009_BR
/**
* @desc Check that the IUT responds with an error when an unknown subscription modification request
*/
testcase TC_MEC_MEC028_SRV_WAI_009_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/unknown",
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
m_assoc_sta_subscription(
v_assoc_sta_subscription.callbackReference,
m_ap_identity(
PX_MAC_ID
),
-, -,
v_assoc_sta_subscription.links,
12,
m_time_stamp(
f_get_current_timestamp_utc() / 1000 + 30 // Expiry time: T + 30 seconds
)))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to the AssocStatSubscription update ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_subscription_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_009_NF
/**
* @desc Check that the IUT responds with 204 when an existing subscription is correctly deleted
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_010_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var charstring v_uri;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -1129,21 +1146,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_init_default_headers_list(-, -, v_headers);
v_uri := regexp(
oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)),
"?+(" & PX_ME_WLAN_URI & "?*)",
0
);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & v_uri,
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & v_subscription_id,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1170,18 +1180,14 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when an not existing subscription cannot be deleted
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/ExistingSub.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_010_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var charstring v_uri;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -1192,21 +1198,13 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_init_default_headers_list(-, -, v_headers);
v_uri := regexp(
oct2char(unichar2oct(v_assoc_sta_subscription.links.self_.href)),
"?+(" & PX_ME_WLAN_URI & "?*)",
0
);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & v_uri & "_Invalid",
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "unknown",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1228,24 +1226,21 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_010_NF
/**
* @desc Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/NotificationCallback.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_011_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var AssocStaSubscription v_assoc_sta_subscription;
var Headers v_headers;
var HttpMessage v_response;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
......@@ -1256,7 +1251,7 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1274,7 +1269,7 @@ module AtsMec_WlanInformationAPI_TestCases {
-,
-, -,
?
)))))) -> value v_response {
)))))) {
tc_wait.stop;
f_init_default_headers_list(-, -, v_headers);
......@@ -1288,20 +1283,17 @@ module AtsMec_WlanInformationAPI_TestCases {
}
[] tc_wait.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_delete_assoc_sta_subscription(v_subscription_id);
f_cf_01_http_notif_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_011_OK
/**
* @desc Check that the IUT responds with the list of WLAN Access Point
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_012_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1327,9 +1319,7 @@ module AtsMec_WlanInformationAPI_TestCases {
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/queries/measurements",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1356,125 +1346,14 @@ module AtsMec_WlanInformationAPI_TestCases {
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_012_OK
/**
* @desc Check that the IUT responds with the list of WLAN Access Point
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
/*testcase TC_MEC_MEC028_SRV_WAI_012_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/invalid_measurements",
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
}*/ // End of testcase TC_MEC_MEC028_SRV_WAI_012_BR
/**
* @desc Check that the IUT responds with the list of WLAN Access Point
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_012_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/invalid_measurements",
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of ApInfo ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_012_NF
/**
* @desc Check that the IUT responds with a new measurement configuration
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_013_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1493,7 +1372,7 @@ module AtsMec_WlanInformationAPI_TestCases {
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(
......@@ -1502,9 +1381,9 @@ module AtsMec_WlanInformationAPI_TestCases {
{
m_sta_identity(
PX_MAC_ID,
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)
},
PX_MEASUREMENT_ID,
......@@ -1523,15 +1402,20 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_measurement_config(
?,
{mw_sta_identity(PX_MAC_ID,
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)},
PX_MEASUREMENT_ID,
mw_measurement_info
)))))) -> value v_response {
tc_ac.stop;
v_measurement_config_id := regexp(
oct2char(unichar2oct(v_response.response.body.json_body.measurementConfig.links.self_.href)),
"?+" & PX_ME_WLAN_URI_MEAS & "/" & "(?*)",
0
);
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
......@@ -1542,14 +1426,12 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_response.response.body.json_body.measurementConfig);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_013_OK
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_013_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
......@@ -1572,7 +1454,7 @@ module AtsMec_WlanInformationAPI_TestCases {
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(
......@@ -1581,9 +1463,9 @@ module AtsMec_WlanInformationAPI_TestCases {
{
m_sta_identity(
PX_MAC_ID & ":00", // Invalid MAC address
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)
},
PX_MEASUREMENT_ID,
......@@ -1613,83 +1495,14 @@ module AtsMec_WlanInformationAPI_TestCases {
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_013_BR
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
/*testcase TC_MEC_MEC028_SRV_WAI_013_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Preamble
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI & "/Invalid_measurements",
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
m_measurement_config(
-,
{
m_sta_identity(
PX_MAC_ID,
PX_SSID,
-,
PX_IP_ADDRESS
)
},
PX_MEASUREMENT_ID,
m_measurement_info(1000, 10)
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Expected message not received ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
} // End of 'alt' statement
// Postamble
f_cf_01_http_down();
}*/ // End of testcase TC_MEC_MEC028_SRV_WAI_013_NF
/**
* @desc Check that the IUT responds with the specified measurement configuration
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_014_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1704,16 +1517,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href,
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements" & "/" & v_measurement_config_id,
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1729,14 +1540,14 @@ module AtsMec_WlanInformationAPI_TestCases {
{
mw_sta_identity(
PX_MAC_ID,
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)
},
PX_MEASUREMENT_ID,
mw_measurement_info
)))))) -> value v_response {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
......@@ -1749,19 +1560,18 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_response.response.body.json_body.measurementConfig);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_014_OK
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_014_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1776,16 +1586,14 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements/" & v_measurement_config.links.self_.href & "_Invalid",
PICS_ROOT_API & PX_ME_WLAN_QUERIES_URI & "/measurements"& "/" & v_measurement_config_id & "_Invalid",
v_headers
)
)
);
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1807,20 +1615,18 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_measurement_config);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_014_NF
/**
* @desc Check that the IUT responds with the modified measurement configuration
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_015_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1835,12 +1641,12 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href,
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id,
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
......@@ -1849,9 +1655,9 @@ module AtsMec_WlanInformationAPI_TestCases {
{
m_sta_identity(
PX_MAC_ID,
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)
},
PX_MEASUREMENT_ID,
......@@ -1869,14 +1675,15 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_body_json_wlan_measurement_config(
mw_measurement_config(
?,
{mw_sta_identity(PX_MAC_ID,
PX_SSID,
{mw_sta_identity(
PX_MAC_ID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)},
PX_MEASUREMENT_ID,
mw_measurement_info(2000, 20)
)))))) -> value v_response {
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
......@@ -1889,19 +1696,18 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_response.response.body.json_body.measurementConfig);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_015_OK
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_015_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1916,12 +1722,12 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_Invalid",
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_Invalid",
v_headers,
m_http_message_body_json(
m_body_json_wlan_measurement_config(
......@@ -1930,9 +1736,9 @@ module AtsMec_WlanInformationAPI_TestCases {
{
m_sta_identity(
PX_MAC_ID,
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)
},
PX_MEASUREMENT_ID,
......@@ -1959,19 +1765,18 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_measurement_config);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_015_NF
/**
* @desc Check that the IUT responds with with 204 when requested to delete the specified measurement configuration
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_016_OK() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -1986,12 +1791,12 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href,
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
......@@ -2020,13 +1825,12 @@ module AtsMec_WlanInformationAPI_TestCases {
/**
* @desc Check that the IUT responds with an error when an invalid request is sent
* @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
* @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
*/
testcase TC_MEC_MEC028_SRV_WAI_016_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var MeasurementConfig v_measurement_config;
var Json.String v_measurement_config_id;
// Test control
if (not(PICS_MEC_PLAT) or not(PICS_WLAN_INFORMATION_API_SUPPORTED)) {
......@@ -2041,12 +1845,12 @@ module AtsMec_WlanInformationAPI_TestCases {
// Test adapter configuration
// Preamble
f_create_measurement_config(v_measurement_config);
f_create_measurement_config(v_measurement_config, v_measurement_config_id);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_WLAN_URI & "/measurements" & v_measurement_config.links.self_.href & "_invalid",
PICS_ROOT_API & PX_ME_WLAN_URI_MEAS & "/" & v_measurement_config_id & "_invalid",
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
......@@ -2070,7 +1874,7 @@ module AtsMec_WlanInformationAPI_TestCases {
} // End of 'alt' statement
// Postamble
f_delete_measurement_config(v_measurement_config);
f_delete_measurement_config(v_measurement_config_id);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_016_NF
......
......@@ -11,9 +11,49 @@ module AtsMec_WlanInformationAPI_TestControl {
control {
if (PICS_MEC_PLAT and PICS_WLAN_INFORMATION_API_SUPPORTED) {
if (PICS_MEC_PLAT and PICS_SERVICES and PICS_WLAN_INFORMATION_API_SUPPORTED) {
execute(TC_MEC_MEC028_SRV_WAI_001_OK());
execute(TC_MEC_MEC028_SRV_WAI_002_OK());
execute(TC_MEC_MEC028_SRV_WAI_002_BR());
execute(TC_MEC_MEC028_SRV_WAI_003_OK());
execute(TC_MEC_MEC028_SRV_WAI_004_OK());
execute(TC_MEC_MEC028_SRV_WAI_004_BR());
execute(TC_MEC_MEC028_SRV_WAI_005_OK());
execute(TC_MEC_MEC028_SRV_WAI_006_OK());
execute(TC_MEC_MEC028_SRV_WAI_006_BR());
execute(TC_MEC_MEC028_SRV_WAI_006_NF());
execute(TC_MEC_MEC028_SRV_WAI_007_OK());
execute(TC_MEC_MEC028_SRV_WAI_007_BR());
execute(TC_MEC_MEC028_SRV_WAI_007_NF());
execute(TC_MEC_MEC028_SRV_WAI_008_OK());
execute(TC_MEC_MEC028_SRV_WAI_008_NF());
execute(TC_MEC_MEC028_SRV_WAI_009_OK());
execute(TC_MEC_MEC028_SRV_WAI_009_BR());
execute(TC_MEC_MEC028_SRV_WAI_009_NF());
execute(TC_MEC_MEC028_SRV_WAI_010_OK());
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
......
......@@ -7,6 +7,7 @@ sources := \
modules := ../LibCommon \
../../titan-test-system-framework/ttcn/LibHelpers \
../../titan-test-system-framework/ttcn/LibHttp \
../../titan-test-system-framework/ttcn/LibXsd \
../../titan-test-system-framework/ttcn/LibJson \
../patch_lib_http \
../LibMec \
......@@ -14,7 +15,6 @@ modules := ../LibCommon \
../LibMec/EdgePlatformApplicationEnablementAPI \
../LibMec/ApplicationPackageLifecycleAndOperationGrantingAPI \
../LibMec/TrafficManagementAPI \
../LibMec/RnisAPI \
../LibMec/UEAppInterfaceAPI \
../LibMec/UEidentityAPI \
../LibMec/V2XInformationServiceAPI \
......@@ -22,10 +22,13 @@ modules := ../LibCommon \
../LibMec/WlanInformationAPI \
../LibMec/FixedAccessInformationServiceAPI \
../LibMec/ApplicationMobilityServiceAPI \
../LibMec/FederationEnablementAPI \
../LibMec/IoTAPI \
../../titan-test-system-framework/ccsrc/Framework \
../../titan-test-system-framework/ccsrc/loggers \
../../titan-test-system-framework/ccsrc/Protocols/Http \
../../titan-test-system-framework/ccsrc/Protocols/Tcp \
../../titan-test-system-framework/ccsrc/Protocols/Xml \
../../titan-test-system-framework/ccsrc/Helpers \
../../ccsrc/Ports/LibHttp \
../../ccsrc/EncDec/LibMec \
......
sources := \
ttcn/Ams_Pics.ttcn \
ttcn/Ams_Pixits.ttcn \
ttcn/Ams_EncdecDeclarations.ttcn \
ttcn/Ams_Templates.ttcn \
ttcn/Ams_TypesAndValues.ttcn \
module Ams_EncdecDeclarations {
import from Ams_TypesAndValues all;
external function enc_AppMobilityServiceInfo(in AppMobilityServiceInfo p_app_mobility_service_info) return octetstring
with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" };
external function dec_AppMobilityServiceInfo(in octetstring p_pdu) return AppMobilityServiceInfo
with { extension "prototype (convert) decode(JSON)" };
external function enc_RegistrationRequest(in RegistrationRequest p_registration_request) return octetstring
with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" };
external function dec_RegistrationRequest(in octetstring p_pdu) return RegistrationRequest
with { extension "prototype (convert) decode(JSON)" };
external function enc_RegistrationInfo(in RegistrationInfo p_registration_info) return octetstring
with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" };
external function dec_Registrationinfo(in octetstring p_pdu) return RegistrationInfo
with { extension "prototype (convert) decode(JSON)" };
} // End of module Ams_EncdecDeclarations
module Ams_Pics {
/**
* @desc Does the IUT support LocationAPI?
*/
modulepar boolean PICS_AMS_API_SUPPORTED := true;
} // End of module LocationAPI_Pics
module Ams_Pixits {
// JSON
import from Json all;
// LibMec/LocationAPI
import from Ams_TypesAndValues all;
modulepar Json.String PX_APP_MOBILITY_SERVICE_ID := "KtRGymNQ84dG3mQfRepa";
modulepar Json.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f";
modulepar SubscriptionType PX_SUBSCRIPTION_TYPE := MobilityProcedureSubscription;
modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3";
modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID";
modulepar Json.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID";
modulepar Json.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback";
modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback";
modulepar Json.String PX_MEP_ID := "";
} // End of module LocationAPI_Pixits
module Ams_Templates {
// JSON
import from Json all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// LibMec/LocationAPI
import from Ams_TypesAndValues all;
import from Ams_Pixits all;
template (omit) AppMobilityServiceInfo m_app_mobility_service_info(
in String p_app_mobility_service_id := PX_APP_MOBILITY_SERVICE_ID,
in template (omit) RegistrationInfos p_registration_info := omit
) := {
registeredAppMobilityService := p_registration_info,
appMobilityServiceId := p_app_mobility_service_id
} // End of template m_app_mobility_service_info
template (present) AppMobilityServiceInfo mw_app_mobility_service_info(
template (present) RegistrationInfos p_registration_info := ?,
template (present) String p_app_mobility_service_id := ?
) := {
registeredAppMobilityService := p_registration_info,
appMobilityServiceId := p_app_mobility_service_id
}
template (omit) RegistrationInfo m_app_mobility_registration_info(
in template (value) ServiceConsumerId p_serviceConsumerId,
in template (omit) DeviceInformations p_deviceInformation := omit,
in template (omit) UInt32 p_expiryTime := omit
) := {
serviceConsumerId := p_serviceConsumerId,
deviceInformation := p_deviceInformation,
expiryTime := p_expiryTime
}
template RegistrationInfo mw_app_mobility_registration_info(
template (present) ServiceConsumerId p_serviceConsumerId := ?,
template DeviceInformations p_deviceInformation := *,
template UInt32 p_expiryTime := *
) := {
serviceConsumerId := p_serviceConsumerId,
deviceInformation := p_deviceInformation,
expiryTime := p_expiryTime
}
template (omit) ServiceConsumerId m_service_consumer_id(
in template (omit) String p_appInstanceId := omit,
in template (omit) String p_mepId := omit
) := {
appInstanceId := p_appInstanceId,
mepId := p_mepId
}
template (omit) ServiceConsumerIdWithError m_service_consumer_id_with_error(
in template (omit) String p_appId := omit,
in template (omit) String p_mepId := omit
) := {
appId := p_appId,
mepId := p_mepId
}
template (omit) ServiceConsumer m_service_consumer_error(
in template (omit) String p_appInstance := omit,
in template (omit) String p_mepId := omit
) := {
appInstance := p_appInstance,
mepId := p_mepId
}
template ServiceConsumerId mw_service_consumer_id(
template String p_appInstanceId := *,
template String p_mepId := *
) := {
appInstanceId := p_appInstanceId,
mepId := p_mepId
}
template (omit) RegistrationRequest m_registration_request (
in template (omit) ServiceConsumerId p_service_consumer_id := omit,
in template (omit) DeviceInformations p_device_info := omit,
in template (omit) UInt32 p_expire_time := omit
) := {
serviceConsumerId := p_service_consumer_id,
deviceInformation := p_device_info,
expiryTime := p_expire_time
}
template (omit) RegistrationRequestWithError m_registration_request_with_error (
in template (omit) ServiceConsumerIdWithError p_service_consumer_id_with_error := omit,
in template (omit) DeviceInformations p_device_info := omit,
in template (omit) UInt32 p_expire_time := omit
) := {
serviceConsumerIdWithError := p_service_consumer_id_with_error,
deviceInformation := p_device_info,
expiryTime := p_expire_time
}
template (omit) RegistrationRequest m_registration_request_error (
in template (omit) ServiceConsumer p_service_consumer := omit,
in template (omit) DeviceInformations p_device_info := omit,
in template (omit) UInt32 p_expire_time := omit
) := {
serviceConsumerId := p_service_consumer,
deviceInformation := p_device_info,
expiryTime := p_expire_time
}
template RegistrationRequest mw_registration_request(
template ServiceConsumerId p_service_consumer_id := ?,
template DeviceInformations p_device_info := omit,
template UInt32 p_expire_time := omit
) := {
serviceConsumerId := p_service_consumer_id,
deviceInformation := p_device_info,
expiryTime := p_expire_time
}
template (value) RegistrationInfo m_registration_info (
in template (omit) ServiceConsumerId p_service_consumer_id := omit,
in template (omit) DeviceInformations p_device_info := omit,
in UInt32 p_expire_time
) := {
serviceConsumerId := p_service_consumer_id,
deviceInformation := p_device_info,
expiryTime := p_expire_time
}
template (present) RegistrationInfos mw_registration_info(
template (present) ServiceConsumerId p_service_consumer_id := ?,
template (present) DeviceInformations p_device_info := ?,
template (present) UInt32 p_expire_time := ?
) := {
}
template (value) ServiceConsumer m_service_consumer (
in String p_app_instance,
in String p_mep_id
) := {
appInstance := p_app_instance,
mepId := p_mep_id
}
template (omit) ServiceConsumer mw_service_consumer (
in String p_app_instance,
in template (omit) String p_mep_id := omit
) := {
appInstance := p_app_instance,
mepId := p_mep_id
}
template (value) DeviceInformation m_device_info (
in String p_associate_id
) := {
associateId := p_associate_id
}
template (omit) DeviceInformation mw_device_info (
in String p_associate_id
) := {
associateId := p_associate_id
}
type record AmsSubscriptionLinkList {
Json.AnyURI links,
Subscription subscription
}
template (value) AdjacentAppInfoSubscription_ mw_adjacent_application_info_notification (
in template (omit) SubscriptionType p_subscriptionType := omit,
in Json.AnyURI p_callbackReference,
in template (omit) Json.AnyURI p_links := omit,
in template (omit) AdjacentFilterCriteria p_filterCriteria := omit,
in template (omit) TimeStamp p_expiryDeadline := omit
) := {
subscriptionType := p_subscriptionType ,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
}
template (value) MobilityProcedureSubscription_ m_ams_subscription (
in SubscriptionType p_subscriptionType := PX_SUBSCRIPTION_TYPE,
in Json.AnyURI p_callbackReference,
in template (omit) Json.AnyURI p_links := omit,
in template (omit) FilterCriteria p_filterCriteria := omit,
in template (omit) TimeStamp p_expiryDeadline := omit
) := {
subscriptionType := p_subscriptionType ,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
}
template (value) MobilityProcedureSubscription_ mw_mobility_procedure_notification (
in template (omit) SubscriptionType p_subscriptionType := omit,
in Json.AnyURI p_callbackReference,
in template (omit) Json.AnyURI p_links := omit,
in template (omit) FilterCriteria p_filterCriteria := omit,
in template (omit) TimeStamp p_expiryDeadline := omit
) := {
subscriptionType := p_subscriptionType ,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
}
template (value) MobilityProcedureSubscriptionError m_ams_subscription_error (
in SubscriptionType p_subscriptionType,
in Json.AnyURI p_callbackReference,
in template (omit) Json.AnyURI p_links := omit,
in template (omit) FilterCriteria p_filterCriteria := omit,
in template (omit) TimeStamp p_expiryDeadline := omit
) := {
subscriptionType := p_subscriptionType,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
}
template (present) MobilityProcedureSubscription_ mw_ams_subscription (
in SubscriptionType p_subscriptionType,
in template (omit) Json.AnyURI p_callbackReference := omit,
in template (omit) Json.AnyURI p_links := omit,
in template (omit) FilterCriteria p_filterCriteria := omit,
in template (omit) TimeStamp p_expiryDeadline := omit
) := {
subscriptionType := p_subscriptionType ,
callbackReference := p_callbackReference,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
}
template (present) ExpiryNotification mw_expire_notification (
in template (omit) TimeStamp p_timestamp := omit,
in template (omit) Json.AnyURI p_links := omit,
in TimeStamp p_expiryDeadline
) := {
timeStamp := p_timestamp,
links := p_links,
expiryDeadline := p_expiryDeadline
}
} // End of module LocationAPI_Templates
module Ams_TypesAndValues {
// JSON
import from Json all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
type record of AppMobilityServiceInfo AppMobilityServiceInfos;
type record AppMobilityServiceInfo {
RegistrationInfos registeredAppMobilityService ,
String appMobilityServiceId
}
type record of RegistrationInfo RegistrationInfos;
type record RegistrationInfo {
ServiceConsumerId serviceConsumerId,
DeviceInformations deviceInformation optional,
UInt32 expiryTime optional
}
type record RegistrationRequest {
ServiceConsumerId serviceConsumerId,
DeviceInformations deviceInformation optional,
UInt32 expiryTime optional
}
type record RegistrationRequestWithError {
ServiceConsumerIdWithError serviceConsumerIdWithError,
DeviceInformations deviceInformation optional,
UInt32 expiryTime optional
}
type record of ServiceConsumerId ServiceConsumerIds;
type record ServiceConsumerId {
String appInstanceId optional,
String mepId optional
}
type record ServiceConsumerIdWithError {
String appId optional,
String mepId optional
}
// Erroneous parameter: appInstance should be appInstanceId
type record of ServiceConsumer ServiceConsumers;
type record ServiceConsumer {
String appInstance optional,
String mepId optional
}
type record of DeviceInformation DeviceInformations;
type record DeviceInformation {
String associateId
}
type Json.AnyURI links;
type enumerated SubscriptionType {
MobilityProcedureSubscription,
AdjacentAppInfoSubscription
}
type record Subscription {
Json.AnyURI href,
SubscriptionType subscriptionType
}
type record of AmsSubscriptionLinkList AmsSubscriptionLinkLists;
type record AmsSubscriptionLinkList {
Json.AnyURI links,
Subscription subscription
}
type record MobilityProcedureSubscriptionError {
SubscriptionType subscriptionType,
Json.AnyURI callbackReference,
Json.AnyURI links optional,
FilterCriteria filterCriteria,
TimeStamp expiryDeadline optional
}
type record of MobilityProcedureSubscription_ MobilityProcedureSubscriptions;
type record MobilityProcedureSubscription_ {
SubscriptionType subscriptionType,
Json.AnyURI callbackReference,
Json.AnyURI links optional,
FilterCriteria filterCriteria,
TimeStamp expiryDeadline optional
}
type enumerated MobilityStatusType {
INTERHOST_MOVEOUT_TRIGGERED,
TARGET_APPINST_CONFIRMED,
TARGET_TRAFFIC_RULE_ACTIVATED,
INTERHOST_MOVEOUT_COMPLETED,
INTERHOST_MOVEOUT_FAILED
}
type record AssociateIdList {
String associateId
}
type record of FilterCriteria FilterCriterias;
type record FilterCriteria {
String appInstanceId optional,
AssociateIdList associateId optional,
MobilityStatusType mobilityStatus
}
type record AdjacentFilterCriteria {
String appInstanceId optional
}
type record of ExpiryNotification ExpiryNotifications;
type record ExpiryNotification {
TimeStamp timeStamp,
Json.AnyURI links optional,
TimeStamp expiryDeadline
}
type record of AdjacentAppInfoSubscription_ AdjacentAppInfoSubscriptions;
type record AdjacentAppInfoSubscription_ {
SubscriptionType subscriptionType,
Json.AnyURI callbackReference,
Json.AnyURI links optional,
AdjacentFilterCriteria filterCriteria,
TimeStamp expiryDeadline optional
}
/**
* @desc
* @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
* @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
*/
type record TimeStamp {
Seconds seconds,
NanoSeconds nanoSeconds
}
/**
* @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
*/
type UInt32 Seconds;
/**
* @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
*/
type UInt32 NanoSeconds;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
// /**
// * @desc
// * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
// * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
// */
// type record TimeStamp {
// Seconds seconds,
// NanoSeconds nanoSeconds
// }
//
// /**
// * @desc A type containing list of users.
// * @member user Collection of the zone information list.
// * @member resourceURL Self referring URL.
// */
// type record of UserInfo UserInfos;
// type record UserList {
// UserInfos user optional,
// ResourceURL resourceURL
// }
//
// /**
// * @desc A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided.
// * @member latitude
// * @member longitude
// * @member altitude
// * @member accuracy
// */
// type record LocationInfo {
// Json.Number latitude,
// Json.Number longitude,
// Json.Number altitude optional,
// UInt32 accuracy
// } // End of type LocationInfo
//
// /**
// * @desc A type containing zone information.
// * @member zoneId Identifier of zone
// * @member numberOfAccessPoints The number of access points within the zone
// * @member numberOfUnservicableAccessPoints Number of inoperable access points within the zone.
// * @member numberOfUsers The number of users currently on the access point.
// * @member resourceURL Self referring URL.
// */
// type record ZoneInfo {
// ZoneId zoneId,
// NumberOfAccessPoints numberOfAccessPoints,
// NumberOfUnserviceableAccessPoints numberOfUnservicableAccessPoints,
// NumberOfUsers numberOfUsers,
// ResourceURL resourceURL
// }
//
// /**
// * @desc Collection of the zone information list.
// * @member zone Collection of the zone information list.
// * @member resourceURL Self referring URL.
// */
// type record of ZoneInfo ZoneInfos;
// type record ZoneList {
// ZoneInfos zone optional,
// ResourceURL resourceURL
// }
//
// /**
// * @desc Identifier of access point, <E-CGI><Cell Portion ID> (reference ETSI TS 129 171). Where the E-CGI is made up of the PLMN and Cell Identity (28 bit string). Then the PLMN is made up of the 3 digit MCC & 2 or 3 digit MNC. The Cell Portion is an optional element
// */
// type Json.String AccessPointId;
//
// /**
// * @desc A type containing access point information.
// * @member accessPointId
// * @member connectionType The connection type for the access poin
// * @member operationStatus The operation status of the access point
// * @member numberOfUsers The number of users currently on the access point.
// * @member resourceURL Self referring URL.
// */
// type record AccessPointInfo {
// AccessPointId accessPointId,
// LocationInfo locationInfo optional,
// ConnectionType connectionType,
// OperationStatus operationStatus,
// NumberOfUsers numberOfUsers,
// InterestRealm interestRealm,
// ResourceURL resourceURL
// }
// type record of AccessPointInfo AccessPointInfos;
//
// /**
// * @desc A type containing list of access points.
// * @member zoneId
// * @member accessPoint Collection of the access point information list.
// * @member resourceURL
// */
// type record AccessPointList {
// ZoneId zoneId,
// AccessPointInfos accessPoint optional,
// ResourceURL resourceURL
// }
//
// /**
// * @desc Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI).
// */
// type Json.String Address
//
// /**
// * @desc Reserved for future use.
// */
// type Json.String AncillaryInfo;
//
// /**
// * @desc CallBackData if passed by the application during the associated ZonalTrafficSubscription and UserTrackingSubscription operation. See [\
//REST_NetAPI_Common].
// */
// type Json.String CallbackData;
//
// /**
// * @desc Notification callback definition.
// * @member notifyURL
// */
// type record CallbackReference {
// NotifyURL notifyURL
// }
//
// /**
// * @desc Uniquely identifies this create subscription request. If there is a communication failure during the request, using the same clientCorrelator when retrying the request allows the operator to avoid creating a duplicate subscription.
// */
// type Json.String ClientCorrelator;
//
// /**
// * @desc The connection type for the access point
// */
// type enumerated ConnectionType {
// Femto,
// LTE_femto,
// Smallcell,
// LTE_smallcell,
// Wifi,
// Pico,
// Micro,
// Macro,
// Wimax,
// Unknown
// }
//
// /**
// * @desc Contextual information of a user location (e.g., aisle, floor, room number, etc.)
// */
// type Json.String ContextLocationInfo;
//
// /**
// * @desc Zone ID
// */
// type Json.String CurrentAccessPointId;
//
// /**
// * @desc Period (in seconds) of time notifications are provided for. If set to \"0\" (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications. This element MAY be given by the client during resource creation in order to signal the desired lifetime of the subscription. The server MUST return in this element the period of time for which the subscription will still be valid.
// */
// type Json.Date Duration;
//
// /**
// * @desc Interest realm of access point (e.g. geographical area, a type of industry etc.).
// */
// type Json.String InterestRealm;
//
// /**
// * @desc Link to other resources
// * @member rel Describes the relationship between the URI and the resource.
// * @member href UTI
// */
// type record Link {
// Json.String rel,
// Json.String href
// }
//
// /**
// * @desc The URL of your own listener application.
// */
// type Json.String NotifyURL;
//
// /**
// * @desc The number of access points within the zone
// */
// type UInt32 NumberOfAccessPoints;
//
// /**
// * @desc Number of inoperable access points within the zone.
// */
// type UInt32 NumberOfUnserviceableAccessPoints;
//
// /**
// * @desc The number of users currently on the access point.
// */
// type UInt32 NumberOfUsers;
//
// /**
// * @desc Threshold number of users in an access point which if crossed shall cause a notification.
// */
// type UInt32 NumberOfUsersAPThreshold;
//
// /**
// * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription.
// */
// type UInt32 NumberOfUsersInAP;
//
// /**
// * @desc Threshold number of users in a zone which if crossed shall cause a notification.
// */
// type UInt32 NumberOfUsersInZone;
//
// /**
// * @desc Threshold number of users in a zone which if crossed shall cause a notification.
// */
// type UInt32 NumberOfUsersZoneThreshold;
//
// /**
// * @desc The operation status of the access point
// */
// type enumerated OperationStatus {
// Serviceable,
// Unserviceable,
// Unknown
// }
//
// /**
// * @desc Zone ID
// */
// type Json.String PreviousAccessPointId;
//
// /**
// * @desc Self referring URL
// */
// type Json.AnyURI ResourceURL;
//
// /**
// * @desc Indicates the time of day for zonal presence notification.
// */
// type Json.String Timestamp;
//
// /**
// * @desc Time zone of access point
// */
// type Json.String Timezone;
//
// /**
// * @desc User event
// */
// type enumerated UserEventType {
// Entering,
// Leaving,
// Transferring
// }
//
// /**
// * @desc List of user event values to generate notifications for (these apply to address specified). If this element is missing, a notification is requested to be generated for any change in user event.
// */
// type record of UserEventType UserEventCriteria;
//
// /**
// * @desc A type containing user information.
// * @member address_ Address of user (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI).
// * @member accessPointId Identifier of access point, <E-CGI><Cell Portion ID> (reference ETSI TS 129 171).
// * @member zoneId Identifier of zone
// * @member resourceURL Self referring URL.
// * @member locationInfo A type containing location information with latitude, longitude and altitude, in addition the accuracy of the information are provided.
// * @member contextLocationInfo
// * @member ancillaryInfo
// */
// type record UserInfo {
// Address address_,
// AccessPointId accessPointId,
// ZoneId zoneId,
// ResourceURL resourceURL,
// LocationInfo locationInfo optional,
// ContextLocationInfo contextLocationInfo optional,
// AncillaryInfo ancillaryInfo optional
// } with {
// variant (address_) "name as 'address'";
// } // End of type UserInfo
//
// /**
// * @desc A type containing user tracking subscription.
// * @member
// */
// type record UserTrackingSubscription {
// ClientCorrelator clientCorrelator optional,
// CallbackReference callbackReference,
// Address address_,
// UserEventCriteria userEventCriteria optional,
// ResourceURL resourceURL optional
// } with {
// variant (address_) "name as 'address'";
// }
//
// /**
// * @desc A type containing zonal presence notification
// * @member
// * @member link Link to other resources that are in relationship with this notification. The server SHOULD include a link to the related subscription. No other links are required or suggested by this specification.
// */
// type record ZonalPresenceNotification {
// CallbackReference callbackReference optional,
// ZoneId zoneId,
// Address address_,
// InterestRealm interestRealm optional,
// UserEventType userEventType,
// CurrentAccessPointId currentAccessPointId,
// PreviousAccessPointId previousAccessPointId optional,
// Timestamp timestamp_,
// Link link optional
// } with {
// variant (address_) "name as 'address'";
// variant (timestamp_) "name as 'timestamp'";
// }
//
// /**
// * @desc A type containing zonal traffic subscription
// * @member
// * @member interestRealm Interest realms of access points within a zone (e.g. geographical area, a type of industry etc.).
// * @member userEventCriteria List of user event values to generate notifications for (these apply to zone identifier or all interest realms within zone identifier specified). If this element is missing, a notification is requested to be generated for any change in user event.
// * @member resourceURL
// */
// type record ZonalTrafficSubscription {
// ClientCorrelator clientCorrelator optional,
// CallbackReference callbackReference,
// ZoneId zoneId,
// InterestRealm interestRealm optional,
// UserEventCriteria userEventCriteria optional,
// Duration duration optional,
// ResourceURL resourceURL optional
// }
//
// /**
// * @desc Identifier of zone
// */
// type Json.String ZoneId;
//
// /**
// * @desc A type containing zone status notification.
// * @member zoneId
// * @member
// */
// type record ZoneStatusNotification {
// CallbackData callbackData optional,
// ZoneId zoneId,
// AccessPointId accessPointId optional,
// NumberOfUsersInZone numberOfUsersInZone optional,
// NumberOfUsersInAP numberOfUsersInAP optional,
// OperationStatus operationStatus optional,
// Timestamp timestamp_,
// Link link
// } with {
// variant (timestamp_) "name as 'timestamp'";
// }
//
// /**
// * @desc A type containing zone status subscription.
// * @member zoneId
// * @member
// * @member
// * @member
// * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone).
// */
// type record ZoneStatusSubscription {
// ClientCorrelator clientCorrelator optional,
// ResourceURL resourceURL optional,
// CallbackReference callbackReference,
// ZoneId zoneId,
// NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional,
// NumberOfUsersAPThreshold numberOfUsersAPThreshold optional,
// OperationStatus operationStatus optional
// }
//
// /**
// * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
// */
// type UInt32 Seconds;
//
// /**
// * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
// */
// type UInt32 NanoSeconds;
} with {
encode "JSON"
}
......@@ -5,3 +5,4 @@ sources := \
ttcn/ApplicationMobilityServiceAPI_Templates.ttcn \
ttcn/ApplicationMobilityServiceAPI_Functions.ttcn \
modules := ../RnisAPI
......@@ -3,4 +3,341 @@ module ApplicationMobilityServiceAPI_Functions {
// JSON
import from Json all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_Time all;
import from LibCommon_VerdictControl all;
import from LibCommon_Sync all;
// LibHttp
import from LibHttp_TypesAndValues all;
import from LibHttp_Functions all;
import from LibHttp_Templates all;
import from LibHttp_JsonTemplates all;
import from LibHttp_TestSystem all;
// LibMec/ApplicationMobilityServiceAPI
import from ApplicationMobilityServiceAPI_TypesAndValues all;
import from ApplicationMobilityServiceAPI_Templates all;
import from ApplicationMobilityServiceAPI_Pixits all;
// LibMec
import from LibMec_Templates all;
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
function f_create_application_mobility_services(
in Json.String p_app_instance_id := PX_APP_INS_ID,
out RegistrationInfo p_registration_info
) runs on HttpComponent {
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_APP_AMS_URI,
v_headers,
m_http_message_body_json(
m_body_json_ams_registration_info(
m_registration_info(
-,
m_service_consumer_id(
p_app_instance_id
)))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_ams_registration_info(
mw_registration_info(
?,
mw_service_consumer_id(
p_app_instance_id
))))))) -> value v_response {
tc_ac.stop;
p_registration_info := v_response.response.body.json_body.registrationInfo;
log("f_create_application_mobility_services: INFO: IUT successfully responds to the registration: ", p_registration_info);
}
[] tc_ac.timeout {
log("f_create_application_mobility_services: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_create_application_mobility_services
function f_delete_application_mobility_services(
in Json.String p_app_mobility_service_id
) runs on HttpComponent {
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(p_app_mobility_service_id, "UTF-8")),
v_headers
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_delete_application_mobility_services: INCONC: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_delete_application_mobility_services
function f_create_adjacent_app_instance_info(
in Json.String p_app_instance_id := PX_APP_INS_ID,
in Json.String p_app_id := PX_APP_ID,
in template (value) CommunicationInterface p_communication_interface,
out AdjacentAppInstanceInfo p_adjacent_app_instance_info
) runs on HttpComponent {
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_APP_AMS_URI,
v_headers,
m_http_message_body_json(
m_body_json_ams_adjacent_app_instance_info(
m_adjacent_app_instance_info(
p_app_instance_id,
p_app_id,
p_communication_interface
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_ams_adjacent_app_instance_info(
mw_adjacent_app_instance_info(
p_app_instance_id,
p_app_id
)))))) -> value v_response {
tc_ac.stop;
p_adjacent_app_instance_info := v_response.response.body.json_body.adjacentAppInstanceInfo;
log("f_create_adjacent_app_instance_info: INFO: IUT successfully responds to the adjacentAppInstanceInfo: ", p_adjacent_app_instance_info);
}
[] tc_ac.timeout {
log("f_create_adjacent_app_instance_info: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_create_adjacent_app_instance_info
function f_delete_adjacent_app_instance_info(
in Json.String p_app_instance_id
) runs on HttpComponent {
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_APP_AMS_URI & oct2char(unichar2oct(p_app_instance_id, "UTF-8")),
v_headers
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_delete_adjacent_app_instance_info: INCONC: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_delete_adjacent_app_instance_info
function f_create_mobility_procedure_subscription(
out MobilityProcedureSubscription p_mobility_procedure_subscription,
out charstring p_subscription_id
) runs on HttpComponent {
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS,
v_headers,
m_http_message_body_json(
m_body_json_ams_mobility_procedure_subscription(
m_mobility_procedure_subscription(
PX_CALLBACK_REFERENCE,
m_filter_criteria,
-, -, -,
{ seconds := (f_get_current_timestamp_utc() / 1000) + 60, nanoSeconds := 0 }
))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_ams_mobility_procedure_subscription(
mw_mobility_procedure_subscription(
PX_CALLBACK_REFERENCE,
mw_filter_criteria,
mw_links
)))))) -> value v_response {
tc_ac.stop;
// Extract HTTP Location header
var charstring_list v_subscription_id;
f_get_header(v_response.response.header, "Location", v_subscription_id);
// Extract HTTP subssription id
p_subscription_id := regexp(
v_subscription_id[0],
"?+" & PX_ME_APP_AMS_SUBS & "/(?*)",
0
);
p_mobility_procedure_subscription := v_response.response.body.json_body.mobilityProcedureSubscription;
log("f_create_mobility_procedure_subscription: INFO: IUT successfully responds to the subscription: ", p_mobility_procedure_subscription);
log("f_create_mobility_procedure_subscription: INFO: p_subscription_id: ", p_subscription_id);
}
[] tc_ac.timeout {
log("f_create_mobility_procedure_subscription: INCONC: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_create_mobility_procedure_subscription
function f_delete_mobility_procedure_subscription(
in charstring p_subscription_id
) runs on HttpComponent {
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & p_subscription_id,
v_headers
)));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_delete_mobility_procedure_subscription: INCONC: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_delete_mobility_procedure_subscription
function f_create_adjacent_appInfo_subscription(
out AdjacentAppInfoSubscription p_adjacent_appInfo_subscription,
out charstring p_subscription_id
) runs on HttpComponent {
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS,
v_headers,
m_http_message_body_json(
m_body_json_ams_adjacent_appInfo_subscription(
m_adjacent_app_info_subscription(
PX_CALLBACK_REFERENCE,
m_adjacent_filter_criteria
))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_ams_adjacent_appInfo_subscription(
mw_adjacent_app_info_subscription(
PX_CALLBACK_REFERENCE,
mw_adjacent_filter_criteria,
mw_links
)))))) -> value v_response {
tc_ac.stop;
// Extract HTTP Location header
var charstring_list v_subscription_id;
f_get_header(v_response.response.header, "Location", v_subscription_id);
// Extract HTTP subssription id
p_subscription_id := regexp(
v_subscription_id[0],
"?+" & PX_ME_APP_AMS_SUBS & "/(?*)",
0
);
p_adjacent_appInfo_subscription := v_response.response.body.json_body.adjacentAppInfoSubscription;
log("f_create_adjacent_appInfo_subscription: INFO: IUT successfully responds to the subscription: ", p_adjacent_appInfo_subscription);
log("f_create_adjacent_appInfo_subscription: INFO: p_subscription_id: ", p_subscription_id);
}
[] tc_ac.timeout {
log("f_create_adjacent_appInfo_subscription: INCONC: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_create_adjacent_appInfo_subscription
function f_delete_adjacent_appInfo_subscription( // FIXME To be merged with f_delete_mobility_procedure_subscription into f_delete_subscription
in charstring p_subscription_id
) runs on HttpComponent {
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & p_subscription_id,
v_headers
)));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_delete_adjacent_appInfo_subscription: INCONC: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_delete_adjacent_appInfo_subscription
} // End of module ApplicationMobilityServiceAPI_Functions
......@@ -3,4 +3,9 @@ module ApplicationMobilityServiceAPI_Pics {
// JSON
import from Json all;
/**
* @desc Does the IUT support LocationAPI?
*/
modulepar boolean PICS_AMS_API_SUPPORTED := true;
} // End of module ApplicationMobilityServiceAPI_Pics
......@@ -3,4 +3,31 @@ module ApplicationMobilityServiceAPI_Pixits {
// JSON
import from Json all;
// LibMec/ApplicationMobilityServiceAPI
import from ApplicationMobilityServiceAPI_TypesAndValues all;
modulepar Json.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f";
modulepar Json.String PX_APP_INS_ID_2 := "4e92055c-c594-11ee-8535-13445063b38e";
modulepar Json.String PX_APP_INS_ID_NEW := "d1e24122-c596-11ee-9ffa-33159308a999";
modulepar Json.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f";
modulepar Json.String PX_APP_ID_2 := "4e92055c-c594-11ee-8535-13445063b38e";
modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID";
modulepar Json.String PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID := "PX_NON_EXISTENT_APP_MOBILITY_SERVICE_ID";
modulepar Json.String PX_CALLBACK_REFERENCE := "http://127.0.0.1/callback";
modulepar charstring PX_CALLBACK_URI := "http://127.0.0.1/callback";
modulepar Json.String PX_MEP_ID := "";
modulepar Json.String PX_HOST := "";
modulepar UInt16 PX_PORT := 12345
} // End of module ApplicationMobilityServiceAPI_Pixits
......@@ -3,7 +3,339 @@ module ApplicationMobilityServiceAPI_Templates {
// JSON
import from Json all;
// MEC 012
import from RnisAPI_TypesAndValues all;
// LibMec/ApplicationMobilityServiceAPI
import from ApplicationMobilityServiceAPI_TypesAndValues all;
import from ApplicationMobilityServiceAPI_Pixits all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
template (omit) RegistrationInfo m_registration_info(
in template (omit) Json.String p_app_mobility_service_id := omit,
in template (value) ServiceConsumerId p_serviceConsumerId,
in template (omit) DeviceInformation p_deviceInformation := omit,
in template (omit) UInt32 p_expiryTime := omit
) := {
appMobilityServiceId := p_app_mobility_service_id,
serviceConsumerId := p_serviceConsumerId,
deviceInformation := p_deviceInformation,
expiryTime := p_expiryTime
} // End of template m_registration_info
template (present) RegistrationInfo mw_registration_info(
template (present) Json.String p_app_mobility_service_id := ?,
template (present) ServiceConsumerId p_serviceConsumerId := ?,
template DeviceInformation p_deviceInformation := *,
template UInt32 p_expiryTime := *
) := {
appMobilityServiceId := p_app_mobility_service_id,
serviceConsumerId := p_serviceConsumerId,
deviceInformation := p_deviceInformation,
expiryTime := p_expiryTime
} // End of template m_registration_info
template (omit) ServiceConsumerId m_service_consumer_id(
in template (omit) Json.String p_appInstanceId := omit,
in template (omit) Json.String p_mepId := omit
) := {
appInstanceId := p_appInstanceId,
mepId := p_mepId
} // End of template m_service_consumer_id
template ServiceConsumerId mw_service_consumer_id(
template String p_appInstanceId := *,
template String p_mepId := *
) := {
appInstanceId := p_appInstanceId,
mepId := p_mepId
} // End of template mw_service_consumer_id
template (omit) DeviceInformation_ m_device_info(
in Json.String p_associate_id,
in template (omit) AppMobilityServiceLevel p_appMobilityServiceLevel := omit,
in template (omit) ContextTransferState p_contextTransferState := omit
) := {
associateId := p_associate_id,
appMobilityServiceLevel := p_appMobilityServiceLevel,
contextTransferState := p_contextTransferState
} // End of template m_device_info
template (present) DeviceInformation_ mw_device_info(
template (present) Json.String p_associate_id := ?,
template AppMobilityServiceLevel p_appMobilityServiceLevel := *,
template ContextTransferState p_contextTransferState := *
) := {
associateId := p_associate_id,
appMobilityServiceLevel := p_appMobilityServiceLevel,
contextTransferState := p_contextTransferState
} // End of template mw_device_info
template (omit) MobilityProcedureSubscription m_mobility_procedure_subscription(
in template (omit) Json.AnyURI p_callbackReference := omit,
in template (value) FilterCriteria p_filterCriteria,
in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit,
in template (omit) Json.Bool p_requestTestNotification := omit,
in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit,
in template (omit) TimeStamp p_expiryDeadline := omit
) := {
subscriptionType := "MobilityProcedureSubscription",
callbackReference := p_callbackReference,
requestTestNotification := p_requestTestNotification,
websockNotifConfig := p_websockNotifConfig,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template m_mobility_procedure_subscription
template (omit) MobilityProcedureSubscription m_mobility_procedure_subscription_error(
in template (omit) Json.AnyURI p_callbackReference := omit,
in template (value) FilterCriteria p_filterCriteria,
in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit,
in template (omit) Json.Bool p_requestTestNotification := omit,
in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit,
in template (omit) TimeStamp p_expiryDeadline := omit
) modifies m_mobility_procedure_subscription := {
subscriptionType := "MobilityProcedureSub"
} // End of template m_mobility_procedure_subscription_error
template (present) MobilityProcedureSubscription mw_mobility_procedure_subscription(
template Json.AnyURI p_callbackReference := *,
template (present) FilterCriteria p_filterCriteria := ?,
template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *,
template Json.Bool p_requestTestNotification := *,
template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := *,
template TimeStamp p_expiryDeadline := *
) := {
subscriptionType := "MobilityProcedureSubscription",
callbackReference := p_callbackReference,
requestTestNotification := p_requestTestNotification,
websockNotifConfig := p_websockNotifConfig,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_mobility_procedure_subscription
template (omit) FilterCriteria m_filter_criteria(
in template (omit) Json.String p_appInstanceId := omit,
in template (omit) AssociateId p_associateId := omit,
in template (omit) MobilityStatus p_mobilityStatus := omit
) := {
appInstanceId := p_appInstanceId,
associateId := p_associateId,
mobilityStatus := p_mobilityStatus
} // End of template m_filter_criteria
template FilterCriteria mw_filter_criteria(
template Json.String p_appInstanceId := *,
template AssociateId p_associateId := *,
template MobilityStatus p_mobilityStatus := *
) := {
appInstanceId := p_appInstanceId,
associateId := p_associateId,
mobilityStatus := p_mobilityStatus
} // End of template mw_filter_criteria
template (omit) AdjacentAppInstanceInfo m_adjacent_app_instance_info(
in template (value) Json.String p_appInstanceId,
in template (value) Json.String p_appDId,
in template (value) CommunicationInterface p_appInstanceCommLink,
in template (omit) MECHostInformation p_mecHostInformation := omit,
in template (omit) Json.String p_registeredInstanceId := omit
) := {
appInstanceId := p_appInstanceId,
appDId := p_appDId,
appInstanceCommLink := p_appInstanceCommLink,
mecHostInformation := p_mecHostInformation,
registeredInstanceId := p_registeredInstanceId
} // End of template m_adjacent_app_instance_info
template (present) AdjacentAppInstanceInfo mw_adjacent_app_instance_info(
template (present) Json.String p_appInstanceId := ?,
template (present) Json.String p_appDId := ?,
template (present) CommunicationInterface p_appInstanceCommLink := ?,
template MECHostInformation p_mecHostInformation := *,
template Json.String p_registeredInstanceId := *
) := {
appInstanceId := p_appInstanceId,
appDId := p_appDId,
appInstanceCommLink := p_appInstanceCommLink,
mecHostInformation := p_mecHostInformation,
registeredInstanceId := p_registeredInstanceId
} // End of template mw_adjacent_app_instance_info
template (omit) CommunicationInterface m_communication_interface(
in template (omit) IpAddresses p_ipAddresses := omit
) := {
ipAddresses := p_ipAddresses
} // End of template m_communication_interface
template CommunicationInterface mw_communication_interface(
template IpAddresses p_ipAddresses := *
) := {
ipAddresses := p_ipAddresses
} // End of template mw_communication_interface
template (omit) AdjacentAppInfoSubscription m_adjacent_app_info_subscription(
in template (omit) Json.AnyURI p_callbackReference := omit,
in template (value) AdjacentFilterCriteria p_filterCriteria,
in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := omit,
in template (omit) Json.Bool p_requestTestNotification := omit,
in template (omit) ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := omit,
in template (omit) TimeStamp p_expiryDeadline := omit
) := {
subscriptionType := "AdjacentAppInfoSubscription",
callbackReference := p_callbackReference,
requestTestNotification := p_requestTestNotification,
websockNotifConfig := p_websockNotifConfig,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template m_adjacent_app_info_subscription
template (present) AdjacentAppInfoSubscription mw_adjacent_app_info_subscription(
template Json.AnyURI p_callbackReference := *,
template (present) AdjacentFilterCriteria p_filterCriteria := ?,
template ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := *,
template Json.Bool p_requestTestNotification := *,
template ApplicationMobilityServiceAPI_TypesAndValues.WebsockNotifConfig p_websockNotifConfig := *,
template TimeStamp p_expiryDeadline := *
) := {
subscriptionType := "AdjacentAppInfoSubscription",
callbackReference := p_callbackReference,
requestTestNotification := p_requestTestNotification,
websockNotifConfig := p_websockNotifConfig,
links := p_links,
filterCriteria := p_filterCriteria,
expiryDeadline := p_expiryDeadline
} // End of template mw_adjacent_app_info_subscription
template (omit) AdjacentFilterCriteria m_adjacent_filter_criteria(
in template (omit) Json.String p_appInstanceId := omit
) := {
appInstanceId := p_appInstanceId
} // End of template m_adjacent_filter_criteria
template AdjacentFilterCriteria mw_adjacent_filter_criteria(
template Json.String p_appInstanceId := *
) := {
appInstanceId := p_appInstanceId
} // End of template mw_adjacent_filter_criteria
template (value) MobilityProcedureNotification m_mobility_procedure_notification(
in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links,
in template (value) AssociateId p_associateId,
in template (value) MobilityStatus p_mobilityStatus,
in template (omit) TimeStamp p_timeStamp := omit,
in template (omit) TargetAppInfo p_targetAppInfo := omit
) := {
notificationType := "MobilityProcedureNotification",
timeStamp := p_timeStamp,
associateId := p_associateId,
mobilityStatus := p_mobilityStatus,
targetAppInfo := p_targetAppInfo,
links := p_links
} // End of template m_mobility_procedure_notification
template (present) MobilityProcedureNotification mw_mobility_procedure_notification(
template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?,
template (present) AssociateId p_associateId := ?,
template (present) MobilityStatus p_mobilityStatus := ?,
template TimeStamp p_timeStamp := *,
template TargetAppInfo p_targetAppInfo := *
) := {
notificationType := "MobilityProcedureNotification",
timeStamp := p_timeStamp,
associateId := p_associateId,
mobilityStatus := p_mobilityStatus,
targetAppInfo := p_targetAppInfo,
links := p_links
} // End of template mw_mobility_procedure_notification
template (omit) AdjacentAppInfoNotification m_adjacent_app_info_notification(
in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links,
in template (omit) AdjacentAppInfo p_adjacentAppInfo := omit,
in template (omit) TimeStamp p_timeStamp := omit
) :={
notificationType := "AdjacentAppInfoNotification",
timeStamp := p_timeStamp,
adjacentAppInfo := p_adjacentAppInfo,
links := p_links
} // End of template m_adjacent_app_info_notification
template (present) AdjacentAppInfoNotification mw_adjacent_app_info_notification(
template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?,
template AdjacentAppInfo p_adjacentAppInfo := *,
template TimeStamp p_timeStamp := *
) :={
notificationType := "AdjacentAppInfoNotification",
timeStamp := p_timeStamp,
adjacentAppInfo := p_adjacentAppInfo,
links := p_links
} // End of template mw_adjacent_app_info_notification
template (omit) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification m_expire_notification(
in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links,
in template (omit) TimeStamp p_timestamp := omit
) := {
notificationType := "ExpiryNotification",
timeStamp := p_timestamp,
links := p_links
} // End of template m_expire_notification
template (present) ApplicationMobilityServiceAPI_TypesAndValues.ExpiryNotification mw_expire_notification(
template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?,
template TimeStamp p_timestamp := *
) := {
notificationType := "ExpiryNotification",
timeStamp := p_timestamp,
links := p_links
} // End of template mw_expire_notification
template (value) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList m_subscription_link_list(
in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links,
in template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription
) := {
links := p_links,
subscription := p_subscription
} // End of template m_subscription_link_list
template (present) ApplicationMobilityServiceAPI_TypesAndValues.SubscriptionLinkList mw_subscription_link_list(
template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links p_links := ?,
template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscription p_subscription := ?
) := {
links := p_links,
subscription := p_subscription
} // End of template mw_subscription_link_list
template (value) ApplicationMobilityServiceAPI_TypesAndValues.Links m_links(
in template (value) ApplicationMobilityServiceAPI_TypesAndValues.LinkType p_self_
) := {
self_ := p_self_
} // End of template m_links
template (present) ApplicationMobilityServiceAPI_TypesAndValues.Links mw_links(
template (present) ApplicationMobilityServiceAPI_TypesAndValues.LinkType p_self_ := ?
) := {
self_ := p_self_
} // End of template mw_links
template (value) ApplicationMobilityServiceAPI_TypesAndValues.Subscription m_subscription(
in template (value) Json.AnyURI p_href,
in template (value) Json.String p_subscriptionType
) := {
href := p_href,
subscriptionType := p_subscriptionType
} // End of template m_subscription
template (present) ApplicationMobilityServiceAPI_TypesAndValues.Subscription mw_subscription(
template (present) Json.AnyURI p_href := ?,
template (present) Json.String p_subscriptionType := ?
) := {
href := p_href,
subscriptionType := p_subscriptionType
} // End of template mw_subscription
} // End of module ApplicationMobilityServiceAPI_Templates
/**
* @author ETSI / STF569 / TTF T027
* @version $Url$
* $Id$
* @desc Types and Values for ETSI GS MEC 021 V3.1.1 (2023-10)
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*/
module ApplicationMobilityServiceAPI_TypesAndValues {
// JSON
import from Json all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// MEC 012
import from RnisAPI_TypesAndValues all;
/**
* @desc This data type represents the registration information used in the registration API of Application Mobility Service
* @member appMobilityServiceId The identifier of registered Application Mobility Service
* @member serviceConsumerId The identifier of service consumer requesting the Application Mobility Service
* @member deviceInformation Specifies the device served by the application instance which is registering the Application Mobility Service
* @member expiryTime Indicates the time of Application Mobility Service expiration from the time of registration accepted
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo
*/
type record RegistrationInfo {
Json.String appMobilityServiceId,
ServiceConsumerId serviceConsumerId,
DeviceInformation deviceInformation optional,
Json.UInteger expiryTime optional
}
type record of RegistrationInfo RegistrationInfos;
/**
* @desc The identifier of service consumer requesting the Application Mobility Service
* @member appInstanceId Represents the identifier of the application instance registering the Application Mobility Service
* @member mepId Represents the identifier of the MEC platform registering the Application Mobility Service
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo
*/
type record ServiceConsumerId {
Json.String appInstanceId optional,
Json.String mepId optional
}
type record of ServiceConsumerId ServiceConsumerIds;
/**
* @desc Specifies the device served by the application instance which is registering the Application Mobility Service
* @member associateId Represents the identifier of the device
* @member appMobilityServiceLevel If the application is stateful, this attribute shall be included
* @member contextTransferState If present, it represents the state of transferring the user context to another application instance
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo
*/
type record DeviceInformation_ {
Json.String associateId,
AppMobilityServiceLevel appMobilityServiceLevel optional,
ContextTransferState contextTransferState optional
}
type record of DeviceInformation_ DeviceInformation;
/**
* @desc Represents the state of transferring the user context to another application instance
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo
*/
type enumerated ContextTransferState {
NOT_TRANSFERRED,
USER_CONTEXT_TRANSFER_COMPLETED
} with {
variant "JSON: as number"
}
/**
* @desc This data type represents the adjacent application instance information of the adjacent_app_instances resource
* @member appInstanceId Identifier of the application instance
* @member appDId Identifier of the application descriptor
* @member appInstanceCommLink It specifies the communication interface of application instance
* @member mecHostInformation The MEC host where the application instance is running on
* @member registeredInstanceId Identifier of the application instance that registers to the AMS, which is instantiated from the application descriptor identified by the attribute "appDId"
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.3-1: Attributes of AdjacentAppInstanceInfo
*/
type record AdjacentAppInstanceInfo {
Json.String appInstanceId,
Json.String appDId,
CommunicationInterface appInstanceCommLink,
MECHostInformation mecHostInformation optional,
Json.String registeredInstanceId optional
}
type record of AdjacentAppInstanceInfo AdjacentAppInstanceInfos;
/**
* @desc This type represents a subscription to mobility procedure notifications from AMS
* @member subscriptionType Shall be set to "MobilityProcedureSubscription"
* @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service
* @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4]
* @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications
* @member links Hyperlink related to the resource
* @member filterCriteria List of filtering criteria for the subscription
* @member expiryDeadline Identifies a boundary after which the subscription will expire
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription
*/
type record MobilityProcedureSubscription {
Json.String subscriptionType,
Json.AnyURI callbackReference optional,
Json.Bool requestTestNotification optional,
WebsockNotifConfig websockNotifConfig optional,
Links links optional,
FilterCriteria filterCriteria,
TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
}
type record of MobilityProcedureSubscription MobilityProcedureSubscriptions;
/**
* @desc Hyperlink related to the resource
* @member self_ Self-referring URI
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription
*/
type record Links {
LinkType self_
} with {
variant (self_) "name as 'self'";
}
/**
* @desc List of filtering criteria for the subscription
* @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service
* @member associateId Identifiers to associate the information for specific UE(s) and flow(s)
* @member mobilityStatus In case mobilityStatus is not included in the subscription request
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription
*/
type record FilterCriteria {
Json.String appInstanceId optional,
AssociateId associateId optional,
MobilityStatus mobilityStatus optional
}
type record of FilterCriteria FilterCriterias;
/**
* @desc This type represents a subscription to notification about the change on adjacent application instance information from AMS
* @member subscriptionType Shall be set to "AdjacentAppInfoSubscription"
* @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service
* @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4]
* @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications
* @member links Hyperlink related to the resource
* @member filterCriteria List of filtering criteria for the subscription
* @member expiryDeadline Identifies a boundary after which the subscription will expire
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription
*/
type record AdjacentAppInfoSubscription {
Json.String subscriptionType,
Json.AnyURI callbackReference optional,
Json.Bool requestTestNotification optional,
WebsockNotifConfig websockNotifConfig optional,
Links links optional,
AdjacentFilterCriteria filterCriteria,
TimeStamp expiryDeadline optional
} with {
variant (links) "name as '_links'";
}
type record of AdjacentAppInfoSubscription AdjacentAppInfoSubscriptions;
/**
* @desc List of filtering criteria for the subscription
* @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription
*/
type record AdjacentFilterCriteria {
Json.String appInstanceId optional
}
/**
* @desc This type represents a list of links related to currently existing subscriptions for the service consumer
* @member links The URI referring to the subscription
* @member subscription The service consumer's subscriptions
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList
*/
type record SubscriptionLinkList {
Links links,
Subscription subscription
} with {
variant (links) "name as '_links'";
}
/**
* @desc The service consumer's subscriptions
* @member href The URI referring to the subscription
* @member subscriptionType Type of the subscription
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList
*/
type record Subscription {
Json.AnyURI href,
Json.String subscriptionType
}
/**
* @desc This type represents a notification from AMS with regards to mobility procedure
* @member notificationType Shall be set to "MobilityProcedureNotification"
* @member timeStamp Date and time of the generation of the notification
* @member associateId Identifiers to associate the information for specific UE(s) and flow(s)
* @member mobilityStatus Indicate the status of the UE mobility
* @member targetAppInfo Identifiers to associate the information of target application instance
* @member links Object containing hyperlinks related to the resource
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification
*/
type record MobilityProcedureNotification {
Json.String notificationType,
TimeStamp timeStamp optional,
AssociateId associateId,
MobilityStatus mobilityStatus,
TargetAppInfo targetAppInfo optional,
Links links
} with {
variant (links) "name as '_links'";
}
/**
* @desc Identifiers to associate the information of target application instance
* @member appInstanceId Identifiers of the target application instance
* @member CommunicationInterface It specifies the communication interface of the application instance
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification
*/
type record TargetAppInfo {
Json.String appInstanceId,
CommunicationInterface commInterface optional
}
/**
* @desc Indicate the status of the UE mobility
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification
*/
type enumerated MobilityStatus {
INTERHOST_MOVEOUT_TRIGGERED (1),
INTERHOST_MOVEOUT_COMPLETED (2),
INTERHOST_MOVEOUT_FAILED (3)
} with {
variant "JSON: as number"
}
/**
* @desc This type represents a notification from AMS with regards to change on adjacent application instances information
* @member notificationType Shall be set to "MobilityProcedureNotification"
* @member timeStamp Date and time of the generation of the notification
* @member adjacentAppInfo 0 to N identifiers to associate the information for adjacent application instances
* @member links Object containing hyperlinks related to the resource
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.3-1: Attributes of the AdjacentAppInfoNotification
*/
type record AdjacentAppInfoNotification {
Json.String notificationType,
TimeStamp timeStamp optional,
AdjacentAppInfo adjacentAppInfo optional,
Links links
} with {
variant (links) "name as '_links'";
}
type record of TargetAppInfo AdjacentAppInfo;
/**
* @desc This data type represents a notification from AMS with regards to expiry of the existing subscription
* @member notificationType Shall be set to "ExpiryNotification"
* @member timeStamp Date and time of the generation of the notification
* @member links Object containing hyperlinks related to the resource
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.4-1: Attributes of the ExpiryNotification
*/
type record ExpiryNotification {
Json.String notificationType,
TimeStamp timeStamp optional,
Links links
} with {
variant (links) "name as '_links'";
}
/**
* @desc This data type represents the Application Mobility Service level information used in the Application Mobility Service APIs
* @member appMobilityServiceLevel Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel
*/
type record AppMobilityServiceLevel {
AppMobilityServiceLevelEnmu appMobilityServiceLevel
}
/**
* @desc Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel
*/
type enumerated AppMobilityServiceLevelEnmu {
APP_MOBILITY_NOT_ALLOWED (1),
APP_MOBILITY_WITH_CONFIRMATION (2),
APP_MOBILITY_WITHOUT_CONFIRMATION (3)
} with {
variant "JSON: as number"
}
/**
* @desc This data type represents a notification from AMS with regards to expiry of the existing subscription
* @member notificationType Shall be set to "TestNotification"
* @member links Object containing hyperlinks related to the resource
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.6-1: Attributes of the TestNotification
*/
type record TestNotification {
Json.String notificationType,
Links links
} with {
variant (links) "name as '_links'";
}
/**
* @desc This type represents the communication interface of an application instance
* @member ipAddresses Entry point information of the service as one or more pairs of IP address and port
* @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface
*/
type record CommunicationInterface {
IpAddresses ipAddresses optional
......@@ -19,15 +317,59 @@ module ApplicationMobilityServiceAPI_TypesAndValues {
* @desc Entry point information of the service as one or more pairs of IP address and port
* @member host Host portion of the address
* @member port Port portion of the address
* @see ETSI GS MEC 021 Clause 7.5.2 Type: CommunicationInterface
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.2 Type: CommunicationInterface
*/
type record IpAddress {
Json.String host,
UInt32 port_
Json.UInteger port_
} with {
variant (port_) "name as 'port'";
}
type record length(1..infinity) of IpAddress IpAddresses;
/**
* @desc This type represents a type of link
* @member href URI referring to a resource
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.4 Type: LinkType
*/
type record LinkType {
Json.AnyURI href
}
/**
* @desc The type represents the parameters of MEC host information
* @member hostName Human-readable name of MEC host
* @member hostId Deployment-specific information to identify a MEC host
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.5.5-1: Attributes of MECHostInformation
*/
type record MECHostInformation {
Json.String hostName optional,
KeyValuePairs hostId
}
/**
* @desc This data type represents a list of key-value pairs
* @member key_name
* @member key_value
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 6.2.5.3 Type: KeyValuePairs
*/
type record KeyValuePairs {
Json.String key_name,
anytype key_value // FIXME To be refined
}
/**
* @desc This type represents configuration for the delivery of subscription notifications over Websockets
* @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications
* @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested
* @see ETSI GS MEC 021 V3.1.1 (2023-10) Clause 7.5.7 Type: WebsockNotifConfig
*/
type record WebsockNotifConfig {
Json.AnyURI websocketUri optional,
Json.Bool requestWebsocketUri optional
}
} with {
extension "anytype integer, float, boolean, universal charstring";
encode "JSON"
} // End of module ApplicationMobilityServiceAPI_TypesAndValues
module ApplicationPackageLifecycleAndOperationGrantingAPI_Functions {
// JSON
import from Json all;
// Libcommon
import from LibCommon_Sync all;
// LibHttp
import from LibHttp_TypesAndValues all;
import from LibHttp_Functions all;
import from LibHttp_Templates all;
import from LibHttp_JsonTemplates all;
import from LibHttp_TestSystem all;
// LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI
import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all;
import from ApplicationPackageLifecycleAndOperationGrantingAPI_Templates all;
import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pics all;
import from ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits all;
// LibMec
import from LibMec_Functions all;
import from LibMec_Pics all;
import from LibMec_Pixits all;
function f_create_grant_request(
out Grant p_grant
) runs on HttpComponent {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_MEO_GRANT_URI,
v_headers,
m_http_message_body_json(
m_body_json_grant_request(
m_grant_request(
PX_APP_INSTANCE_ID,
PX_APP_LCM_OP_OCC_ID,
PX_APP_ID,
INSTANTIATE,
m_grant_request_link(
m_link_type(PX_APP_LCM_OP_OCC_ID_URI),
m_link_type(PX_APP_INSTANCE_ID_URI)
),
{
m_resource_definition(
"", // TODO
-,
{ "" }, // TODO
m_resource_definition_resource(
m_vim_connection_info(
"", // TODO
"" // TODO
),
"" // TODO
))
}
))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_grant_response(
mw_grant
))))) -> value v_response {
tc_ac.stop;
p_grant := v_response.response.body.json_body.grantResponse;
log("f_create_grant_request: INFO: IUT successfully responds to the GrantRequest: ", p_grant);
}
[] tc_ac.timeout {
log("f_create_grant_request: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_create_grant_request
function f_delete_grant_request(
out Json.String p_grant_id
) runs on HttpComponent {
// Local variables
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(p_grant_id)),
v_headers
)));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_delete_grant_request: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_delete_grant_request
function f_create_package_management(
out AppPkgInfo p_app_pkg_info,
in boolean p_onboarded := false
) runs on HttpComponent {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_MEO_PKGM_URI,
v_headers,
m_http_message_body_json(
m_body_json_create_package_management(
m_create_package_management(
PX_APP_PKG_NAME,
PX_APP_PKG_VERSION,
m_checksum(-, PX_CHECKSUM),
PX_APP_PKG_PATH
))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_app_pkg_info(
mw_app_pkg_info(
-, -,
PX_APP_PKG_NAME,
PX_APP_PKG_VERSION,
-,
mw_checksum
)))))) -> value v_response {
tc_ac.stop;
p_app_pkg_info := v_response.response.body.json_body.appPkgInfo;
log("f_create_package_management: INFO: IUT successfully responds to the CreateAppPkg: ", p_app_pkg_info);
}
[] tc_ac.timeout {
log("f_create_package_management: INCONC: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_create_package_management
function f_delete_package_management(
in Json.String p_pkg_info_id
) runs on HttpComponent {
// Local variables
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_MEO_PKGM_URI & oct2char(unichar2oct(p_pkg_info_id)),
v_headers
)));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_delete_package_management: INCONC: Expected message not received");
}
} // End of 'alt' statement
} // End of function f_delete_package_management
function f_create_app_pkg_subscription(
out AppPkgSubscriptionInfo p_app_pkg_subscription_info,
in charstring p_uri := PX_MEO_PKGM_SUBS,
in Json.AnyURI p_callback_uri := PX_CALLBACK_URI
) runs on HttpComponent {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & p_uri,
v_headers,
m_http_message_body_json(
m_body_json_pkgm_subscription(
m_app_pkg_info_subscription(
p_callback_uri
))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_pkgm_subscription_info(
mw_app_pkg_subscription_info(
-,
-,
PX_CALLBACK_URI
)))))) -> value v_response {
tc_ac.stop;
p_app_pkg_subscription_info := v_response.response.body.json_body.appPkgSubscriptionInfo;
log("f_create_app_pkg_subscription: INFO: IUT responds to the AppPkgSubscriptionInfo: ", p_app_pkg_subscription_info);
}
[] tc_ac.timeout {
log("f_create_app_pkg_subscription: INCONC: Expected message not received ***");
}
} // End of 'alt' statement
} // End of function f_create_app_pkg_subscription
function f_delete_app_pkg_subscription(
in Json.String p_id
) runs on HttpComponent {
// Local variables
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_MEO_PKGM_SUBS & oct2char(unichar2oct(p_id)),
v_headers
)));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_delete_app_pkg_subscription: INCONC: Expected message not received ***");
}
} // End of 'alt' statement
} // End of function f_delete_app_pkg_subscription
function f_create_app_instance(
out AppPkgInfo p_app_pkg_info,
out AppInstanceInfo p_app_instance_info
) runs on HttpComponent {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
f_create_package_management(p_app_pkg_info);
if (not(isbound(p_app_pkg_info))) {
log("f_create_app_instance: Failed to create pkg");
return;
}
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_APP_LCM_URI,
v_headers,
m_http_message_body_json(
m_body_json_create_app_instance_request(
m_create_app_instance_request(
p_app_pkg_info.appDId,
p_app_pkg_info.appName & "_1"
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_app_instance_info(
mw_app_instance_info(
-,
p_app_pkg_info.appDId
)))))) -> value v_response {
tc_ac.stop;
p_app_instance_info := v_response.response.body.json_body.appInstanceInfo;
log("f_create_app_pkg_subscription: INFO: IUT responds to the AppInstanceInfo: ", p_app_instance_info);
}
[] tc_ac.timeout {
log("f_create_app_pkg_subscription: : INCONC: Expected message not received ***");
}
} // End of 'alt' statement
} // End of function f_create_app_instance
function f_delete_app_instance(
in Json.String p_app_pkg_info_id,
in Json.String p_app_instance_info_id
) runs on HttpComponent {
// Local variables
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(p_app_instance_info_id)),
v_headers
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_delete_app_instance: : INCONC: Expected message not received ***");
}
} // End of 'alt' statement
f_delete_package_management(p_app_pkg_info_id);
} // End of function f_delete_app_instance
function f_instanciate_app_instance(
out AppPkgInfo p_app_pkg_info,
out AppInstanceInfo p_app_instance_info,
out charstring p_app_lcm_op_occ_id
) runs on HttpComponent {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
var AppPkgInfo v_app_pkg_info;
var AppInstanceInfo v_app_instance_info;
f_create_app_instance(v_app_pkg_info, v_app_instance_info);
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate",
v_headers,
m_http_message_body_json(
m_body_json_instantiate_app_request(
m_instantiate_app_request(
m_selected_mec_host_info(
{
{ key_name := PX_ONBOARD_HOSTID_NAME, key_value := { universal charstring := PX_ONBOARD_HOSTID_VALUE } }
}
)))))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_202_accepted
)) -> value v_response {
tc_ac.stop;
var charstring_list v_header_value;
if (f_check_headers(v_response.response.header)) {
f_get_header(v_response.response.header, "Location", v_header_value);
p_app_lcm_op_occ_id := regexp(
v_header_value[0],
PX_MEX_LCM_OP_OCC_URI & "/(?*)",
0
);
log("f_instanciate_app_instance: IUT successfully responds with the correct header Location ", p_app_lcm_op_occ_id);
}
}
[] tc_ac.timeout {
log("f_instanciate_app_instance: INCONC: Expected message not received ***");
}
} // End of 'alt' statement
} // End of function f_instanciate_app_instance
function f_terminate_app_instance(
in Json.String p_app_pkg_info_id,
in Json.String p_app_instance_info_id
) runs on HttpComponent {
// Local variables
var Headers v_headers;
var AppPkgInfo v_app_pkg_info;
var AppInstanceInfo v_app_instance_info;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_APP_LCM_URI & oct2char(unichar2oct(v_app_instance_info.id)) & "instantiate",
v_headers,
m_http_message_body_json(
m_body_json_terminate_app_request(
m_terminate_app_request
)))));
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_202_accepted
)) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_terminate_app_instance: INCONC: Expected message not received ***");
}
} // End of 'alt' statement
f_delete_app_instance(p_app_pkg_info_id, p_app_instance_info_id);
} // End of function f_terminate_app_instance
function f_create_app_instance_subscription(
out AppInstSubscriptionInfo p_app_inst_subscription_info
) runs on HttpComponent {
// Local variables
var Headers v_headers;
var HttpMessage v_response;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_MEX_LCM_SUBS,
v_headers,
m_http_message_body_json(
m_body_json_app_inst_subscription_request(
m_app_inst_subscription_request(
PX_APP_INST_SUBSCRIPTION_REQUEST, // Wrong subscription request
PX_CALLBACK_URI
))))));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_app_inst_subscription_info(
mw_app_inst_subscription_info(
-,
PX_APP_INST_SUBSCRIPTION_REQUEST,
PX_CALLBACK_URI
)))))) -> value v_response {
tc_ac.stop;
p_app_inst_subscription_info := v_response.response.body.json_body.appInstSubscriptionInfo;
log("f_create_app_pkg_subscription: IUT responds to the AppInstSubscriptionInfo: ", p_app_inst_subscription_info);
}
[] tc_ac.timeout {
log("f_create_app_pkg_subscription: Expected message not received ***");
}
} // End of 'alt' statement
} // End of function f_create_app_instance_subscription
function f_delete_app_instance_subscription(
in Json.String p_id
) runs on HttpComponent {
// Local variables
var Headers v_headers;
f_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_MEX_LCM_SUBS & oct2char(unichar2oct(p_id)),
v_headers
)));
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
))) {
tc_ac.stop;
}
[] tc_ac.timeout {
log("f_create_app_pkg_subscription: Expected message not received ***");
}
} // End of 'alt' statement
} // End of function f_delete_app_instance_subscription
} // End of ApplicationPackageLifecycleAndOperationGrantingAPI_Functions
module ApplicationPackageLifecycleAndOperationGrantingAPI_Pics {
modulepar boolean PICS_IUT_MEO := true;
modulepar boolean PICS_IUT_MEPM := false;
modulepar boolean PICS_IUT_MEX := false;
/**
* @desc Does the IUT support GRANT?
*/
......
......@@ -12,44 +12,75 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits {
modulepar Json.String PX_APP_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c";
modulepar OperationType PX_APP_OPERATION := INSTANTIATE;
modulepar OperationType PX_APP_OPERATION := OPERATE;
modulepar OperationType PX_APP_OPERATION_ERROR := INSTANTIATE;
modulepar Json.String PX_APP_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"
modulepar Json.String PX_APP_NON_EXISTANT_LCM_OP_OCC_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c"
modulepar Json.AnyURI PX_APP_LCM_OP_OCC_ID_URI := "/app_lcm/v1/app_lcm_op_occs/5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1c";
modulepar Json.AnyURI PX_APP_INSTANCE_ID_URI := "";
modulepar Json.String PX_GRANTING_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3";
modulepar Json.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID";
modulepar Json.String PX_TRAFFIC_RULE_ID := "PX_TRAFFIC_RULE_ID";
modulepar FilterType PX_TRAFFIC_FILTERTYPE := FLOW;
modulepar Json.Integer PX_TRAFFIC_RULE_PRIORITY := 0;
modulepar Action PX_TRAFFIC_RULE_ACTION := PASSTHROUGH;
modulepar Json.String PX_TRAFFIC_FILTER_SRC_ADDRESS := "";
modulepar Json.String PX_TRAFFIC_FILTER_DST_ADDRESS := "";
modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME"
modulepar Json.String PX_TRAFFIC_FILTER_SRC_PORT := "12345";
modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION"
modulepar Json.String PX_TRAFFIC_FILTER_DST_PORT := "12346";
modulepar Json.String PX_CHECKSUM := "CHECKSUM"
modulepar Json.String PX_TRAFFIC_FILTER_PROTOCOL := "";
modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH"
modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME";
modulepar OperationalState PX_OPERATIONAL_STATE := STARTED
modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION";
modulepar UsageState PX_USAGE_STATE := NOT_IN_USE
modulepar Json.String PX_CHECKSUM := "CHECKSUM";
modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"
modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH";
modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"
modulepar OperationalState PX_OPERATIONAL_STATE := STARTED;
modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID"
modulepar UsageState PX_USAGE_STATE := NOT_IN_USE;
modulepar Json.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID"
modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f";
modulepar Json.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback"
modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f";
modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"
modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID";
modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"
modulepar Json.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID";
modulepar Json.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback";
modulepar Json.String PX_APP_INST_SUBSCRIPTION_REQUEST := "AppInstSubscriptionRequest";
// AppLcmOpOccSubscriptionRequest
// AppInstIdCreationSubscriptionRequest
// AppInstIdDeletionSubscriptionRequest
modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3";
modulepar Json.String PX_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID";
modulepar Json.AnyURI PX_APP_PKG_HREF := "";
modulepar Json.String PX_ONBOARD_HOSTID_NAME := "";
modulepar Json.String PX_ONBOARD_HOSTID_VALUE := "";
} // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Pixits
......@@ -3,10 +3,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
// JSON
import from Json all;
// LibMec_EdgePlatformApplicationEnablementAPI
// LibMec
import from LibMec_TypesAndValues all;
// LibMec/LibMec_EdgePlatformApplicationEnablementAPI
import from EdgePlatformApplicationEnablementAPI_TypesAndValues all;
// LibMec_ApplicationMobilityServiceAPI
// LibMec/LibMec_ApplicationMobilityServiceAPI
import from ApplicationMobilityServiceAPI_TypesAndValues all;
// LibMec_ApplicationPackageLifecycleAndOperationGrantingAPI
......@@ -15,18 +18,19 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
group granting {
template (value) GrantRequest m_grant_request(
template (omit) GrantRequest m_grant_request(
in String p_app_instance_id := PX_APP_INSTANCE_ID,
in String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID,
in String p_appDId := PX_APP_ID,
in OperationType p_operation := PX_APP_OPERATION,
in template (value) GrantRequest_Link p_links
in template (value) GrantRequest_Link p_links,
in template (omit) ResourceDefinitions p_addResources := omit
) := {
appInstanceId := p_app_instance_id,
appLcmOpOccId := p_appLcmOpOccId,
appDId := p_appDId,
operation := p_operation,
addResources := omit,
addResources := p_addResources,
tempResources := omit,
updateResources := omit,
additionalParams := omit,
......@@ -54,7 +58,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
template (present) Grant mw_grant(
template (present) String p_id := ?,
template (present) String p_app_instance_id := PX_APP_INSTANCE_ID,
template (present) String p_appLcmOpOccId := ?,
template (present) String p_appLcmOpOccId := PX_APP_LCM_OP_OCC_ID,
template (present) Grant_Link p_links := ?
) := {
id := p_id,
......@@ -101,6 +105,82 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
href := p_href
} // End of template mw_link_type
template (omit) ResourceDefinition m_resource_definition(
in Json.String p_id,
in ResourceDefinition_Type p_type_ := OSCONTAINER,
in template (value) ResourceTemplateId p_resourceTemplateId,
in template (value) ResourceDefinition_Resource p_resource,
in template (omit) Json.String p_vduId := omit
) := {
id := p_id,
type_ := p_type_,
vduId := p_vduId,
resourceTemplateId := p_resourceTemplateId,
resource := p_resource
} // End of template m_resource_definition
template (present) ResourceDefinition mw_resource_definition(
template (present) Json.String p_id := ?,
template (present) ResourceDefinition_Type p_type_ := ?,
template (present) ResourceTemplateId p_resourceTemplateId := ?,
template (present) ResourceDefinition_Resource p_resource := ?,
template Json.String p_vduId := *
) := {
id := p_id,
type_ := p_type_,
vduId := p_vduId,
resourceTemplateId := p_resourceTemplateId,
resource := p_resource
} // End of template mw_resource_definition
template (value) ResourceDefinition_Resource m_resource_definition_resource(
in template (value) VimConnectionInfo p_vimConnectionInfo,
in Json.String p_resourceId
) := {
vimConnectionInfo := p_vimConnectionInfo,
resourceId := p_resourceId
} // End of template m_resource_definition_resource
template (present) ResourceDefinition_Resource mw_resource_definition_resource(
template (present) VimConnectionInfo p_vimConnectionInfo := ?,
template (present) Json.String p_resourceId := ?
) := {
vimConnectionInfo := p_vimConnectionInfo,
resourceId := p_resourceId
} // End of template mw_resource_definition_resource
template (omit) VimConnectionInfo m_vim_connection_info(
in Json.String p_id,
in Json.String p_vimType,
in template (omit) Json.String p_vimId := omit,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_interfaceInfo := omit,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_accessInfo := omit,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_extra := omit
) := {
id := p_id,
vimId := p_vimId,
vimType := p_vimType,
interfaceInfo := p_interfaceInfo,
accessInfo := p_accessInfo,
extra := p_extra
} // End of template m_vim_connection_info
template (present) VimConnectionInfo mw_vim_connection_info(
template (present) Json.String p_id := ?,
template (present) Json.String p_vimType := ?,
template Json.String p_vimId := *,
template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_interfaceInfo := *,
template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_accessInfo := *,
template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_extra := *
) := {
id := p_id,
vimId := p_vimId,
vimType := p_vimType,
interfaceInfo := p_interfaceInfo,
accessInfo := p_accessInfo,
extra := p_extra
} // End of template mw_vim_connection_info
} // End of group granting
group pkgmgt {
......@@ -133,18 +213,52 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
appPkgPath := p_appPkgPath
} // End of template mw_create_package_management
template (omit) AppPkgInfo m_app_pkg_info(
in template (value) Json.String p_id,
in template (value) Json.String p_appDId,
in template (value) Json.String p_appName,
in template (value) Json.String p_appSoftwareVersion,
in template (value) Json.String p_appDVersion,
in template (value) Checksum p_checksum,
in template (value) AppPkgSWImageInfo p_softwareImages,
in template (value) OnboardingState p_onboardingState,
in template (value) AppPkgInfo_OperationalState p_operationalState,
in template (value) UsageState p_usageState,
in template (value) AppPkgInfo_MecInfo p_mecInfo,
in template (value) AppPkgInfo_Links p_links,
in template (omit) Json.String p_appProvider := omit
) := {
id := p_id,
appDId := p_appDId,
appProvider := p_appProvider,
appName := p_appName,
appSoftwareVersion := p_appSoftwareVersion,
appDVersion := p_appDVersion,
checksum := p_checksum,
signingCertificate := omit,
softwareImages := p_softwareImages,
additionalArtifacts := omit,
onboardingState := p_onboardingState,
operationalState := p_operationalState,
usageState := p_usageState,
mecInfo := p_mecInfo,
userDefinedData := omit,
onboardingFailureDetails := omit,
links := p_links
} // End of template m_app_pkg_info
template (present) AppPkgInfo mw_app_pkg_info(
template (present) Json.String p_id:= ?,
template (present) Json.String p_appDId:= ?,
template (present) Json.String p_appName:= ?,
template (present) Json.String p_appSoftwareVersion:= ?,
template (present) Json.String p_appDVersion:= ?,
template (present) Checksum p_checksum:= ?,
template (present) AppPkgSWImageInfo p_softwareImages:= ?,
template (present) OnboardingState p_onboardingState:= ?,
template (present) AppPkgInfo_OperationalState p_operationalState:= ?,
template (present) UsageState p_usageState:= ?,
template (present) AppPkgInfo_MecInfo p_mecInfo:= ?,
template (present) Json.String p_id := ?,
template (present) Json.String p_appDId := ?,
template (present) Json.String p_appName := ?,
template (present) Json.String p_appSoftwareVersion := ?,
template (present) Json.String p_appDVersion := ?,
template (present) Checksum p_checksum := ?,
template (present) AppPkgSWImageInfo p_softwareImages := ?,
template (present) OnboardingState p_onboardingState := ?,
template (present) AppPkgInfo_OperationalState p_operationalState := ?,
template (present) UsageState p_usageState := ?,
template (present) AppPkgInfo_MecInfo p_mecInfo := ?,
template (present) AppPkgInfo_Links p_links := ?
) := {
id := p_id,
......@@ -232,7 +346,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
template (present) Json.String p_id := ?,
template (present) Json.String p_notificationType := ?,
template (present) Json.String p_subscriptionId := ?,
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TimeStamp p_timeStamp := ?,
template (present) TimeStamp p_timeStamp := ?,
template (present) Json.String p_appPkgId := ?,
template (present) Json.String p_appDId := ?,
template (present) AppPkgInfo_OperationalState p_operationalState := ?,
......@@ -260,19 +374,63 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
self_ := { href := p_href }
} // End of template mw_app_pkg_link
template (value) AppPkgSubscriptionLinkList m_app_pkg_ubscription_link_list(
in template (value) AppPkgSubscriptionLinkList_Link p_links
) := {
links := p_links
} // End of template m_app_pkg_ubscription_link_list
template (present) AppPkgSubscriptionLinkList mw_app_pkg_ubscription_link_list(
template (present) AppPkgSubscriptionLinkList_Link p_links := ?
) := {
links := p_links
} // End of template mw_app_pkg_ubscription_link_list
template (omit) AppPkgSubscriptionLinkList_Link m_app_pkg_subscription_link_list_link(
in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self_,
in template (omit) AppPkgSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit
) := {
self_ := p_self_,
subscriptions := p_subscriptions
} // End of template m_app_pkg_subscription_link_list_link
template (present) AppPkgSubscriptionLinkList_Link mw_app_pkg_subscription_link_list_link(
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self_ := ?,
template AppPkgSubscriptionLinkList_Link_Subscriptions p_subscriptions := *
) := {
self_ := p_self_,
subscriptions := p_subscriptions
} // End of template mw_app_pkg_subscription_link_list_link
template (value) AppPkgSubscriptionLinkList_Link_Subscription m_app_pkg_subscription_link_list_link_subscription(
in Json.AnyURI p_href,
in AppPkgSubscriptionType p_subscriptionType
) := {
href := p_href,
subscriptionType := p_subscriptionType
} // End of template m_app_pkg_subscription_link_list_link_subscription
template (present) AppPkgSubscriptionLinkList_Link_Subscription mw_app_pkg_subscription_link_list_link_subscription(
template (present) Json.AnyURI p_href := ?,
template (present) AppPkgSubscriptionType p_subscriptionType := ?
) := {
href := p_href,
subscriptionType := p_subscriptionType
} // End of template mw_app_pkg_subscription_link_list_link_subscription
} // End of group pkgmgt
group mepm_lifcyclemgt {
template (omit) ConfigPlatformForAppRequest m_config_platform_for_app_request(
in template (value) ServiceDependency p_appServiceRequired,
in template (omit) ServiceDependency p_appServiceOptional := omit,
in template (omit) ServiceDependency p_appServiceProduced := omit,
in template (omit) FeatureDependency p_appFeatureRequired := omit,
in template (omit) FeatureDependency p_appFeatureOptional := omit,
in template (omit) TransportDependency p_transportDependencies := omit,
in template (omit) TrafficRuleDescriptor p_appTrafficRule := omit,
in template (omit) DNSRuleDescriptor p_appDNSRule := omit,
in template (value) ServiceDependencies p_appServiceRequired,
in template (omit) ServiceDependencies p_appServiceOptional := omit,
in template (omit) ServiceDependencies p_appServiceProduced := omit,
in template (omit) FeatureDependencies p_appFeatureRequired := omit,
in template (omit) FeatureDependencies p_appFeatureOptional := omit,
in template (omit) TransportDependencies p_transportDependencies := omit,
in template (omit) TrafficRuleDescriptors p_appTrafficRule := omit,
in template (omit) DNSRuleDescriptors p_appDNSRule := omit,
in template (omit) LatencyDescriptor p_appLatency := omit,
in template (omit) UserContextTransferCapability p_userContextTransferCapability := omit,
in template (omit) AppNetworkPolicy p_appNetworkPolicy := omit
......@@ -291,14 +449,14 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
} // End of template m_config_platform_for_app_request
template (present) ConfigPlatformForAppRequest mw_config_platform_for_app_request(
template (present) ServiceDependency p_appServiceRequired := ?,
template ServiceDependency p_appServiceOptional := *,
template ServiceDependency p_appServiceProduced := *,
template FeatureDependency p_appFeatureRequired := *,
template FeatureDependency p_appFeatureOptional := *,
template TransportDependency p_transportDependencies := *,
template TrafficRuleDescriptor p_appTrafficRule := *,
template DNSRuleDescriptor p_appDNSRule := *,
template (present) ServiceDependencies p_appServiceRequired := ?,
template ServiceDependencies p_appServiceOptional := *,
template ServiceDependencies p_appServiceProduced := *,
template FeatureDependencies p_appFeatureRequired := *,
template FeatureDependencies p_appFeatureOptional := *,
template TransportDependencies p_transportDependencies := *,
template TrafficRuleDescriptors p_appTrafficRule := *,
template DNSRuleDescriptors p_appDNSRule := *,
template LatencyDescriptor p_appLatency := *,
template UserContextTransferCapability p_userContextTransferCapability := *,
template AppNetworkPolicy p_appNetworkPolicy := *
......@@ -344,6 +502,178 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
requestedPermissions := p_requestedPermissions
} // End of template mw_service_dependency
template (value) FeatureDependency m_feature_dependency(
in Json.String p_featureName,
in Json.String p_version
) := {
featureName := p_featureName,
version := p_version
} // End of template m_feature_dependency
template (present) FeatureDependency mw_feature_dependency(
template (present) Json.String p_featureName := ?,
template (present) Json.String p_version := ?
) := {
featureName := p_featureName,
version := p_version
} // End of template mw_feature_dependency
template (value) TransportDependency m_transport_dependency(
in template (value) TransportDescriptor p_transport,
in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType p_serializers,
in template (value) Labels p_labels
) := {
transport := p_transport,
serializers := p_serializers,
labels := p_labels
} // End of template m_transport_dependency
template (present) TransportDependency mw_transport_dependency(
template (present) TransportDescriptor p_transport := ?,
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType p_serializers := ?,
template (present) Labels p_labels := ?
) := {
transport := p_transport,
serializers := p_serializers,
labels := p_labels
} // End of template mw_transport_dependency
template (omit) TransportDescriptor m_transport_descriptor(
in Json.String p_name,
in ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType p_type_ := REST_HTTP,
in Json.String p_protocol,
in Json.String p_version,
in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo p_security,
in template (omit) Json.String p_description := omit,
in template (omit) Json.String p_implSpecificInfo := omit
) := {
name := p_name,
description := p_description,
type_ := p_type_,
protocol := p_protocol,
version := p_version,
security := p_security,
implSpecificInfo := p_implSpecificInfo
} // End of template m_transport_descriptor
template (present) TransportDescriptor mw_transport_descriptor(
template (present) Json.String p_name := ?,
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType p_type_ := ?,
template (present) Json.String p_protocol := ?,
template (present) Json.String p_version := ?,
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo p_security := ?,
template Json.String p_description := *,
template Json.String p_implSpecificInfo := *
) := {
name := p_name,
description := p_description,
type_ := p_type_,
protocol := p_protocol,
version := p_version,
security := p_security,
implSpecificInfo := p_implSpecificInfo
} // End of template mw_transport_descriptor
template (omit) TrafficRuleDescriptor m_traffic_rule_descriptor(
in template (value) Json.String p_trafficRuleId,
in template (value) FilterType p_filterType,
in template (value) Json.Integer p_priority,
in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter p_trafficFilter,
in template (value) Action p_action,
in template (omit) InterfaceDescriptor p_dstInterface := omit
) := {
trafficRuleId := p_trafficRuleId,
filterType := p_filterType,
priority := p_priority,
trafficFilter := p_trafficFilter,
action_ := p_action,
dstInterface := p_dstInterface
} // End of template m_traffic_rule_descriptor
template (present) TrafficRuleDescriptor mw_traffic_rule_descriptor(
template (present) Json.String p_trafficRuleId := ?,
template (present) FilterType p_filterType := ?,
template (present) Json.Integer p_priority := ?,
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter p_trafficFilter := ?,
template (present) Action p_action := ?,
template InterfaceDescriptor p_dstInterface := *
) := {
trafficRuleId := p_trafficRuleId,
filterType := p_filterType,
priority := p_priority,
trafficFilter := p_trafficFilter,
action_ := p_action,
dstInterface := p_dstInterface
} // End of template mw_traffic_rule_descriptor
template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter m_traffic_filter(
in template (omit) Json.String p_srcAddress := omit,
in template (omit) Json.String p_dstAddress := omit,
in template (omit) Json.String p_srcPort := omit,
in template (omit) Json.String p_dstPort := omit,
in template (omit) Json.String p_protocol := omit,
in template (omit) Json.String p_tag := omit,
in template (omit) Json.String p_uri := omit,
in template (omit) Json.String p_packetLabel := omit,
in template (omit) Json.String p_srcTunnelAddress := omit,
in template (omit) Json.String p_tgtTunnelAddress := omit,
in template (omit) Json.String p_srcTunnelPort := omit,
in template (omit) Json.String p_dstTunnelPort := omit,
in template (omit) Json.Integer p_qCI := omit,
in template (omit) Json.Integer p_dSCP := omit,
in template (omit) Json.Integer p_tC := omit
) :={
srcAddress := p_srcAddress,
dstAddress := p_dstAddress,
srcPort := p_srcPort,
dstPort := p_dstPort,
protocol := p_protocol,
tag := p_tag,
uri := p_uri,
packetLabel := p_packetLabel,
srcTunnelAddress := p_srcTunnelAddress,
tgtTunnelAddress := p_tgtTunnelAddress,
srcTunnelPort := p_srcTunnelPort,
dstTunnelPort := p_dstTunnelPort,
qCI := p_qCI,
dSCP := p_dSCP,
tC := p_tC
} // End of template m_traffic_filter
template ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TrafficFilter mw_traffic_filter(
template Json.String p_srcAddress := *,
template Json.String p_dstAddress := *,
template Json.String p_srcPort := *,
template Json.String p_dstPort := *,
template Json.String p_protocol := *,
template Json.String p_tag := *,
template Json.String p_uri := *,
template Json.String p_packetLabel := *,
template Json.String p_srcTunnelAddress := *,
template Json.String p_tgtTunnelAddress := *,
template Json.String p_srcTunnelPort := *,
template Json.String p_dstTunnelPort := *,
template Json.Integer p_qCI := *,
template Json.Integer p_dSCP := *,
template Json.Integer p_tC := *
) :={
srcAddress := p_srcAddress,
dstAddress := p_dstAddress,
srcPort := p_srcPort,
dstPort := p_dstPort,
protocol := p_protocol,
tag := p_tag,
uri := p_uri,
packetLabel := p_packetLabel,
srcTunnelAddress := p_srcTunnelAddress,
tgtTunnelAddress := p_tgtTunnelAddress,
srcTunnelPort := p_srcTunnelPort,
dstTunnelPort := p_dstTunnelPort,
qCI := p_qCI,
dSCP := p_dSCP,
tC := p_tC
} // End of template mw_traffic_filter
} // End of group mepm_lifcyclemgt
group mex_lifcyclemgt {
......@@ -472,6 +802,286 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
configure_platform_for_app := p_configure_platform_for_app
} // End of template mw_link
template (omit) InstantiateAppRequest m_instantiate_app_request(
in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation p_selectedMECHostInfo,
in template (omit) VirtualComputeDescriptor p_virtualComputeDescriptor := omit,
in template (omit) OsContainerDescriptors p_osContainerDescriptor := omit,
in template (omit) VirtualStorageDescriptor p_virtualStorageDescriptor := omit,
in template (omit) LocationConstraints p_locationConstraints := omit,
in template (omit) VimConnectionInfos p_vimConnectionInfo := omit,
in template (omit) AppTermCandsForCoord p_appTermCandsForCoord := omit
) :={
virtualComputeDescriptor := p_virtualComputeDescriptor,
osContainerDescriptor := p_osContainerDescriptor,
virtualStorageDescriptor := p_virtualStorageDescriptor,
selectedMECHostInfo := p_selectedMECHostInfo,
locationConstraints := p_locationConstraints,
vimConnectionInfo := p_vimConnectionInfo,
appTermCandsForCoord := p_appTermCandsForCoord
} // End of template m_instantiate_app_request
template (present) InstantiateAppRequest mw_instantiate_app_request(
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation p_selectedMECHostInfo := ?,
template VirtualComputeDescriptor p_virtualComputeDescriptor := *,
template OsContainerDescriptors p_osContainerDescriptor := *,
template VirtualStorageDescriptor p_virtualStorageDescriptor := *,
template LocationConstraints p_locationConstraints := *,
template VimConnectionInfos p_vimConnectionInfo := *,
template AppTermCandsForCoord p_appTermCandsForCoord := *
) :={
virtualComputeDescriptor := p_virtualComputeDescriptor,
osContainerDescriptor := p_osContainerDescriptor,
virtualStorageDescriptor := p_virtualStorageDescriptor,
selectedMECHostInfo := p_selectedMECHostInfo,
locationConstraints := p_locationConstraints,
vimConnectionInfo := p_vimConnectionInfo,
appTermCandsForCoord := p_appTermCandsForCoord
} // End of template mw_instantiate_app_request
template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation m_selected_mec_host_info(
in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_hostId,
in template (omit) Json.String p_hostName := omit
) := {
hostName := p_hostName,
hostId := p_hostId
} // End of template m_selected_mec_host_info
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.MECHostInformation mw_selected_mec_host_info(
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.KeyValuePairs p_hostId := ?,
template Json.String p_hostName := *
) := {
hostName := p_hostName,
hostId := p_hostId
} // End of template mw_selected_mec_host_info
template (omit) TerminateAppRequest m_terminate_app_request(
in TerminationType p_termination_type := GRACEFUL,
in template (omit) Json.UInteger p_graceful_termination_timeout := omit
) := {
terminationType := p_termination_type,
gracefulTerminationTimeout := p_graceful_termination_timeout
} // End of template m_terminate_app_request
template (present) TerminateAppRequest mw_terminate_app_request(
template (present) TerminationType p_termination_type := ?,
template Json.UInteger p_graceful_termination_timeout := *
) := {
terminationType := p_termination_type,
gracefulTerminationTimeout := p_graceful_termination_timeout
} // End of template mw_terminate_app_request
template (omit) OperateAppRequest m_operate_app_request(
in OperationalState p_change_state_to := STOPPED,
in template (omit) StopType p_stop_type := omit,
in template (omit) Json.UInteger p_graceful_stop_timeout := omit
) := {
changeStateTo := p_change_state_to,
stopType := p_stop_type,
gracefulStopTimeout := p_graceful_stop_timeout
} // End of template m_operate_app_request
template (present) OperateAppRequest mw_operate_app_request(
template (present) OperationalState p_change_state_to := STOPPED,
template StopType p_stop_type := *,
template Json.UInteger p_graceful_stop_timeout := *
) := {
changeStateTo := p_change_state_to,
stopType := p_stop_type,
gracefulStopTimeout := p_graceful_stop_timeout
} // End of template mw_operate_app_request
template (omit) AppLcmOpOcc m_app_lcm_op_occ(
in Json.String p_id,
in OperationState p_operationState,
in template (value) TimeStamp p_stateEnteredTime,
in template (value) TimeStamp p_startTime,
in OperationType p_lcmOperation,
in template (value) AppLcmOpOcc_Link p_links,
in template (omit) OperationParams p_operationParams := omit,
in template (omit) Json.Bool p_isCancelPending := omit,
in template (omit) CancelMode p_cancelMode := omit
) := {
id := p_id,
operationState := p_operationState,
stateEnteredTime := p_stateEnteredTime,
startTime := p_startTime,
lcmOperation := p_lcmOperation,
operationParams := p_operationParams,
isCancelPending := p_isCancelPending,
cancelMode := p_cancelMode,
links := p_links
} // End of template m_app_lcm_op_occ
template (present) AppLcmOpOcc mw_app_lcm_op_occ(
template (present) Json.String p_id := ?,
template (present) OperationState p_operationState := ?,
template (present) TimeStamp p_stateEnteredTime := ?,
template (present) TimeStamp p_startTime := ?,
template (present) OperationType p_lcmOperation := ?,
template (present) AppLcmOpOcc_Link p_links := ?,
template OperationParams p_operationParams := *,
template Json.Bool p_isCancelPending := *,
template CancelMode p_cancelMode := *
) := {
id := p_id,
operationState := p_operationState,
stateEnteredTime := p_stateEnteredTime,
startTime := p_startTime,
lcmOperation := p_lcmOperation,
operationParams := p_operationParams,
isCancelPending := p_isCancelPending,
cancelMode := p_cancelMode,
links := p_links
} // End of template mw_app_lcm_op_occ
template (value) AppLcmOpOcc_Link m_app_lcm_op_occ_link(
in Json.AnyURI p_href,
in Json.AnyURI p_app_instance
) := {
self_ := { href := p_href },
appInstance := { href := p_app_instance }
} // End of template m_app_lcm_op_occ_link
template (present) AppLcmOpOcc_Link mw_app_lcm_op_occ_link(
template (present) Json.AnyURI p_href := ?,
template (present) Json.AnyURI p_app_instance := ?
) := {
self_ := { href := p_href },
appInstance := { href := p_app_instance }
} // End of template mw_app_lcm_op_occ_link
template (omit) AppInstSubscriptionRequest m_app_inst_subscription_request(
in Json.String p_subscriptionType,
in Json.AnyURI p_callbackUri,
in template (omit) AppInstanceState p_appInstanceState := omit,
in template (omit) AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := omit
) := {
subscriptionType := p_subscriptionType,
callbackUri := p_callbackUri,
appInstanceState := p_appInstanceState,
appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter
} // End of template m_app_inst_subscription_request
template (present) AppInstSubscriptionRequest mw_app_inst_subscription_request(
template (present) Json.String p_subscriptionType := ?,
template (present) Json.AnyURI p_callbackUri := ?,
template AppInstanceState p_appInstanceState := *,
template AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := *
) := {
subscriptionType := p_subscriptionType,
callbackUri := p_callbackUri,
appInstanceState := p_appInstanceState,
appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter
} // End of template mw_app_inst_subscription_request
template (omit) AppInstSubscriptionInfo m_app_inst_subscription_info(
in Json.String p_id,
in Json.String p_subscriptionType,
in Json.AnyURI p_callbackUri,
in template (value) AppInstSubscriptionInfo_Link p_links,
in template (omit) AppInstanceState p_appInstanceState := omit,
in template (omit) AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := omit
) := {
id := p_id,
subscriptionType := p_subscriptionType,
appInstanceState := p_appInstanceState,
appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter,
callbackUri := p_callbackUri,
links := p_links
} // End of template m_app_inst_subscription_info
template (present) AppInstSubscriptionInfo mw_app_inst_subscription_info(
template (present) Json.String p_id := ?,
template (present) Json.String p_subscriptionType := ?,
template (present) Json.AnyURI p_callbackUri := ?,
template (present) AppInstSubscriptionInfo_Link p_links := ?,
template AppInstanceState p_appInstanceState := *,
template AppInstanceSubscriptionFilter p_appInstanceSubscriptionFilter := *
) := {
id := p_id,
subscriptionType := p_subscriptionType,
appInstanceState := p_appInstanceState,
appInstanceSubscriptionFilter := p_appInstanceSubscriptionFilter,
callbackUri := p_callbackUri,
links := p_links
} // End of template mw_app_inst_subscription_info
template (value) AppInstanceSubscriptionLinkList m_app_instance_subscription_link_list(
in template (value) AppInstanceSubscriptionLinkList_Link p_links
) := {
links := p_links
} // End of template m_app_instance_subscription_link_list
template (present) AppInstanceSubscriptionLinkList mw_app_instance_subscription_link_list(
template (present) AppInstanceSubscriptionLinkList_Link p_links := ?
) := {
links := p_links
} // End of template mw_app_instance_subscription_link_list
template (omit) AppInstanceSubscriptionLinkList_Link m_app_instance_subscription_link_list_link(
in Json.AnyURI p_href,
in template (omit) AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := omit
) := {
self_ := { href := p_href },
subscriptions := p_subscriptions
} // End of template m_app_instance_subscription_link_list_link
template (present) AppInstanceSubscriptionLinkList_Link mw_app_instance_subscription_link_list_link(
template (present) Json.AnyURI p_href := ?,
template AppInstanceSubscriptionLinkList_Link_Subscriptions p_subscriptions := *
) := {
self_ := { href := p_href },
subscriptions := p_subscriptions
} // End of template mw_app_instance_subscription_link_list_link
template (omit) AppInstNotification m_app_inst_notification(
in Json.String p_id,
in ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.NotificationType p_notificationType,
in Json.String p_subscriptionId,
in template (value) TimeStamp p_timeStamp,
in Json.String p_appInstanceId,
in Json.String p_appPkgId,
in Json.String p_appDId,
in template (value) AppInstNotification_Links p_links,
in template (omit) AppInstanceState p_appInstanceState := omit,
in template (omit) LocationInformation p_appInstLocation := omit
) := {
id := p_id,
notificationType := p_notificationType,
appInstanceState := p_appInstanceState,
subscriptionId := p_subscriptionId,
timeStamp := p_timeStamp,
appInstanceId := p_appInstanceId,
appPkgId := p_appPkgId,
appDId := p_appDId,
appInstLocation := p_appInstLocation,
links := p_links
} // End of template m_app_inst_notification
template (present) AppInstNotification mw_app_inst_notification(
template (present) Json.String p_id := ?,
template (present) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.NotificationType p_notificationType := ?,
template (present) Json.String p_subscriptionId := ?,
template (present) TimeStamp p_timeStamp := ?,
template (present) Json.String p_appInstanceId := ?,
template (present) Json.String p_appPkgId := ?,
template (present) Json.String p_appDId := ?,
template (present) AppInstNotification_Links p_links := ?,
template AppInstanceState p_appInstanceState := *,
template LocationInformation p_appInstLocation := *
) := {
id := p_id,
notificationType := p_notificationType,
appInstanceState := p_appInstanceState,
subscriptionId := p_subscriptionId,
timeStamp := p_timeStamp,
appInstanceId := p_appInstanceId,
appPkgId := p_appPkgId,
appDId := p_appDId,
appInstLocation := p_appInstLocation,
links := p_links
} // End of template mw_app_inst_notification
} // End of group mex_lifcyclemgt
} // End of module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates
/**
* @author ETSI / TTF T012 / TTF T027
* @version $Url$
* $Id$
* @desc Types ANd Values for ETSI GS MEC 010-2 V3.2.1 (2023-06)
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*/
module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
// JSON
import from Json all;
// LibCommon
import from LibCommon_BasicTypesAndValues all;
// LibMec
import from LibMec_TypesAndValues all;
......@@ -15,8 +22,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
// LibMec_ApplicationMobilityServiceAPI
import from ApplicationMobilityServiceAPI_TypesAndValues all;
group application_descriptor_information_model {
/**
* @desc An application Descriptor (AppD) is a part of application package, and describes application requirements and rules required by application provider
* @member appDid Identifier of this MEC application descriptor. This attribute shall be globally unique
......@@ -28,7 +33,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @member appInfoName Human readable name for the MEC application
* @member appDescription Human readable description of the MEC application
* @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisation container used to realize this MEC application
* @member osContainerDescriptor Describes CPU, memory requirements and limits, and software images of the OS Containers realizing this MEC application corresponding to OS Containers sharing the same host and same network namespace
* @member swImageDescriptor Describes the descriptors of the software image to be used by the virtualisation container used to realize this MEC application
* @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the MEC application
* @member appExtCpd Describes external interface(s) exposed by this MEC application
* @member appServiceRequired Describes services a MEC application requires to run
* @member appServiceOptional Describes services a MEC application may use if available
......@@ -43,6 +50,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @member changeAppInstanceStateOpConfig Configuration parameters for the change application instance state operation
* @member userContextTransferCapability If the application supports the user context transfer capability
* @member appNetworkPolicy It represents the application network policy of carrying the application traffic
* @member mciopId Identifies the MCIOP in the application package, used in containerized workload management, when the application is realized by a set of OS containers
* @member mcioIdentificationData Name and type of the Managed Container Infrastructure Object (MCIO) that realizes this application. It allows the VNFM to identify the MCIO e.g. when querying the Container Infrastructure Service Management (CISM).
* @member logicalNode The logical node requirements
* @member requestAdditionalCapabilities Specifies requirements for additional capabilities. These can be for a range of purposes
* @member mcioConstraintParams The parameter names for constraints expected to be assigned to MCIOs realizing this application
* @see ETSI GS MEC 010-2 Clause 6.2.1.2.2
*/
type record AppD {
......@@ -54,22 +66,47 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String mecVersion,
Json.String appInfoName optional,
Json.String appDescription,
VirtualComputeDescriptor virtualComputeDescriptor,
SwImageDescriptor virtualStorageDescriptor optional,
AppExternalCpd appExtCpd optional,
ServiceDependency appServiceRequired optional,
ServiceDependency appServiceOptional optional,
ServiceDescriptor appServiceProduced optional,
FeatureDependency appFeatureRequired optional,
FeatureDependency appFeatureOptional optional,
TransportDependency transportDependencies optional,
TrafficRuleDescriptor appTrafficRule optional,
DNSRuleDescriptor appDNSRule optional,
VirtualComputeDescriptor virtualComputeDescriptor optional,
OsContainerDescriptors osContainerDescriptor optional,
SwImageDescriptors swImageDescriptor,
VirtualStorageDescriptors virtualStorageDescriptor optional,
AppExternalCpds appExtCpd optional,
ServiceDependencies appServiceRequired optional,
ServiceDependencies appServiceOptional optional,
ServiceDescriptors appServiceProduced optional,
FeatureDependencies appFeatureRequired optional,
FeatureDependencies appFeatureOptional optional,
TransportDependencies transportDependencies optional,
TrafficRuleDescriptors appTrafficRule optional,
DNSRuleDescriptors appDNSRule optional,
LatencyDescriptor appLatency optional,
TerminateAppInstanceOpConfig terminateAppInstanceOpConfig optional,
ChangeAppInstanceStateOpConfig changeAppInstanceStateOpConfig optional,
UserContextTransferCapability userContextTransferCapability optional,
AppNetworkPolicy appNetworkPolicy optional
AppNetworkPolicy appNetworkPolicy optional,
Json.String mciopId optional,
McioIdentificationData mcioIdentificationData optional,
LogicalNodeRequirements logicalNode optional,
RequestedAdditionalCapabilityData requestAdditionalCapabilities optional,
McioConstraintParams mcioConstraintParams optional
} // End of type AppD
/**
* @desc Parameter names for constraints expected to be assigned to MCIOs realizing this application
* @see ETSI GS MEC 010-2 Clause 6.2.1.2.2
*/
type enumerated McioConstraintParams {
localAffinityCisNode (0),
nodeAdditionalCapabilitySsd (1),
nodeAdditionalCapabilityDpdk (2),
nodeAdditionalCapabilitySriov (3),
nodeAdditionalCapabilityGpu (4),
nodeAdditionalCapabilityFpga (5),
nodeAdditionalCapabilityCpuPin (6),
nodeCapabilityLogicalNuma (7),
nodePool
} with {
variant "JSON: as number"
}
/**
......@@ -87,8 +124,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @see ETSI GS MEC 010-2 Clause 6.2.1.4 Type: SwImageDescriptor
*/
type record SwImageDescriptor {
// FIXME shall follow the definition in clause 7.1.6.5 of ETSI GS NFV‑IFA 011 [0], with the following consideration:
// FIXME shall follow the definition in clause 7.1.6.5 of ETSI GS NFV‑IFA 001 [1], with the following consideration:
}
type record of SwImageDescriptor SwImageDescriptors;
/**
* @desc The VirtualStorageDescriptor data type describes the virtual storage required by a MEC application
......@@ -98,18 +136,27 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
type record VirtualStorageDescriptor {
// FIXME shall follow the definition in clause 7.1.9.4 of ETSI GS NFV‑IFA 011 [0], with the following consideration:
}
type record of VirtualStorageDescriptor VirtualStorageDescriptors;
/**
* @desc The AppExternalCpd data type supports the specification of MEC application requirements related to external connection point
* @member virtualNetworkInterfaceRequirements Specifies requirements on a virtual network interface realizing the CPs instantiated from this CPD
* member additionalServiceData Additional service identification data of the external CP
* @see ETSI GS MEC 010-2 Clause 6.2.1.6 Type: AppExternalCpd
*/
type record AppExternalCpd {
VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional
VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional,
AdditionalServiceData additionalServiceData optional
// FIXME inherited attributes
}
type record of AppExternalCpd AppExternalCpds;
type record VirtualNetworkInterfaceRequirement {
// FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.6.6 of ETSI GS NFV-IFA 011 [0]. For the definition of Cpd, please refer to clause 7.1.6.3 of ETSI GS NFV-IFA 011 [0]
// FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.6.6 of ETSI GS NFV-IFA 001 [1]. For the definition of Cpd, please refer to clause 7.1.6.3 of ETSI GS NFV-IFA 001 [1]
}
type record AdditionalServiceData {
// FIXME For the definition of the VirtualNetworkInterfaceRequirements, please refer to clause 7.1.18.3 of ETSI GS NFV IFA 011 [1].
}
type record length(1..infinity) of VirtualNetworkInterfaceRequirement VirtualNetworkInterfaceRequirements;
......@@ -128,6 +175,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String version,
TransportsSupported transportsSupported optional
}
type record of ServiceDescriptor ServiceDescriptors;
/**
* @desc Indicates transports and serialization formats supported made available to the service-consuming application
......@@ -137,7 +185,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
*/
type record TransportsSupported {
TransportDescriptor transport,
SerializerType serializers
ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers
}
/**
......@@ -150,6 +198,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String featureName,
Json.String version
}
type record of FeatureDependency FeatureDependencies;
/**
* @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application
......@@ -164,14 +213,18 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
type record TrafficRuleDescriptor {
Json.String trafficRuleId,
FilterType filterType,
integer priority,
Json.Integer priority,
TrafficFilter trafficFilter,
Action action_,
InterfaceDescriptor dstInterface optional
} with {
variant (action_) "name as 'action'";
}
type record of TrafficRuleDescriptor TrafficRuleDescriptors;
/**
* @desc Definition of filter type: per FLOW or PACKET
*/
type enumerated FilterType {
FLOW,
PACKET
......@@ -179,13 +232,16 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant "JSON: as number"
}
/**
* @desc Identifies the action of the MEC host data plane, when a packet matches the trafficFilter
*/
type enumerated Action {
DROP,
FORWARD_DECAPSULATED,
FORWARD_AS_IS,
PASSTHROUGH,
DUPLICATED_DECAPSULATED,
DUPLICATE_AS_IS
DROP (0),
FORWARD_DECAPSULATED (1),
FORWARD_ENCAPSULATED (2),
PASSTHROUGH (3),
DUPLICATED_DECAPSULATED (4),
DUPLICATE_ENCAPSULATED (5)
} with {
variant "JSON: as number"
}
......@@ -221,9 +277,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String tgtTunnelAddress optional,
Json.String srcTunnelPort optional,
Json.String dstTunnelPort optional,
integer qCI optional,
integer dSCP optional,
integer tC optional
Json.Integer qCI optional,
Json.Integer dSCP optional,
Json.Integer tC optional
}
/**
......@@ -232,19 +288,21 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @member tunnelInfo Included only if the destination address type is tunnel
* @member srcMACAddress The source address identifies the MAC address of the interface
* @member dstMACAddress The destination address identifies the MAC address of the destination
* @member dstIPAddressIf the interface type is IP, the destination address identifies the IP address of the destination
* @see ETSI GS MEC 010-2 Clause 6.2.1.11 Type: InterfaceDescriptor
*/
type record InterfaceDescriptor {
InterfaceType interfaceType,
TunnelInfo tunnelInfo optional,
Json.String srcMACAddress optional,
Json.String dstMACAddress optional
Json.String dstMACAddress optional,
Json.String dstIPAddress optional
}
type enumerated InterfaceType {
TUNNEL,
MAC,
IP
TUNNEL (0),
MAC (1),
IP (2)
} with {
variant "JSON: as number"
}
......@@ -265,8 +323,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
}
type enumerated TunnelType {
GTP_U,
GRE
GTP_U (0),
GRE (1)
} with {
variant "JSON: as number"
}
......@@ -284,8 +342,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String domainName,
Json.String ipAddressType,
IpAddress ipAddress,
integer ttl optional
Json.Integer ttl optional
}
type record of DNSRuleDescriptor DNSRuleDescriptors;
/**
* @desc The LatencyDescriptor data type describes latency requirements for a MEC application
......@@ -293,7 +352,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor
*/
type record LatencyDescriptor {
UInt32 maxLatency
Json.UInteger maxLatency
}
/**
......@@ -302,7 +361,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @see ETSI GS MEC 010-2 Clause 6.2.1.15 Type: TerminateAppInstanceOpConfig
*/
type record TerminateAppInstanceOpConfig {
// FIXME shall follow the definition in clause 7.1.5.7 of ETSI GS NFV‑IFA 011 [0].
// FIXME shall follow the definition in clause 7.1.5.7 of ETSI GS NFV‑IFA 001 [1].
}
/**
......@@ -311,7 +370,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @see ETSI GS MEC 010-2 Clause 6.2.1.16 Type: ChangeAppInstanceStateOpConfig
*/
type record ChangeAppInstanceStateOpConfig {
// FIXME shall follow the definition in clause 7.1.5.8 of ETSI GS NFV‑IFA 011 [0].
// FIXME shall follow the definition in clause 7.1.5.8 of ETSI GS NFV‑IFA 001 [1].
}
/**
......@@ -330,6 +389,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
TransportDependency serTransportDependencies optional,
Json.String requestedPermissions optional
}
type record of ServiceDependency ServiceDependencies;
/**
* @desc The TransportDependency data type supports the specification of requirements of a MEC application related to supported transport bindings (each being a combination of a transport with one or more serializers)
......@@ -340,9 +400,10 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
*/
type record TransportDependency {
TransportDescriptor transport,
SerializerType serializers,
ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers,
Labels labels
}
type record of TransportDependency TransportDependencies;
type record length(1..infinity) of Json.String Labels;
......@@ -350,7 +411,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @desc The TransportDescriptor data type describes a transport
* @member name The name of this transport
* @member description Human-readable description of this transport
* @member type_ Type of the transport, as defined in the TransportTypes type in ETSI GS MEC 011 [17]i.0
* @member type_ Type of the transport, as defined in the TransportType type in ETSI GS MEC 011 [17]i.0
* @member protocol The name of the protocol used. Shall be set to "HTTP" for a REST API
* @member version The version of the protocol used
* @member security Information about the security used by the transport in ETSI GS MEC 011 [17]i.0
......@@ -360,11 +421,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
type record TransportDescriptor {
Json.String name,
Json.String description optional,
TransportTypes type_,
ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType type_,
Json.String protocol,
Json.String version,
SecurityInfo security,
ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo security,
Json.String implSpecificInfo optional
} with {
variant (type_) "name as 'type'";
}
/**
......@@ -403,9 +466,42 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (wi_fiNetwork) "name as 'wi-fiNetwork'";
}
} // End of group application_descriptor_information_model
/**
* @desc The OsContainerDescriptor data type supports the specification of requirements of container compute resources when a MEC application is intended to be realized by one or a set of OS Containers sharing the same host and same networking namespace
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.1.22 Type: OsContainerDescriptor
*/
type record OsContainerDescriptor {
// FIXME shall follow the definition in clause 7.1.6.2 of ETSI GS NFV‑IFA 001 [1].
}
type record of OsContainerDescriptor OsContainerDescriptors;
/**
* @desc The McioIdentificationData data type contains data needed to identify an MCIO when interworking with the CISM
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.1.23 Type: McioIdentificationData
*/
type record McioIdentificationData {
// FIXME shall follow the definition in clause 6.2.75.2 of ETSI GS NFV-SOL 001 [19].
}
/**
* @desc The LogicalNodeRequirements data type describes compute, memory and I/O requirements that are to be associated with the logical node of infrastructure
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.1.24 Type: LogicalNodeRequirements
*/
type record LogicalNodeRequirements {
// FIXME shall follow the definition in clause 7.1.9.6.2 of ETSI GS NFV-IFA 011 [1].
}
group application_lifecycle_management_information_model {
/**
* @desc The RequestedAdditionalCapabilityData data type supports the specification of requested additional capability for a particular application. Such a capability may be for acceleration or specific tasks
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.1.25 Type: RequestedAdditionalCapabilityData
*/
type record RequestedAdditionalCapabilityData {
// FIXME shall follow the definition in clause 7.1.9.5.2 of ETSI GS NFV-IFA 011 [1].
}
/**
* @desc The LocationConstraints data type supports the specification of MEC application requirements related to MEC application deployment location constraints
......@@ -420,10 +516,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Polygon area optional
}
type record CivicAddressElement {
integer caType,
type record CivicAddressElement_ {
Json.Integer caType,
Json.String caValue
}
type record of CivicAddressElement_ CivicAddressElement;
type record Geometry {
Json.String type_,
......@@ -481,7 +578,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @member vnfInstanceId Identifier of the VNF instance created by VNFM that the MEC application has been instantiated as
* @member instantiationState Instantiation state of the application instance
* @member instantiatedAppState Information specific to an instantiated application. This attribute shall be present if the instantiationState attribute value is INSTANTIATED
* @member instantiatedAppState Operational state is applicable in the instantiation state INSTANTIATED
* @member communicationInterface Interface for communication with other application instances
* @member _links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo
*/
......@@ -507,31 +604,40 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
}
type record of AppInstanceInfo AppInstanceInfoList;
type record Link {
LinkType self_,
LinkType instantiate optional,
LinkType terminate optional,
LinkType operate optional,
LinkType configure_platform_for_app optional
} with {
variant (self_) "name as 'self'";
type enumerated InstantiationState {
INSTANTIATED (0),
NOT_INSTANTIATED (1)
}
type record InstantiatedAppState {
OperationalState operationalState optional,
LocationInformation appInstLocation optional
}
type enumerated InstantiationState {
INSTANTIATED,
NOT_INSTANTIATED
LocationInformation appInstLocation optional,
McioInfo mcioInfo optional
}
type enumerated OperationalState {
STARTED,
STOPPED
STARTED (0),
STOPPED (1)
}
/**
* @desc Links to resources related to this resource
* @member self_ Self referring URI
* @member instantiate Link to the "instantiate" task resource, if the related operation is possible based on the current status of this application instance resource
* @member terminate Link to the "terminate" task resource, if the related operation is possible based on the current status of this application instance resource
* @member operate Link to the "operate" task resource, if the related operation is supported for this application instance, and is possible based on the current status of this application instance resource
* @member appPrconfigure_platform_for_appovider Link to the "configure_platform_for_app" task resource, if the related operation is supported for this application instance, and is possible based on the current status of this application instance resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo
*/
type record Link {
LinkType self_,
LinkType instantiate optional,
LinkType terminate optional,
LinkType operate optional,
LinkType configure_platform_for_app optional
} with {
variant (self_) "name as 'self'";
}
/**
* @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources
* @member appInstSelectorType
......@@ -579,8 +685,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
type record Version {
Json.String appSoftVersion,
Json.String appDVersion optional
AppDVersion appDVersion optional
}
type record of Json.String AppDVersion;
type record length(1..infinity) of Version Versions;
......@@ -600,20 +707,19 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
}
type enumerated OperationType {
INSTANTIATE,
OPERATE,
TERMINATE,
INVALID_OPERATE // For BI purpose only
INSTANTIATE (0),
OPERATE (1),
TERMINATE (2)
}
type record length(1..infinity) of OperationType OperationTypes;
type enumerated OperationState {
STARTING,
PROCESSING,
COMPLETED,
FAILED,
FAILED_TEMP
STARTING (0),
PROCESSING (1),
COMPLETED (2),
FAILED (3),
FAILED_TEMP (4)
}
type record length(1..infinity) of OperationState OperationStates;
......@@ -622,6 +728,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @desc This data type represents request parameters of the "Instantiate Application" operation
* @member virtualComputeDescriptor Describes CPU and memory requirements, as well as optional additional requirements, such as disk and acceleration related capabilities, of the virtualisatio n container used to realize the application instance to be created
* @member virtualStorageDescriptor Defines descriptors of virtual storage resources to be used by the application instance to be created
* @member osContainerDescriptor Describes CPU, memory requirements and limits, and software images of the OS Containers realizing this MEC application corresponding to OS Containers sharing the same host and same network namespace
* @member selectedMECHostInfo Describes the information of selected host for the application instance
* @member locationConstraints Defines the location constraints for the application instance to be created
* @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance, or refer to external/externally-managed virtual links
......@@ -630,10 +737,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
*/
type record InstantiateAppRequest {
VirtualComputeDescriptor virtualComputeDescriptor optional,
OsContainerDescriptors osContainerDescriptor optional,
VirtualStorageDescriptor virtualStorageDescriptor optional,
MECHostInformation selectedMECHostInfo,
LocationConstraints locationConstraints optional,
VimConnectionInfo vimConnectionInfo optional,
VimConnectionInfos vimConnectionInfo optional,
AppTermCandsForCoord appTermCandsForCoord optional
}
......@@ -647,12 +755,13 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
type record OperateAppRequest {
OperationalState changeStateTo,
StopType stopType optional,
UInt32 gracefulStopTimeout optional
Json.UInteger gracefulStopTimeout optional
}
type enumerated StopType {
FORCEFUL,
GRACEFUL
FORCEFUL (0),
GRACEFUL (1),
ERROR_CASE (3) // In case of Bad Request tests
}
/**
......@@ -663,7 +772,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
*/
type record TerminateAppRequest {
TerminationType terminationType,
UInt32 gracefulTerminationTimeout optional
Json.UInteger gracefulTerminationTimeout optional
}
type StopType TerminationType;
......@@ -690,11 +799,16 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
}
type enumerated AppInstanceState {
NOT_INSTANTIATED,
STARTED,
STOPPED
NOT_INSTANTIATED (0),
STARTED (1),
STOPPED (2)
}
/**
* @desc Links to resources related to this resource
* @member self_ URI of this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo
*/
type record AppInstSubscriptionInfo_Link {
LinkType self_
} with {
......@@ -712,7 +826,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @member appPkgId Identifier of the onboarded application package
* @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way
* @member appInstLocation Location of the MEC application instance
* @member links A link to the related subscription
* @member links Links to resources related to this notification
* @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification
*/
type record AppInstNotification {
......@@ -730,6 +844,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this notification
* @member subscription A link to the related subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification
*/
type record AppInstNotification_Links {
LinkType subscription
}
......@@ -748,6 +867,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
AppInstanceState appInstanceState optional,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional
}
type record of AppInstSubscriptionRequest AppInstSubscriptionRequestList;
/**
* @desc This data type represents an application lifecycle management operation occurrence
......@@ -767,7 +887,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
OperationState operationState,
TimeStamp stateEnteredTime,
TimeStamp startTime,
LcmOperation lcmOperation,
OperationType lcmOperation,
OperationParams operationParams optional,
Json.Bool isCancelPending optional,
CancelMode cancelMode optional,
......@@ -775,15 +895,24 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
} with {
variant (links) "name as '_links'";
}
type record of AppLcmOpOcc AppLcmOpOccList;
type OperationType LcmOperation;
/**
* @desc Input parameters of the LCM operation
* @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc
*/
type union OperationParams {
InstantiateAppRequest instantiateAppRequest,
OperateAppRequest operateAppRequest,
TerminateAppRequest terminateAppRequest
}
/**
* @desc Link to the application instance that the operation applies to
* @member self_ URI of this resource
* @member appInstance Link to the application instance that the operation applies to
* @see ETSI GS MEC 010-2 Clause 6.2.2.13 Type: AppLcmOpOcc
*/
type record AppLcmOpOcc_Link {
LinkType self_,
LinkType appInstance
......@@ -823,6 +952,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this resource
* @member self_ URI of this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo
*/
type record AppLcmOpOccSubscriptionInfo_Link {
LinkType self_
} with {
......@@ -850,12 +984,20 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
OperationState operationState,
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appLcmOpOccId,
Json.String appInstanceId,
AppLcmOpOccNotification_Link links
} with {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this resource
* @member appInstance Link to the resource representing the application instance to which the notified change applies
* @member subscription Link to the related subscription
* @member appLcmOpOcc Link to the application lifecycle management operation occurrence that this notification is related to
* @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification
*/
type record AppLcmOpOccNotification_Link {
LinkType appInstance,
LinkType subscription,
......@@ -892,30 +1034,44 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
KeyValuePairs extra optional
}
type record of VimConnectionInfo VimConnectionInfos;
/**
* @desc The data type represents a subscription link list of notification on application lifecycle management
* @member links List of hyperlinks related to the resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList
*/
type record SubscriptionLinkList {
SubscriptionLinkList_Link links
type record AppInstanceSubscriptionLinkList {
AppInstanceSubscriptionLinkList_Link links
} with {
variant (links) "name as '_links'";
}
type record SubscriptionLinkList_Link {
/**
* @desc List of hyperlinks related to the resource
* @member self_ URI of this resource
* @member subscriptions A link list to the subscriptions
* @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList
*/
type record AppInstanceSubscriptionLinkList_Link {
LinkType self_,
SubscriptionLinkList_Link_Subscriptions subscriptions optional
AppInstanceSubscriptionLinkList_Link_Subscriptions subscriptions optional
} with {
variant (self_) "name as 'self'";
}
type record SubscriptionLinkList_Link_Subscription {
/**
* @desc A link list to the subscriptions
* @member href The URI referring to the subscription
* @member subscriptionType Type of the subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.19 Type: AppInstanceSubscriptionLinkList
*/
type record AppInstanceSubscriptionLinkList_Link_Subscription {
Json.AnyURI href,
AppInstanceSubscriptionType subscriptionType
}
type record length(1..infinity) of SubscriptionLinkList_Link_Subscription SubscriptionLinkList_Link_Subscriptions;
type record length(1..infinity) of AppInstanceSubscriptionLinkList_Link_Subscription AppInstanceSubscriptionLinkList_Link_Subscriptions;
/**
* @desc String representing the type of a subscription
......@@ -938,14 +1094,14 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @see ETSI GS MEC 010-2 Clause 6.2.2.21 Type: ConfigPlatformForAppRequest
*/
type record ConfigPlatformForAppRequest {
ServiceDependency appServiceRequired optional,
ServiceDependency appServiceOptional optional,
ServiceDependency appServiceProduced optional,
FeatureDependency appFeatureRequired optional,
FeatureDependency appFeatureOptional optional,
TransportDependency transportDependencies optional,
TrafficRuleDescriptor appTrafficRule optional,
DNSRuleDescriptor appDNSRule optional,
ServiceDependencies appServiceRequired optional,
ServiceDependencies appServiceOptional optional,
ServiceDependencies appServiceProduced optional,
FeatureDependencies appFeatureRequired optional,
FeatureDependencies appFeatureOptional optional,
TransportDependencies transportDependencies optional,
TrafficRuleDescriptors appTrafficRule optional,
DNSRuleDescriptors appDNSRule optional,
LatencyDescriptor appLatency optional,
UserContextTransferCapability userContextTransferCapability optional,
AppNetworkPolicy appNetworkPolicy optional
......@@ -971,6 +1127,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
TerminationOptions terminationOptions
}
/**
* @desc Sets of application options for the MEO/MEAO to select from as candidates for termination
* @member appInstIdTerminationCands List of application instance identifiers, constituting a candidate set for termination
* @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord
*/
type record TerminationOption {
AppInstIdTerminationCands appInstIdTerminationCands
}
......@@ -1011,6 +1172,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this resource
* @member self_ URI of this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo
*/
type record AppInstIdCreationSubscriptionInfo_Link {
LinkType self_
} with {
......@@ -1037,6 +1203,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this notification
* @member subscription A link to the related subscription
* @member appInstance Link to the resource representing the created application instance
* @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification
*/
type record AppInstanceIdentifierCreationNotification_Link {
LinkType subscription,
LinkType appInstance
......@@ -1074,6 +1246,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this resource
* @member self_ URI of this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo
*/
type record AppInstIdDeletionSubscriptionInfo_Link {
LinkType self_
} with {
......@@ -1096,16 +1273,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appInstanceId,
AppInstanceIdentifierDeletionNotification_Link links
AppInstIdDeletionSubscriptionRequest links
} with {
variant (links) "name as '_links'";
}
type record AppInstanceIdentifierDeletionNotification_Link {
LinkType subscription,
LinkType appInstance
}
/**
* @desc The LocationInformation data type represents the location information of the site hosting the MEC application instance
* @member countryCode The two-letter ISO 3166 [3] country code in capital letters where an instance is deployed
......@@ -1125,9 +1297,15 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
*/
type StopType CancelMode;
} // End of group application_lifecycle_management_information_model
/**
* @desc This data type represents the information about an MCIO representing the application instance realized by one or a set of OS containers
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation
*/
type record McioInfo {
// FIXME McioInfo shall follow the definition in clause 8.3.3.33.2 of ETSI GS NFV-IFA 013 [15].
}
group application_package_information_model {
/**
* @desc The data type CreateAppPkg represents the parameters for creating a new application package resource
......@@ -1196,30 +1374,39 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
// FIXME The data type of application software image information data model is related to virtualisation method and needs for further study
}
type record length(1..infinity) of AppPkgSWImageInfo_ AppPkgSWImageInfo;
type record AppPkgArtifactInfo {
// FIXME The data type of additional information of application package artifacts is not specified in the present document
}
type enumerated OnboardingState {
CREATED,
UPLOADING,
PROCESSING,
ONBOARDED
CREATED (0),
UPLOADING (1),
PROCESSING (2),
ONBOARDED (3)
}
type enumerated AppPkgInfo_OperationalState {
ENABLED,
DISABLED,
UNKNOWN // Used for BI purpose only
ENABLED (0),
DISABLED (1),
ERROR_BAD_REQUEST (2)
}
type enumerated UsageState {
IN_USE,
NOT_IN_USE
IN_USE (0),
NOT_IN_USE (1)
}
type record length(1..infinity) of Json.String AppPkgInfo_MecInfo;
/**
* @desc Links to resources related to this resource
* @member self_ Self referring URI
* @member appDId Link to the appD resource
* @member appPkgContent Link to the "Onboarded application package content" resource
* @member vnfPkgInfo Link to the corresponding VNF package resource at NFVO
* @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo
*/
type record AppPkgInfo_Links {
LinkType self_,
LinkType appD,
......@@ -1246,6 +1433,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this resource
* @member self_ URI of this resource
* @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo
*/
type record AppPkgSubscriptionInfo_Link {
LinkType self_
} with {
......@@ -1276,6 +1468,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (self_) "name as 'self'";
}
/**
* @desc A link list to the subscriptions to an application package
* @member href The URI referring to the subscription
* @member subscriptionType Type of the subscription
* @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList
*/
type record AppPkgSubscriptionLinkList_Link_Subscription {
Json.AnyURI href,
AppPkgSubscriptionType subscriptionType
......@@ -1292,7 +1490,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @member appPkgId Identifier of the onboarded application package
* @member appDId The application descriptor identifier identifies the application package and the application descriptor in a globally unique way
* @member operationalState Operational state of the application package
* @member linksLinks to resources related to this notification
* @member links Links to resources related to this notification
* @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification
*/
type record AppPkgNotification {
......@@ -1308,6 +1506,11 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this notification
* @member subscription A link to the related subscription
* @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification
*/
type record AppPkgNotification_Link {
LinkType subscription
}
......@@ -1363,10 +1566,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
UsageState usageState optional
}
} // End of group application_package_information_model
group granting_information_model {
/**
* @desc This type represents a grant request
* @member appInstanceId Identifier of the application instance which this grant request is related to
......@@ -1386,15 +1585,21 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String appLcmOpOccId,
Json.String appDId,
OperationType operation,
ResourceDefinition addResources optional,
ResourceDefinition tempResources optional,
ResourceDefinition updateResources optional,
ResourceDefinitions addResources optional,
ResourceDefinitions tempResources optional,
ResourceDefinitions updateResources optional,
KeyValuePairs additionalParams optional,
GrantRequest_Link links
} with {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this request
* @member appLcmOpOcc Related lifecycle management operation occurrence
* @member appInstance Related application instance
* @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model
*/
type record GrantRequest_Link {
LinkType appLcmOpOcc,
LinkType appInstance
......@@ -1413,17 +1618,29 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String id,
ResourceDefinition_Type type_,
Json.String vduId optional,
Json.String resourceTemplateId,
ResourceTemplateId resourceTemplateId,
ResourceDefinition_Resource resource
} with {
variant (type_) "name as 'type'";
}
type record of ResourceDefinition ResourceDefinitions;
type enumerated ResourceDefinition_Type {
COMPUTE,
VL,
STORAGE,
LINKPORT
COMPUTE (0),
STORAGE (1),
LINKPORT (2),
OSCONTAINER (3)
}
type record of Json.String ResourceTemplateId;
/**
* @desc Resource information for an existing resource
* @member vimConnectionInfo Specifies the connection information of VIM for the resources of the application instance
* @member resourceId Identifier of the resource in the scope of the VIM
* @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition
*/
type record ResourceDefinition_Resource {
VimConnectionInfo vimConnectionInfo,
Json.String resourceId
......@@ -1451,15 +1668,15 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String id,
Json.String appInstanceId,
Json.String appLcmOpOccId,
VimConnectionInfo vimConnections optional,
ZoneInfo zones optional,
ZoneGroupInfo zoneGroups optional,
GrantInfo addResources optional,
GrantInfo tempResources optional,
GrantInfo removeResources optional,
GrantInfo updateResources optional,
VimConnectionInfos vimConnections optional,
ZoneInfos zones optional,
ZoneGroupInfos zoneGroups optional,
GrantInfos addResources optional,
GrantInfos tempResources optional,
GrantInfos removeResources optional,
GrantInfos updateResources optional,
VimAssets vimAssets optional,
ExtVirtualLinkData extVirtualLinks optional,
ExtVirtualLinkDatas extVirtualLinks optional,
KeyValuePairs additionalParams optional,
Grant_Link links
} with {
......@@ -1470,6 +1687,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
VimSoftwareImage softwareImages optional
}
/**
* @desc Links to resources related to this request
* @member appLcmOpOcc Related lifecycle management operation occurrence
* @member appInstance Related application instance
* @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant
*/
type record Grant_Link {
LinkType appLcmOpOcc,
LinkType appInstance
......@@ -1481,14 +1704,17 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
* @member vimConnectionId Identifier of the VIM connection to be used to manage this resource
* @member zoneId Reference to the identifier of the "ZoneInfo" structure in the "Grant" structure defining the resource zone into which this resource is to be placed
* @member resourceGroupId Identifier of the "infrastructure resource group", logical grouping of virtual resources assigned to a tenant within an Infrastructure Domain, to be provided when allocating the resource
* @member mcioConstraints The constraint values to be assigned to MCIOs of an application with containerized components
* @see ETSI GS MEC 010-2 Clause 6.2.4.5 Type: GrantInfo
*/
type record GrantInfo {
Json.String resourceDefinitionId,
Json.String vimConnectionId optional,
Json.String zoneId optional,
Json.String resourceGroupId optional
Json.String resourceGroupId optional,
KeyValuePairs mcioConstraints optional
}
type record of GrantInfo GrantInfos;
/**
* @desc This type provides information regarding a resource zone
......@@ -1502,6 +1728,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String zoneId,
Json.String vimConnectionId optional
}
type record of ZoneInfo ZoneInfos;
/**
* @desc This type provides information regarding a resource zone group
......@@ -1511,8 +1738,8 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
type record ZoneGroupInfo {
ZoneIds zoneId
}
type record length(1..infinity) of Json.String ZoneIds;
type record of ZoneGroupInfo ZoneGroupInfos;
type record of Json.String ZoneIds;
/**
* @desc This type represents an external VL
......@@ -1528,8 +1755,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String vimConnectionId optional,
Json.String resourceId,
AppExtCpData extCps,
ExtLinkPortData extLinkPorts optional
ExtLinkPortDatas extLinkPorts optional
}
type record of ExtVirtualLinkData ExtVirtualLinkDatas;
/**
* @desc This type represents an externally provided link port to be used to connect an external connection point to an external VL
......@@ -1541,6 +1769,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String id,
ResourceHandle resourceHandle
}
type record of ExtLinkPortData ExtLinkPortDatas;
/**
* @desc This type represents the information that allows addressing a virtualised resource that is used by an application instance
......@@ -1635,8 +1864,10 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
type record IpAddress {
IpAddressType type_,
FixedAddresses fixedAddresses optional,
integer numDynamicAddresses optional,
Json.Integer numDynamicAddresses optional,
AddressRange addressRange optional
} with {
variant (type_) "name as 'type'";
}
type record length(1..infinity) of IpAddress IpAddresses;
......@@ -1654,10 +1885,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
Json.String subnetId optional
}
} // End of group granting_information_model
group common_information_model {
/**
* @desc This data type represents a type of link
* @member href URI referring to a resource
......@@ -1666,50 +1893,123 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
type record LinkType {
Json.AnyURI href
}
/**
* @desc This data type represents a list of key-value pairs
* @member
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.5.3 Type: KeyValuePairs
*/
type record KeyValuePairs {
type record KeyValuePair {
Json.String key_name,
anytype key_value // FIXME To be refined
anytype key_value
}
type set of KeyValuePair KeyValuePairs;
/**
* @desc This data type represents the time stamp as Unix-time since January 1, 1970, 00:00:00 UTC
* @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
* @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
* @see ETSI GS MEC 010-2 Clause 6.2.5.4 Type: TimeStamp
* @desc This type represents the checksum of an application package
* @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18]
* @member hash The hexadecimal value of the checksum
* @see ETSI GS MEC 010-2 Clause 6.2.5.6 Type: Checksum
*/
type record TimeStamp {
Seconds seconds,
NanoSeconds nanoSeconds
type record Checksum {
Json.String algorithm,
Json.String hash
}
group edge_platform_application_enablement { /* TITAN WORK-AROUND for build issue (class forward declaration) */
/**
* @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
* @desc The enumeration TransportType represents types of transports.
* @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.4-1: Enumeration TransportType
*/
type UInt32 Seconds;
type enumerated TransportType {
REST_HTTP,
MB_TOPIC_BASED,
MB_ROUTING,
MB_PUBSUB,
RPC,
RPC_STREAMING,
WEBSOCKET
}
/**
* @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
* @desc List of supported OAuth 2.0 grant types.
*/
type UInt32 NanoSeconds;
// type enumerated GrantTypes {
// OAUTH2_AUTHORIZATION_CODE,
// OAUTH2_IMPLICIT_GRANT,
// OAUTH2_RESOURCE_OWNER,
// OAUTH2_CLIENT_CREDENTIALS
// }
// type record length(1..4) of GrantTypes GrantTypesList;
/**
* @desc This type represents the checksum of an application package
* @member algorithm Name of the algorithm used to generate the checksum, as defined in ETSI GS NFV-SOL 004 [18]
* @member hash The hexadecimal value of the checksum
* @see ETSI GS MEC 010-2 Clause 6.2.5.6 Type: Checksum
* @desc The token endpoint.
*/
type record Checksum {
Json.String algorithm,
Json.String hash
//type Json.String TokenEndpoint;
/**
* @desc Parameters related to use of OAuth 2.0.
*/
// type record OAuth2Info {
// GrantTypesList grantTypes,
// TokenEndpoint tokenEndpoint
// }
/**
* @desc This type represents security information related to a transport.
* @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.5.4-1: Attributes of SecurityInfo
*/
type record SecurityInfo {
OAuth2Info oAuth2Info optional,
Json.UInt8 extensions optional
}
} // End of group common_information_model
/**
* @desc The enumeration SerializerTypes represents types of serializers.
* @see ETSI GS MEC 011 V3.1.1 (2022-09) Table 8.1.6.3-1: Enumeration SerializerType
*/
type enumerated SerializerType {
JSON,
XML,
PROTOBUF3,
RAW // Used for invalid behavior
}
/**
* @desc Reference of the catalogue.
*/
//type Json.String CategoryRef_Href;
/**
* @desc Unique identifier of the category.
*/
//type Json.String CategoryRef_Id;
/**
* @desc Name of the category.
*/
//type Json.String Name;
/**
* @desc Category version.
*/
//type Json.String CategoryRef_Version;
/**
* @desc This type represents the category reference.
*/
// type record CategoryRef {
// CategoryRef_Href href,
// CategoryRef_Id id,
// Name name,
// CategoryRef_Version version
// }
type Json.String NotificationType;
} // End of group edge_platform_application_enablement
} with {
extension "anytype integer, float, boolean, universal charstring";
......