/**
* @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,426 +43,580 @@ 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
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 ***");
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 & "/ap/ap_information",
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Local variables
var Headers v_headers;
var HttpMessage v_response;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
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
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
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 ***");
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();
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_ap_info_list
)))) {
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_001_OK
/**
* @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 ***");
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 & "/ap/ap_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")",
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Local variables
var Headers v_headers;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
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
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
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 ***");
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();
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_ap_info_list
)))) {
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_002_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/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 ***");
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 & "/apId/ap_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Local variables
var Headers v_headers;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
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
tc_ac.start;
alt {
[] 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 ***");
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();
// 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_002_BR
/**
* @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 ***");
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 & "/sta/sta_information",
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
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 ***");
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();
// Local variables
var Headers v_headers;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
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
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_sta_info_list
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***");
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_003_OK
/**
* @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 ***");
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 & "/sta/sta_information?filter=(eq," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")",
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Local variables
var Headers v_headers;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
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
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
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 ***");
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();
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_sta_info_list
)))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a StaInfo list ***");
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_004_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/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 ***");
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 & "/staId/sta_information?filter=(ee," & PX_WLAN_FILTER_FIELD & "," & PX_WLAN_FILTER_VALUE & ")", // Invalid requery
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Local variables
var Headers v_headers;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
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
tc_ac.start;
alt {
[] 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 ***");
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();
// 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_004_BR
/**
* @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;
// 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;
// Local variables
var Headers v_headers;
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_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_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_SUB,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_wlan_subscription_link_list(
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 ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Test component configuration
f_cf_01_http_up();
// 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",
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, 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_delete_assoc_sta_subscription(v_subscription_id_1);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_wlan_subscription_link_list(
mw_subscription_link_list
))))) -> value v_response {
tc_ac.stop;
/**
* @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 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_get(
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "subscription_type=assoc_sta",
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_wlan_subscription_link_list(
mw_subscription_link_list(
-,
{
*,
mw_subscription(
v_assoc_sta_subscription.links.self_.href,
"AssocStaSubscription"
),
*
}
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of subscription ***");
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
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***");
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_006_OK
/**
* @desc Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
*/
testcase TC_MEC_MEC028_SRV_WAI_006_BR() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
var AssocStaSubscription v_assoc_sta_subscription;
var Json.String v_subscription_id
// Postamble
f_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_cf_01_http_down();
} // End of testcase TC_MEC_MEC028_SRV_WAI_005_OK
// 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_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta",
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_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 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 an error when a request with not existing parameters is sent
*/
testcase TC_MEC_MEC028_SRV_WAI_006_OK() runs on HttpComponent system HttpTestAdapter {
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_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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI_SUB,
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 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_006_NF
/**
* @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 AssocStaSubscription v_assoc_sta_subscription;
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 ***");
setverdict(inconc);
stop;
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
......@@ -471,34 +625,58 @@ 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?subscription_type=assoc_sta",
v_headers
)
)
);
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI_SUB,
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
m_assoc_sta_subscription(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
m_ap_identity(
PX_MAC_ID
),
-, -, -,
10, // notificationPeriod - Table 6.3.2-1: Attributes of the AssocStaSubscription Note 2
-,
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_ok(
mw_http_message_body_json(
mw_body_json_wlan_subscription_link_list(
mw_subscription_link_list(
-,
?
)))))) -> value v_response {
mw_http_response_201_created(
mw_http_message_body_json(
mw_body_json_assoc_sta_subscription(
mw_assoc_sta_subscription(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
-, -, -,
?
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of AssocStaSubscription ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
// 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 ***");
......@@ -507,801 +685,615 @@ 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;
// 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_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/assoc_sta",
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_delete_assoc_sta_subscription(v_assoc_sta_subscription);
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 ***");
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_URI & "/subscriptions/assoc_sta",
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 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_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
*/
testcase TC_MEC_MEC028_SRV_WAI_007_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 ***");
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 & "/subscriptions",
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
m_assoc_sta_subscription(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
m_ap_identity(
PX_MAC_ID
),
-, -, -,
10, // notificationPeriod - Table 6.3.2-1: Attributes of the AssocStaSubscription Note 2
-,
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_201_created(
mw_http_message_body_json(
mw_body_json_assoc_sta_subscription(
mw_assoc_sta_subscription(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
-, -, -,
?
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds to the subscription ***");
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_response.response.body.json_body.assocStaSubscription);
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 ***");
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 & "/subscriptions",
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
m_assoc_sta_subscription_invalid(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
m_ap_identity(
PX_MAC_ID
)))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Local variables
var Headers v_headers;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
PICS_ROOT_API & PX_ME_WLAN_URI_SUB,
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
m_assoc_sta_subscription_invalid(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
m_ap_identity(
PX_MAC_ID
)))))));
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();
// 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_007_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_007_NF() runs on HttpComponent system HttpTestAdapter {
// Local variables
var Headers v_headers;
// Local variables
var Headers v_headers;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_post(
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(
m_assoc_sta_subscription(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
m_ap_identity(
PX_MAC_ID
)))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// 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 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 the correct error code ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// 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 & "/subscriptions&filter=(eq,ap/macId,00:01:02:03:04:04)",
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
m_assoc_sta_subscription(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
m_ap_identity(
PX_MAC_ID
)))))));
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 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();
[] 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_007_NF
/**
* @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;
// 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_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 & "/subscriptions/" & "(?*)",
0
);
httpPort.send(
m_http_request(
m_http_request_get(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri,
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// 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_get(
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_assoc_sta_subscription(
mw_assoc_sta_subscription(
v_assoc_sta_subscription.callbackReference,
-,
-, -,
v_assoc_sta_subscription.links
)))))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***");
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_assoc_sta_subscription);
f_cf_01_http_down();
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_assoc_sta_subscription(
mw_assoc_sta_subscription(
v_assoc_sta_subscription.callbackReference,
-,
-, -,
v_assoc_sta_subscription.links
)))))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***");
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_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 ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// Test adapter configuration
// Local variables
var Headers v_headers;
// 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;
}
// 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 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_URI & "/subscriptions/unknown",
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 an AssocStaSubscription ***");
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_assoc_sta_subscription);
f_cf_01_http_down();
// 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 an AssocStaSubscription ***");
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_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;
// 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_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 & "/subscriptions/" & "(?*)",
0
);
httpPort.send(
m_http_request(
m_http_request_put(
PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/" & v_uri,
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);
// 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 & "/" & 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,
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_ok(
mw_http_message_body_json(
mw_body_json_assoc_sta_subscription(
mw_assoc_sta_subscription(
v_assoc_sta_subscription.callbackReference,
?,
-, -,
v_assoc_sta_subscription.links )))))) -> value v_response {
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_response.response.body.json_body.assocStaSubscription);
f_cf_01_http_down();
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_assoc_sta_subscription(
mw_assoc_sta_subscription(
v_assoc_sta_subscription.callbackReference,
?,
-, -,
v_assoc_sta_subscription.links
)))))) {
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_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;
// 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_create_assoc_sta_subscription(v_assoc_sta_subscription);
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",
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);
// 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 & "/" & v_subscription_id,
v_headers,
m_http_message_body_json(
m_body_json_assoc_sta_subscription(
m_assoc_sta_subscription(
"", // No callback reference
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_400_bad_request
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds 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_delete_assoc_sta_subscription(v_assoc_sta_subscription);
f_cf_01_http_down();
// 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 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_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;
// 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_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,
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// 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_delete(
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & v_subscription_id,
v_headers
)));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***");
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();
// Test Body
tc_ac.start;
alt {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with an AssocStaSubscription ***");
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_010_OK
/**
* @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 ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf_01_http_up();
// 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",
v_headers
)
)
);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Local variables
var Headers v_headers;
// 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_init_default_headers_list(-, -, v_headers);
httpPort.send(
m_http_request(
m_http_request_delete(
PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "unknown",
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 an AssocStaSubscription ***");
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_assoc_sta_subscription);
f_cf_01_http_down();
// 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 an AssocStaSubscription ***");
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_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;
// 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_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_notif_up();
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// 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_notif_up();
// Test adapter configuration
// Preamble
f_create_assoc_sta_subscription(v_assoc_sta_subscription, v_subscription_id);
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
tc_wait.start;
alt {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_assoc_sta_subscription(
mw_assoc_sta_subscription(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
-,
-, -,
?
)))))) -> value v_response {
tc_wait.stop;
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(
m_http_response(
m_http_response_ok_no_body(
v_headers
)));
log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] 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_cf_01_http_notif_down();
// Test Body
tc_wait.start;
alt {
[] httpPort_notif.receive(
mw_http_request(
mw_http_request_post(
-,
-,
mw_http_message_body_json(
mw_body_json_assoc_sta_subscription(
mw_assoc_sta_subscription(
PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
-,
-, -,
?
)))))) {
tc_wait.stop;
f_init_default_headers_list(-, -, v_headers);
httpPort_notif.send(
m_http_response(
m_http_response_ok_no_body(
v_headers
)));
log("*** " & testcasename() & ": PASS: IUT successfully sends notification ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_wait.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_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
......@@ -1340,7 +1330,7 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_http_response_ok(
mw_http_message_body_json(
mw_body_json_wlan_measurement_config_link_list
)))) -> value v_response {
)))) -> value v_response {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with a list of measurement config ***");
......@@ -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,14 +1381,14 @@ module AtsMec_WlanInformationAPI_TestCases {
{
m_sta_identity(
PX_MAC_ID,
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)
},
PX_MEASUREMENT_ID,
m_measurement_info(1000, 10)
))))));
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1523,15 +1402,20 @@ module AtsMec_WlanInformationAPI_TestCases {
mw_measurement_config(
?,
{mw_sta_identity(PX_MAC_ID,
PX_SSID,
-,
PX_IP_ADDRESS
{PX_SSID},
-,
{PX_IP_ADDRESS}
)},
PX_MEASUREMENT_ID,
mw_measurement_info
)))))) -> value v_response {
)))))) -> 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,14 +1463,14 @@ 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,
m_measurement_info(1000, 10)
))))));
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1597,7 +1479,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_400_bad_request
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully with the correct error code ***");
......@@ -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
......@@ -1794,7 +1602,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT responds with the correct error code ***");
......@@ -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,14 +1655,14 @@ module AtsMec_WlanInformationAPI_TestCases {
{
m_sta_identity(
PX_MAC_ID,
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)
},
PX_MEASUREMENT_ID,
m_measurement_info(2000, 20)
))))));
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -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,
-,
PX_IP_ADDRESS
{mw_sta_identity(
PX_MAC_ID,
{PX_SSID},
-,
{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,14 +1736,14 @@ module AtsMec_WlanInformationAPI_TestCases {
{
m_sta_identity(
PX_MAC_ID,
PX_SSID,
{PX_SSID},
-,
PX_IP_ADDRESS
{PX_IP_ADDRESS}
)
},
PX_MEASUREMENT_ID,
m_measurement_info(2000, 20)
))))));
))))));
f_selfOrClientSyncAndVerdict(c_prDone, e_success);
// Test Body
......@@ -1946,7 +1752,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
......@@ -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,14 +1791,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_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);
// Test Body
......@@ -2002,7 +1807,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_204_no_content
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the new measurement config ***");
......@@ -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,14 +1845,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_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);
// Test Body
......@@ -2057,7 +1861,7 @@ module AtsMec_WlanInformationAPI_TestCases {
[] httpPort.receive(
mw_http_response(
mw_http_response_404_not_found
)) {
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
......@@ -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.String host,
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.String PX_APP_PKG_NAME := "APP_PKG_NAME"
modulepar Json.Integer PX_TRAFFIC_RULE_PRIORITY := 0;
modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION"
modulepar Action PX_TRAFFIC_RULE_ACTION := PASSTHROUGH;
modulepar Json.String PX_CHECKSUM := "CHECKSUM"
modulepar Json.String PX_TRAFFIC_FILTER_SRC_ADDRESS := "";
modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH"
modulepar Json.String PX_TRAFFIC_FILTER_DST_ADDRESS := "";
modulepar Json.String PX_TRAFFIC_FILTER_SRC_PORT := "12345";
modulepar OperationalState PX_OPERATIONAL_STATE := STARTED
modulepar Json.String PX_TRAFFIC_FILTER_DST_PORT := "12346";
modulepar UsageState PX_USAGE_STATE := NOT_IN_USE
modulepar Json.String PX_TRAFFIC_FILTER_PROTOCOL := "";
modulepar Json.String PX_APP_PKG_NAME := "APP_PKG_NAME";
modulepar Json.String PX_APP_PKG_VERSION := "APP_PKG_VERSION";
modulepar Json.String PX_CHECKSUM := "CHECKSUM";
modulepar Json.String PX_APP_PKG_PATH := "APP_PKG_PATH";
modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"
modulepar OperationalState PX_OPERATIONAL_STATE := STARTED;
modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f"
modulepar UsageState PX_USAGE_STATE := NOT_IN_USE;
modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID"
modulepar Json.String PX_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f";
modulepar Json.String PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID := "NON_ON_BOARDED_EXISTENT_APP_PKG_ID"
modulepar Json.String PX_ON_BOARDED_APP_PKG_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f";
modulepar Json.AnyURI PX_CALLBACK_URI := "http://127.0.0.1/callback"
modulepar Json.String PX_NON_EXISTENT_APP_PKG_ID := "NON_EXISTENT_APP_PKG_ID";
modulepar Json.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3"
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_NON_EXISTENT_SUBSCRIPTION_ID := "NON_EXISTENT_SUBSCRIPTION_ID"
modulepar Json.String PX_APP_INST_SUBSCRIPTION_REQUEST := "AppInstSubscriptionRequest";
// AppLcmOpOccSubscriptionRequest
// AppInstIdCreationSubscriptionRequest
// AppInstIdDeletionSubscriptionRequest
modulepar Json.AnyURI PX_APP_PKG_HREF := "";
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(
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
) := {
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 (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,
......@@ -100,7 +104,83 @@ 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 := ?,
......@@ -259,20 +373,64 @@ 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 := *
......@@ -343,7 +501,179 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
serTransportDependencies := p_serTransportDependencies,
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 {
......@@ -447,9 +777,9 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
template (omit) Link m_link(
in template (value) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_self,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_instantiate := omit,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_terminate := omit,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_operate := omit,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_configure_platform_for_app := omit
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_terminate := omit,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_operate := omit,
in template (omit) ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.LinkType p_configure_platform_for_app := omit
) := {
self_ := p_self,
instantiate := p_instantiate,
......@@ -471,7 +801,287 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_Templates {
operate := p_operate,
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,1701 +22,1994 @@ 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
* @member appName Name to identify the MEC application
* @member appProvider Provider of the application and of the AppD
* @member appSoftVersion Identifies the version of software of the MEC application
* @member appDVersion Identifies the version of the application descriptor
* @member mecVersion Identifies version(s) of MEC system compatible with the MEC application described in this version of the AppD
* @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 swImageDescriptor Describes the descriptors of the software image to be used by the virtualisation container used to realize this 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
* @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications
* @member appFeatureRequired Describes features a MEC application requires to run
* @member appFeatureOptional Describes features a MEC application may use if available
* @member transportDependencies Transports, if any, that this application requires to be provided by the platform
* @member appTrafficRule Describes traffic rules the MEC application requires
* @member appDNSRule Describes DNS rules the MEC application requires
* @member appLatency Describes the maximum latency tolerated by the MEC application
* @member terminateAppInstanceOpConfig Configuration parameters for the Terminate application instance operation
* @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
* @see ETSI GS MEC 010-2 Clause 6.2.1.2.2
*/
type record AppD {
Json.String appDId,
Json.String appName,
Json.String appProvider,
Json.String appSoftVersion,
Json.String appDVersion,
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,
LatencyDescriptor appLatency optional,
TerminateAppInstanceOpConfig terminateAppInstanceOpConfig optional,
ChangeAppInstanceStateOpConfig changeAppInstanceStateOpConfig optional,
UserContextTransferCapability userContextTransferCapability optional,
AppNetworkPolicy appNetworkPolicy optional
}
/**
* @desc The VirtualComputeDescriptor data type supports the specification of requirements related to virtual compute resources
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.1.3 Type: VirtualComputeDescriptor
*/
type record VirtualComputeDescriptor {
// FIXME shall follow the definition in clause 7.1.9.2.2 of ETSI GS NFV‑IFA 011 [0], with the following consideration:
}
/**
* @desc The SwImageDescriptor data type describes the software image of a MEC application
* @member
* @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:
}
/**
* @desc The VirtualStorageDescriptor data type describes the virtual storage required by a MEC application
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.1.5 Type: VirtualStorageDescriptor
*/
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:
}
/**
* @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
* @see ETSI GS MEC 010-2 Clause 6.2.1.6 Type: AppExternalCpd
*/
type record AppExternalCpd {
VirtualNetworkInterfaceRequirements virtualNetworkInterfaceRequirements optional
}
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]
}
type record length(1..infinity) of VirtualNetworkInterfaceRequirement VirtualNetworkInterfaceRequirements;
/**
* @desc The ServiceDescriptor data type describes a MEC service produced by a service-providing MEC applicationt
* @member serName The name of the service, for example, RNIS, LocationService, etc
* @member serCategory A Category reference of the service, defined in ETSI GS MEC 011 [17]i.0
* @member version The version of the service
* @member transportsSupported Indicates transports and serialization formats supported made available to the service-consuming application
* @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor
*/
type record ServiceDescriptor {
Json.String serName,
CategoryRef serCategory optional,
Json.String version,
TransportsSupported transportsSupported optional
}
/**
* @desc Indicates transports and serialization formats supported made available to the service-consuming application
* @member transport Information about the transport in this binding
* @member serializers Information about the serializers in this binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0
* @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor
*/
type record TransportsSupported {
TransportDescriptor transport,
SerializerType serializers
}
/**
* @desc The FeatureDependency data type supports the specification of requirements of a MEC application related to a feature of MEC platform
* @member featureName The name of the feature, for example, UserApps, UEIdentity, etc
* @member version The version of the feature
* @see ETSI GS MEC 010-2 Clause 6.2.1.8 Type: FeatureDependency
*/
type record FeatureDependency {
Json.String featureName,
Json.String version
}
/**
* @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application
* @member trafficRuleId Identifies the traffic rule
* @member filterType Definition of filter type: per FLOW or PACKET
* @member priority Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence
* @member trafficFilter The filter used to identify specific flow/packets that need to be handled by the MEC host
* @member action_ Identifies the action of the MEC host data plane, when a packet matches the trafficFilter
* @member dstInterface Describes the destination interface information
* @see ETSI GS MEC 010-2 Clause 6.2.1.9 Type: TrafficRuleDescriptor
*/
type record TrafficRuleDescriptor {
Json.String trafficRuleId,
FilterType filterType,
integer priority,
TrafficFilter trafficFilter,
Action action_,
InterfaceDescriptor dstInterface optional
} with {
variant (action_) "name as 'action'";
}
type enumerated FilterType {
FLOW,
PACKET
} with {
variant "JSON: as number"
}
type enumerated Action {
DROP,
FORWARD_DECAPSULATED,
FORWARD_AS_IS,
PASSTHROUGH,
DUPLICATED_DECAPSULATED,
DUPLICATE_AS_IS
} with {
variant "JSON: as number"
}
/**
* @desc The TrafficFilter data type supports the specification of MEC application requirements related to traffic rules
* @member srcAddress An IP address or a range of IP addresses
* @member dstAddress A IP address or a range of IP addresses
* @member srcPort A port or a range of ports
* @member dstPort A port or a range of ports
* @member protocol Specify the protocol of the traffic filter
* @member tag Used for tag based traffic rule
* @member uri An URI label, in application layer
* @member packetLabel A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic
* @member srcTunnelAddressUsed for GTP tunnel based traffic rule
* @member tgtTunnelAddress Used for GTP tunnel based traffic rule
* @member srcTunnelPort Used for GTP tunnel based traffic rule
* @member qCI Used to match all packets that have the same QCI
* @member dSCP Used to match all IPv4 packets that have the same DSCP
* @member tC Used to match all IPv6 packets that have the same TC
* @see ETSI GS MEC 010-2 Clause 6.2.1.10 Type: TrafficFilter
*/
type record TrafficFilter {
Json.String srcAddress optional,
Json.String dstAddress optional,
Json.String srcPort optional,
Json.String dstPort optional,
Json.String protocol optional,
Json.String tag optional,
Json.String uri optional,
Json.String packetLabel optional,
Json.String srcTunnelAddress optional,
Json.String tgtTunnelAddress optional,
Json.String srcTunnelPort optional,
Json.String dstTunnelPort optional,
integer qCI optional,
integer dSCP optional,
integer tC optional
}
/**
* @desc The InterfaceDescriptor data type describes an interface of a MEC application
* @member interfaceType Type of interface
* @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
* @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
}
type enumerated InterfaceType {
TUNNEL,
MAC,
IP
} with {
variant "JSON: as number"
}
/**
* @desc The TunnelInfo data type supports the specification of MEC application requirements related to traffic rules
* @member tunnelType Type of tunnel
* @member tunnelDstAddress Destination address of the tunnel
* @member tunnelSrcAddress Source address of the tunnel
* @member tunnelSpecificData Parameters specific to the tunnel
* @see ETSI GS MEC 010-2 Clause 6.2.1.12 Type: TunnelInfo
*/
type record TunnelInfo {
TunnelType tunnelType,
Json.String tunnelDstAddress,
Json.String tunnelSrcAddress,
Json.String tunnelSpecificData optional
}
type enumerated TunnelType {
GTP_U,
GRE
} with {
variant "JSON: as number"
}
/**
* @desc The DNSRuleDescriptor data type describes DNS rules associated with a MEC application
* @member dnsRuleId Identifies the DNS Rule
* @member domainName FQDN of the DNS rule
* @member ipAddressType Specifies the IP address type
* @member ttl Time-to-live value
* @see ETSI GS MEC 010-2 Clause 6.2.1.13 Type: DNSRuleDescriptor
*/
type record DNSRuleDescriptor {
Json.String dnsRuleId,
Json.String domainName,
Json.String ipAddressType,
IpAddress ipAddress,
integer ttl optional
}
/**
* @desc The LatencyDescriptor data type describes latency requirements for a MEC application
* @member maxLatency The value of the maximum latency in nano seconds tolerated by the MEC application
* @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor
*/
type record LatencyDescriptor {
UInt32 maxLatency
}
/**
* @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration
* @member
* @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].
}
/**
* @desc The ChangeAppInstanceStateOpConfig data type supports the specification of MEC application requirements related to change application instance state operation configuration
* @member
* @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].
}
/**
* @desc The ServiceDependency data type supports the specification of requirements of a service-consuming MEC application related to a MEC service
* @member serName The name of the service
* @member serCategory A Category reference of the service
* @member version The version of the service
* @member serTransportDependencies Indicates transport and serialization format dependencies of consuming the service
* @member requestedPermissions
* @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency
*/
type record ServiceDependency {
Json.String serName,
CategoryRef serCategory optional,
Json.String version,
TransportDependency serTransportDependencies optional,
Json.String requestedPermissions optional
}
/**
* @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)
* @member transport Information about the transport in this transport binding
* @member serializers Information about the serializers in this transport binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0
* @member labels Set of labels that allow to define groups of transport bindings
* @see ETSI GS MEC 010-2 Clause 6.2.1.18 Type: TransportDependency
*/
type record TransportDependency {
TransportDescriptor transport,
SerializerType serializers,
Labels labels
}
type record length(1..infinity) of Json.String Labels;
/**
* @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 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
* @member implSpecificInfo Additional implementation specific details of the transport
* @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor
*/
type record TransportDescriptor {
Json.String name,
Json.String description optional,
TransportTypes type_,
Json.String protocol,
Json.String version,
SecurityInfo security,
Json.String implSpecificInfo optional
}
/**
* @desc This data type represents the information of user context transfer capability of application
* @member statefulApplication If the application is stateful, this attribute shall be set to true
* @member userContextTransferSupport This attribute shall be present if the application is stateful and shall be absent otherwise
* @see ETSI GS MEC 010-2 Clause 6.2.1.20 Type: UserContextTransferCapability
*/
type record UserContextTransferCapability {
Json.Bool statefulApplication,
Json.Bool userContextTransferSupport optional
}
/**
* @desc This data type represents the network policy in the application instantiation and operation
* @member steeredNetwork This attribute provides an option for the application to specify a type of network to carry the application traffic
* @member steeredNetwork Provides an option for the application to specify a type of network to carry the application traffic
* @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy
*/
type record AppNetworkPolicy {
SteeredNetwork steeredNetwork
}
/**
* @desc Provides an option for the application to specify a type of network to carry the application traffic
* @member cellularNetwork The application prefers to a cellular network to carry its traffic
* @member wi_fiNetwork The application prefers to a Wi-Fi network to carry its traffic
* @member fixedAccessNetwork The application prefers to a fixed access network to carry its traffic
* @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy
*/
type record SteeredNetwork {
Json.Bool cellularNetwork optional,
Json.Bool wi_fiNetwork optional,
Json.Bool fixedAccessNetwork optional
} with {
variant (wi_fiNetwork) "name as 'wi-fiNetwork'";
}
} // End of group application_descriptor_information_model
group application_lifecycle_management_information_model {
/**
* @desc The LocationConstraints data type supports the specification of MEC application requirements related to MEC application deployment location constraints
* @member countryCode The two-letter ISO 3166 [0] country code in capital letters
* @member civicAddressElement Zero or more elements comprising the civic address
* @member area Geographic area
* @see ETSI GS MEC 010-2 Clause 6.2.2.2 Type: LocationConstraints
*/
type record LocationConstraints {
Json.String countryCode optional,
CivicAddressElement civicAddressElement optional,
Polygon area optional
}
type record CivicAddressElement {
integer caType,
Json.String caValue
}
type record Geometry {
Json.String type_,
Coordinates coordinates
} with {
variant (type_) "name as 'type'";
}
type record of Json.Number Coordinate;
type record of Coordinate Coordinates;
type record Property {
Json.String key,
Json.String value_
} with {
variant (value_) "name as 'value'";
}
type record of Property Properties;
type record Polygon {
Json.String type_,
Geometry geometry,
Properties properties,
Json.String this_
} with {
variant (type_) "name as 'type'";
variant (this_) "name as 'this'";
}
/**
* @desc The data type of CreateAppInstanceRequest represents the parameters for creating a new application instance resource
* @member appDId The application descriptor identifier
* @member appInstanceName Human-readable name of the application instance to be created
* @member appInstanceDescription Human-readable description of the application instance to be created
* @member appPlacementInfo Describes the information of selected MEC platform for the application instance to associate
* @see ETSI GS MEC 010-2 Clause 6.2.2.3 Type: CreateAppInstanceRequest
*/
type record CreateAppInstanceRequest {
Json.String appDId,
Json.String appInstanceName optional,
Json.String appInstanceDescription optional,
MepInformation appPlacementInfo optional
}
/**
* @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources
* @member id Identifier of the application instance represented by this data type
* @member appInstanceName Name of the application instance
* @member appInstanceDescription Human-readable description of the application instance to be created
* @member appDId The application descriptor identifier is managed by the application provider to identify the application descriptor in a globally unique way
* @member appProvider The onboarded application package provider name
* @member appName The onboarded application name
* @member appSoftVersion The application software version
* @member appDVersion Version of the application descriptor
* @member appPkgId Identifier of the onboarded application package
* @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance
* @member nsInstanceId Identifier of the NS instance created by NFVO in which the MEC application has been instantiated as a VNF instance
* @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 _links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.4 Type: AppInstanceInfo
*/
type record AppInstanceInfo {
Json.String id,
Json.String appInstanceName optional,
Json.String appInstanceDescription optional,
Json.String appDId,
Json.String appProvider,
Json.String appName,
Json.String appSoftVersion,
Json.String appDVersion,
Json.String appPkgId,
VimConnectionInfo vimConnectionInfo optional,
Json.String nsInstanceId optional,
Json.String vnfInstanceId optional,
InstantiationState instantiationState,
InstantiatedAppState instantiatedAppState optional,
CommunicationInterface communicationInterface optional,
Link links
} with {
variant (links) "name as '_links'";
}
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 record InstantiatedAppState {
OperationalState operationalState optional,
LocationInformation appInstLocation optional
}
type enumerated InstantiationState {
INSTANTIATED,
NOT_INSTANTIATED
}
type enumerated OperationalState {
STARTED,
STOPPED
}
/**
* @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources
* @member appInstSelectorType
* @member appInstances
* @member appsFromProviders Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers
* @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter
*/
type record AppInstanceSubscriptionFilter {
AppInstSelectorType appInstSelectorType,
AppInstances appInstances optional,
appsFromProviders appsFromProviders optional
}
type enumerated AppInstSelectorType {
VOID (0),
APP_IDENTITY (1),
APP_NAME (2),
APP_D_ID (3),
APP_FROM_PROVIDER (4)
} with {
variant "JSON: as number"
}
type record length(1..infinity) of Json.String AppInstances;
/**
* @desc Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers
* @member appProvider Name of the application provider to match
* @member appProducts Match application instances that belong to application products with certain product names, from one particular provider
* @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter
*/
type record AppsFromProvider {
Json.String appProvider,
AppProducts appProducts optional
}
type record length(1..infinity) of AppsFromProvider appsFromProviders;
type record AppProduct {
Json.String appName,
Versions versions optional
}
type record length(1..infinity) of AppProduct AppProducts;
type record Version {
Json.String appSoftVersion,
Json.String appDVersion optional
}
type record length(1..infinity) of Version Versions;
/**
* @desc This data type represents a subscription filter criteria to match an application LCM operation occurrence
* @member appInstanceSubscriptionFilter this attribute contains filter criteria that selects one or more application instances on which to receive "LCM operation occurrence" notifications
* @member notificationTypes Match particular notification types
* @member operationTypes Type of the LCM operation represented by this application instance LCM operation occurrence
* @member operationStates Type of the LCM operation state represented by this application instance LCM operation occurrence
* @see ETSI GS MEC 010-2 Clause 6.2.2.6 Type: AppLcmOpOccSubscriptionFilter
*/
type record AppLcmOpOccSubscriptionFilter {
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional,
Json.String notificationTypes optional,
OperationTypes operationTypes optional,
OperationStates operationStates optional
}
type enumerated OperationType {
INSTANTIATE,
OPERATE,
TERMINATE,
INVALID_OPERATE // For BI purpose only
}
type record length(1..infinity) of OperationType OperationTypes;
type enumerated OperationState {
STARTING,
PROCESSING,
COMPLETED,
FAILED,
FAILED_TEMP
}
type record length(1..infinity) of OperationState OperationStates;
/**
* @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 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
* @member appTermCandsForCoord Provides sets of applications as termination candidate alternatives that the MEO/MEAO shall select from when utilizing the coordinate LCM operation exchange
* @see ETSI GS MEC 010-2 Clause 6.2.2.7 Type: InstantiateAppRequest
*/
type record InstantiateAppRequest {
VirtualComputeDescriptor virtualComputeDescriptor optional,
VirtualStorageDescriptor virtualStorageDescriptor optional,
MECHostInformation selectedMECHostInfo,
LocationConstraints locationConstraints optional,
VimConnectionInfo vimConnectionInfo optional,
AppTermCandsForCoord appTermCandsForCoord optional
}
/**
* @desc This data type represents request parameters of the "Operate Application" operation
* @member changeStateTo The desired operational state
* @member stopType The stop type
* @member gracefulStopTimeout The time interval (in seconds) to wait for the application instance to be taken out of service during graceful stop, before stopping the application
* @see ETSI GS MEC 010-2 Clause 6.2.2.8 Type: OperateAppRequest
*/
type record OperateAppRequest {
OperationalState changeStateTo,
StopType stopType optional,
UInt32 gracefulStopTimeout optional
}
type enumerated StopType {
FORCEFUL,
GRACEFUL
}
/**
* @desc This data type represents request parameters of the "Terminate Application Request" operation
* @member terminationType Indicates whether forceful or graceful termination is requested
* @member gracefulTerminationTimeout This attribute is only applicable in case of graceful termination
* @see ETSI GS MEC 010-2 Clause 6.2.2.9 Type: TerminateAppRequest
*/
type record TerminateAppRequest {
TerminationType terminationType,
UInt32 gracefulTerminationTimeout optional
}
type StopType TerminationType;
/**
* @desc The data type represents a subscription to notification of application instance operational state change
* @member id Identifier of the subscription to application instance operational state change notification
* @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription"
* @member appInstanceState Application instance state subscribed to
* @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo
*/
type record AppInstSubscriptionInfo {
Json.String id,
Json.String subscriptionType,
AppInstanceState appInstanceState optional,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional,
Json.AnyURI callbackUri,
AppInstSubscriptionInfo_Link links
} with {
variant (links) "name as '_links'";
}
type enumerated AppInstanceState {
NOT_INSTANTIATED,
STARTED,
STOPPED
}
type record AppInstSubscriptionInfo_Link {
LinkType self_
} with {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents an application instance notification for informing the subscribers about operational state of application instance resources
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member appInstanceState Application instance state
* @member subscriptionId Identifier of the subscription related to this notification
* @member timeStamp Date and time of the notification generation
* @member appInstanceId Identifier of application instance
* @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
* @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification
*/
type record AppInstNotification {
Json.String id,
NotificationType notificationType,
AppInstanceState appInstanceState optional,
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appInstanceId,
Json.String appPkgId,
Json.String appDId,
LocationInformation appInstLocation optional,
AppInstNotification_Links links
} with {
variant (links) "name as '_links'";
}
type record AppInstNotification_Links {
LinkType subscription
}
/**
* @desc The data type represents the input parameters of "subscription operation" to notification of application lifecycle management for the operational state change of application instance
* @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceState Only send notifications for application instances that are in one of the states listed in this attribute
* @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.12 Type: AppInstSubscriptionRequest
*/
type record AppInstSubscriptionRequest {
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceState appInstanceState optional,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional
}
/**
* @desc This data type represents an application lifecycle management operation occurrence
* @member id Identifier of the subscription to application LCM operation occurrence notification
* @member operationState Operation state
* @member stateEnteredTime Date and time when the current state was entered
* @member startTime Date and time of the start of the operation
* @member lcmOperationType of the actual LCM operation represented by this application instance LCM operation occurrence
* @member operationParams Input parameters of the LCM operation
* @member isCancelPending If the application LCM operation occurrence operationState is in "PROCESSING" state and the operation is being cancelled, this attribute shall be set to true
* @member cancelMode The mode of an cancellation
* @member links 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 {
Json.String id,
OperationState operationState,
TimeStamp stateEnteredTime,
TimeStamp startTime,
LcmOperation lcmOperation,
OperationParams operationParams optional,
Json.Bool isCancelPending optional,
CancelMode cancelMode optional,
AppLcmOpOcc_Link links
} with {
variant (links) "name as '_links'";
}
type OperationType LcmOperation;
type union OperationParams {
InstantiateAppRequest instantiateAppRequest,
OperateAppRequest operateAppRequest,
TerminateAppRequest terminateAppRequest
}
type record AppLcmOpOcc_Link {
LinkType self_,
LinkType appInstance
} with {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents a subscription request to notification of application life cycle management operation occurrence
* @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appLcmOpOccSubscriptionFilter Subscription filter criteria to match specific application LCM operation occurrences
* @see ETSI GS MEC 010-2 Clause 6.2.2.14 Type: AppLcmOpOccSubscriptionRequest
*/
type record AppLcmOpOccSubscriptionRequest {
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional
}
/**
* @desc This data type represents a subscription to notifications of application life cycle management operation occurrence
* @member id Identifier of this subscription resource
* @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription"
* @member appLcmOpOccSubscriptionFilter Criteria used to select application LCM operation occurrences on which to send notifications related to this subscription
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo
*/
type record AppLcmOpOccSubscriptionInfo {
Json.String id,
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional,
AppLcmOpOccSubscriptionInfo_Link links
} with {
variant (links) "name as '_links'";
}
type record AppLcmOpOccSubscriptionInfo_Link {
LinkType self_
} with {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents a notification related to state changes of an application LCM operation occurrence which informs the subscribers
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member operationType Discriminator for the different notification types
* @member operationState Operation state
* @member subscriptionId Identifier of the subscription to this notification
* @member timeStamp Date and time of the notification generation
* @member appLcmOpOccId Identifier of application lifecycle management operation occurrence
* @member appInstanceId Identifier of application instance
* @member links Links to resources related to this notification
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification
*/
type record AppLcmOpOccNotification {
Json.String id,
NotificationType notificationType,
OperationType operationType,
OperationState operationState,
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appInstanceId,
AppLcmOpOccNotification_Link links
} with {
variant (links) "name as '_links'";
}
type record AppLcmOpOccNotification_Link {
LinkType appInstance,
LinkType subscription,
LinkType appLcmOpOcc
}
/**
* @desc The data type represents the parameters of MEC host information
* @member hostName Human-readable name of MEC host
* @member hostId KeyValuePairs
* @see ETSI GS MEC 010-2 Clause 6.2.2.17 Type: MECHostInformation
*/
type record MECHostInformation {
Json.String hostName optional,
KeyValuePairs hostId
}
/**
* @desc The VimConnectionInfo data type specifies the connection information of VIM for managing the resources of the application instance
* @member id The identifier of the VIM Connection
* @member vimId The identifier of the VIM instance
* @member vimType Discriminator for the different types of the VIM information
* @member interfaceInfo Information about the interface or interfaces to the VIM, if applicable, such as the URI of an interface endpoint to communicate with the VIM
* @member accessInfo Authentication credentials for accessing the VIM, and other access-related information such as tenants or infrastructure resource groups
* @member extra VIM type specific additional information
* @see ETSI GS MEC 010-2 Clause 6.2.2.18 Type: VimConnectionInfo
*/
type record VimConnectionInfo {
Json.String id,
Json.String vimId optional,
Json.String vimType,
KeyValuePairs interfaceInfo optional,
KeyValuePairs accessInfo optional,
KeyValuePairs extra optional
}
/**
* @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
} with {
variant (links) "name as '_links'";
}
type record SubscriptionLinkList_Link {
LinkType self_,
SubscriptionLinkList_Link_Subscriptions subscriptions optional
} with {
variant (self_) "name as 'self'";
}
type record SubscriptionLinkList_Link_Subscription {
Json.AnyURI href,
AppInstanceSubscriptionType subscriptionType
}
type record length(1..infinity) of SubscriptionLinkList_Link_Subscription SubscriptionLinkList_Link_Subscriptions;
/**
* @desc String representing the type of a subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types
*/
type Json.String AppInstanceSubscriptionType;
/**
* @desc This data type represents the parameters for configuring the MEP to run an application instance
* @member appServiceRequired Describes services a MEC application requires to run
* @member appServiceOptional Describes services a MEC application may use if available
* @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications
* @member appFeatureRequired Describes features a MEC application requires to run
* @member transportDependencies Transports, if any, that this application requires to be provided by the platform
* @member appTrafficRule Describes traffic rules the MEC application requires
* @member appDNSRule Describes DNS rules the MEC application requires
* @member appLatency Describes the maximum latency tolerated by the MEC application
* @member userContextTransferCapability If the application supports the user context transfer capability, this attribute shall be included
* @member appNetworkPolicy If present, it represents the application network policy of carrying the application traffic
* @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,
LatencyDescriptor appLatency optional,
UserContextTransferCapability userContextTransferCapability optional,
AppNetworkPolicy appNetworkPolicy optional
}
/**
* @desc The data type represents the parameters of MEC platform information
* @member mepName Human-readable name of MEC platform
* @member mepId Deployment-specific identifier of MEC platform
* @see ETSI GS MEC 010-2 Clause 6.2.2.22 Type: MepInformation
*/
type record MepInformation {
Json.String mepName optional,
Json.String mepId optional
}
/**
* @desc The AppTermCandsForCoord data type represents the parameters to provide candidates of applications to terminate in pre-emption situations for LCM coordination exchanges
* @member terminationOptions Sets of application options for the MEO/MEAO to select from as candidates for termination
* @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord
*/
type record AppTermCandsForCoord {
TerminationOptions terminationOptions
}
type record TerminationOption {
AppInstIdTerminationCands appInstIdTerminationCands
}
type record length(1..infinity) of Json.String AppInstIdTerminationCands;
type record length(1..infinity) of TerminationOption TerminationOptions;
/**
* @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier creation
* @member subscriptionType Shall be set to "AppIdentifierCreationSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.25 Type: AppInstIdCreationSubscriptionRequest
*/
type record AppInstIdCreationSubscriptionRequest {
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional
}
/**
* @desc The data type represents a subscription to notification of application instance identifier creation
* @member id Identifier of the subscription to application instance operational state change notification
* @member subscriptionType Shall be set to "AppIdentifierCreationSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo
*/
type record AppInstIdCreationSubscriptionInfo {
Json.String id,
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional,
AppInstIdCreationSubscriptionInfo_Link links
} with {
variant (links) "name as '_links'";
}
type record AppInstIdCreationSubscriptionInfo_Link {
LinkType self_
} with {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents a notification for informing the subscribers about the creation of a new "individual application instance" resource and the associated application instance identifier
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member subscriptionId Identifier of the subscription related to this notification
* @member timeStamp Date and time of the notification generation
* @member appInstanceId The created application instance Identifier
* @member links Links to resources related to this notification
* @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification
*/
type record AppInstanceIdentifierCreationNotification {
Json.String id,
NotificationType notificationType,
TimeStamp timeStamp,
Json.String appInstanceId,
AppInstanceIdentifierCreationNotification_Link links
} with {
variant (links) "name as '_links'";
}
type record AppInstanceIdentifierCreationNotification_Link {
LinkType subscription,
LinkType appInstance
}
/**
* @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier deletion
* @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.28 Type: AppInstIdDeletionSubscriptionRequest
*/
type record AppInstIdDeletionSubscriptionRequest {
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional
}
/**
* @desc The data type represents a subscription to notification of application instance identifier deletion
* @member id Identifier of the subscription to application instance operational state change notification
* @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo
*/
type record AppInstIdDeletionSubscriptionInfo {
Json.String id,
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional,
AppInstIdDeletionSubscriptionInfo_Link links
} with {
variant (links) "name as '_links'";
}
type record AppInstIdDeletionSubscriptionInfo_Link {
LinkType self_
} with {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents a notification for informing the subscribers about the deletion of an "individual application instance" resource and the associated application instance identifier
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member subscriptionId Identifier of the subscription related to this notification
* @member timeStamp Date and time of the notification generation
* @member appInstanceId The deleted application instance Identifier
* @member links Links to resources related to this notification
* @see ETSI GS MEC 010-2 Clause 6.2.2.30 Type: AppInstanceIdentifierDeletionNotification
*/
type record AppInstanceIdentifierDeletionNotification {
Json.String id,
NotificationType notificationType,
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appInstanceId,
AppInstanceIdentifierDeletionNotification_Link 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
* @member civicAddress Provides the civic address of the site hosting the MEC application instance
* @member Geographical position (i.e. latitude and longitude) where an instance is deployed
* @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation
*/
type record LocationInformation {
Json.String countryCode,
CivicAddressElement civicAddress optional,
Json.String geographicalPosition optional
}
/**
* @desc This data type represents the valid modes of cancelling an application LCM operation
* @see ETSI GS MEC 010-2 Clause 6.2.2.32 Type: CancelMode
*/
type StopType CancelMode;
} // End of group application_lifecycle_management_information_model
group application_package_information_model {
/**
* @desc The data type CreateAppPkg represents the parameters for creating a new application package resource
* @member appPkgName Name of the application package to be onboarded
* @member appPkgVersion Version of the application package to be onboarded
* @member appProvider The provider's name of the application package to be onboarded
* @member checksum Checksum of the onboarded application package
* @member userDefinedData User defined data for the application package
* @member appPkgPath Address information of the application package
* @see ETSI GS MEC 010-2 Clause 6.2.3.2 Type: CreateAppPkg
*/
type record CreateAppPkg {
Json.String appPkgName,
Json.String appPkgVersion,
Json.String appProvider optional,
Checksum checksum,
KeyValuePairs userDefinedData optional,
Json.AnyURI appPkgPath
}
/**
* @desc The data type AppPkgInfo represents the parameters for an application package resource
* @member id Identifier of the application package resource
* @member appDId The application descriptor identifier
* @member appProvider The provider's name of the onboarded application package
* @member appName Name of the onboarded application
* @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package
* @member appDVersion Version of the application descriptor
* @member checksum Checksum of the onboarded application package
* @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive
* @member softwareImages Information of application software image in application package
* @member additionalArtifacts Additional information of application package artifacts that are not application software images
* @member onboardingState Onboarding state of application package
* @member operationalState Operational state of the onboarded application package
* @member usageState Usage state of the onboarded instance of the application package
* @member mecInfo The MEC version that compatible with this application
* @member userDefinedData User defined data for the application package
* @member onboardingFailureDetails Failure details of current onboarding procedure
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo
*/
type record AppPkgInfo {
Json.String id,
Json.String appDId,
Json.String appProvider optional,
Json.String appName,
Json.String appSoftwareVersion,
Json.String appDVersion,
Checksum checksum,
Json.String signingCertificate optional,
AppPkgSWImageInfo softwareImages,
AppPkgArtifactInfo additionalArtifacts optional,
OnboardingState onboardingState,
AppPkgInfo_OperationalState operationalState,
UsageState usageState,
AppPkgInfo_MecInfo mecInfo,
KeyValuePairs userDefinedData optional,
ProblemDetails onboardingFailureDetails optional,
AppPkgInfo_Links links
} with {
variant (links) "name as '_links'";
}
type record of AppPkgInfo AppPkgInfoList;
type record AppPkgSWImageInfo_ {
// 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
}
type enumerated AppPkgInfo_OperationalState {
ENABLED,
DISABLED,
UNKNOWN // Used for BI purpose only
}
type enumerated UsageState {
IN_USE,
NOT_IN_USE
}
type record length(1..infinity) of Json.String AppPkgInfo_MecInfo;
type record AppPkgInfo_Links {
LinkType self_,
LinkType appD,
LinkType appPkgContent,
LinkType vnfPkgInfo optional
} with {
variant (self_) "name as 'self'";
}
/**
* @desc The data type represents a subscription to notification of application package management for the onboarding, or operational state change of application package
* @member id Identifier of the subscription to application package notification
* @member subscriptionType Type of subscription
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo
*/
type record AppPkgSubscriptionInfo {
Json.String id,
AppPkgSubscriptionType subscriptionType,
Json.AnyURI callbackUri,
AppPkgSubscriptionInfo_Link links
} with {
variant (links) "name as '_links'";
}
type record AppPkgSubscriptionInfo_Link {
LinkType self_
} with {
variant (self_) "name as 'self'"
}
/**
* @desc The data type represents a subscription link list of notification on application package management
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList
*/
type record AppPkgSubscriptionLinkList {
AppPkgSubscriptionLinkList_Link links
/**
* @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
* @member appName Name to identify the MEC application
* @member appProvider Provider of the application and of the AppD
* @member appSoftVersion Identifies the version of software of the MEC application
* @member appDVersion Identifies the version of the application descriptor
* @member mecVersion Identifies version(s) of MEC system compatible with the MEC application described in this version of the AppD
* @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
* @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications
* @member appFeatureRequired Describes features a MEC application requires to run
* @member appFeatureOptional Describes features a MEC application may use if available
* @member transportDependencies Transports, if any, that this application requires to be provided by the platform
* @member appTrafficRule Describes traffic rules the MEC application requires
* @member appDNSRule Describes DNS rules the MEC application requires
* @member appLatency Describes the maximum latency tolerated by the MEC application
* @member terminateAppInstanceOpConfig Configuration parameters for the Terminate application instance operation
* @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 {
Json.String appDId,
Json.String appName,
Json.String appProvider,
Json.String appSoftVersion,
Json.String appDVersion,
Json.String mecVersion,
Json.String appInfoName optional,
Json.String appDescription,
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,
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"
}
/**
* @desc The VirtualComputeDescriptor data type supports the specification of requirements related to virtual compute resources
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.1.3 Type: VirtualComputeDescriptor
*/
type record VirtualComputeDescriptor {
// FIXME shall follow the definition in clause 7.1.9.2.2 of ETSI GS NFV‑IFA 011 [0], with the following consideration:
}
/**
* @desc The SwImageDescriptor data type describes the software image of a MEC application
* @member
* @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 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
* @member
* @see ETSI GS MEC 010-2 Clause 6.2.1.5 Type: VirtualStorageDescriptor
*/
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,
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 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;
/**
* @desc The ServiceDescriptor data type describes a MEC service produced by a service-providing MEC applicationt
* @member serName The name of the service, for example, RNIS, LocationService, etc
* @member serCategory A Category reference of the service, defined in ETSI GS MEC 011 [17]i.0
* @member version The version of the service
* @member transportsSupported Indicates transports and serialization formats supported made available to the service-consuming application
* @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor
*/
type record ServiceDescriptor {
Json.String serName,
CategoryRef serCategory optional,
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
* @member transport Information about the transport in this binding
* @member serializers Information about the serializers in this binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0
* @see ETSI GS MEC 010-2 Clause 6.2.1.7 Type: ServiceDescriptor
*/
type record TransportsSupported {
TransportDescriptor transport,
ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers
}
/**
* @desc The FeatureDependency data type supports the specification of requirements of a MEC application related to a feature of MEC platform
* @member featureName The name of the feature, for example, UserApps, UEIdentity, etc
* @member version The version of the feature
* @see ETSI GS MEC 010-2 Clause 6.2.1.8 Type: FeatureDependency
*/
type record FeatureDependency {
Json.String featureName,
Json.String version
}
type record of FeatureDependency FeatureDependencies;
/**
* @desc The TrafficRuleDescriptor data type describes traffic rules related to a MEC application
* @member trafficRuleId Identifies the traffic rule
* @member filterType Definition of filter type: per FLOW or PACKET
* @member priority Priority of this traffic rule within the range 0 to 255. If traffic rule conflicts, the one with higher priority take precedence
* @member trafficFilter The filter used to identify specific flow/packets that need to be handled by the MEC host
* @member action_ Identifies the action of the MEC host data plane, when a packet matches the trafficFilter
* @member dstInterface Describes the destination interface information
* @see ETSI GS MEC 010-2 Clause 6.2.1.9 Type: TrafficRuleDescriptor
*/
type record TrafficRuleDescriptor {
Json.String trafficRuleId,
FilterType filterType,
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
} with {
variant "JSON: as number"
}
/**
* @desc Identifies the action of the MEC host data plane, when a packet matches the trafficFilter
*/
type enumerated Action {
DROP (0),
FORWARD_DECAPSULATED (1),
FORWARD_ENCAPSULATED (2),
PASSTHROUGH (3),
DUPLICATED_DECAPSULATED (4),
DUPLICATE_ENCAPSULATED (5)
} with {
variant "JSON: as number"
}
/**
* @desc The TrafficFilter data type supports the specification of MEC application requirements related to traffic rules
* @member srcAddress An IP address or a range of IP addresses
* @member dstAddress A IP address or a range of IP addresses
* @member srcPort A port or a range of ports
* @member dstPort A port or a range of ports
* @member protocol Specify the protocol of the traffic filter
* @member tag Used for tag based traffic rule
* @member uri An URI label, in application layer
* @member packetLabel A customized packet label in network layer, as defined by the owner of the MEC platform, is used to filter the traffic
* @member srcTunnelAddressUsed for GTP tunnel based traffic rule
* @member tgtTunnelAddress Used for GTP tunnel based traffic rule
* @member srcTunnelPort Used for GTP tunnel based traffic rule
* @member qCI Used to match all packets that have the same QCI
* @member dSCP Used to match all IPv4 packets that have the same DSCP
* @member tC Used to match all IPv6 packets that have the same TC
* @see ETSI GS MEC 010-2 Clause 6.2.1.10 Type: TrafficFilter
*/
type record TrafficFilter {
Json.String srcAddress optional,
Json.String dstAddress optional,
Json.String srcPort optional,
Json.String dstPort optional,
Json.String protocol optional,
Json.String tag optional,
Json.String uri optional,
Json.String packetLabel optional,
Json.String srcTunnelAddress optional,
Json.String tgtTunnelAddress optional,
Json.String srcTunnelPort optional,
Json.String dstTunnelPort optional,
Json.Integer qCI optional,
Json.Integer dSCP optional,
Json.Integer tC optional
}
/**
* @desc The InterfaceDescriptor data type describes an interface of a MEC application
* @member interfaceType Type of interface
* @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 dstIPAddress optional
}
type enumerated InterfaceType {
TUNNEL (0),
MAC (1),
IP (2)
} with {
variant "JSON: as number"
}
/**
* @desc The TunnelInfo data type supports the specification of MEC application requirements related to traffic rules
* @member tunnelType Type of tunnel
* @member tunnelDstAddress Destination address of the tunnel
* @member tunnelSrcAddress Source address of the tunnel
* @member tunnelSpecificData Parameters specific to the tunnel
* @see ETSI GS MEC 010-2 Clause 6.2.1.12 Type: TunnelInfo
*/
type record TunnelInfo {
TunnelType tunnelType,
Json.String tunnelDstAddress,
Json.String tunnelSrcAddress,
Json.String tunnelSpecificData optional
}
type enumerated TunnelType {
GTP_U (0),
GRE (1)
} with {
variant "JSON: as number"
}
/**
* @desc The DNSRuleDescriptor data type describes DNS rules associated with a MEC application
* @member dnsRuleId Identifies the DNS Rule
* @member domainName FQDN of the DNS rule
* @member ipAddressType Specifies the IP address type
* @member ttl Time-to-live value
* @see ETSI GS MEC 010-2 Clause 6.2.1.13 Type: DNSRuleDescriptor
*/
type record DNSRuleDescriptor {
Json.String dnsRuleId,
Json.String domainName,
Json.String ipAddressType,
IpAddress ipAddress,
Json.Integer ttl optional
}
type record of DNSRuleDescriptor DNSRuleDescriptors;
/**
* @desc The LatencyDescriptor data type describes latency requirements for a MEC application
* @member maxLatency The value of the maximum latency in nano seconds tolerated by the MEC application
* @see ETSI GS MEC 010-2 Clause 6.2.1.14 Type: LatencyDescriptor
*/
type record LatencyDescriptor {
Json.UInteger maxLatency
}
/**
* @desc The TerminateAppInstanceOpConfig data type supports the specification of MEC application requirements related to terminate application instance operation configuration
* @member
* @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 001 [1].
}
/**
* @desc The ChangeAppInstanceStateOpConfig data type supports the specification of MEC application requirements related to change application instance state operation configuration
* @member
* @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 001 [1].
}
/**
* @desc The ServiceDependency data type supports the specification of requirements of a service-consuming MEC application related to a MEC service
* @member serName The name of the service
* @member serCategory A Category reference of the service
* @member version The version of the service
* @member serTransportDependencies Indicates transport and serialization format dependencies of consuming the service
* @member requestedPermissions
* @see ETSI GS MEC 010-2 Clause 6.2.1.17 Type: ServiceDependency
*/
type record ServiceDependency {
Json.String serName,
CategoryRef serCategory optional,
Json.String version,
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)
* @member transport Information about the transport in this transport binding
* @member serializers Information about the serializers in this transport binding, as defined in the SerializerType type in ETSI GS MEC 011 [17]i.0
* @member labels Set of labels that allow to define groups of transport bindings
* @see ETSI GS MEC 010-2 Clause 6.2.1.18 Type: TransportDependency
*/
type record TransportDependency {
TransportDescriptor transport,
ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SerializerType serializers,
Labels labels
}
type record of TransportDependency TransportDependencies;
type record length(1..infinity) of Json.String Labels;
/**
* @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 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
* @member implSpecificInfo Additional implementation specific details of the transport
* @see ETSI GS MEC 010-2 Clause 6.2.1.19 Type: TransportDescriptor
*/
type record TransportDescriptor {
Json.String name,
Json.String description optional,
ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.TransportType type_,
Json.String protocol,
Json.String version,
ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues.SecurityInfo security,
Json.String implSpecificInfo optional
} with {
variant (type_) "name as 'type'";
}
/**
* @desc This data type represents the information of user context transfer capability of application
* @member statefulApplication If the application is stateful, this attribute shall be set to true
* @member userContextTransferSupport This attribute shall be present if the application is stateful and shall be absent otherwise
* @see ETSI GS MEC 010-2 Clause 6.2.1.20 Type: UserContextTransferCapability
*/
type record UserContextTransferCapability {
Json.Bool statefulApplication,
Json.Bool userContextTransferSupport optional
}
/**
* @desc This data type represents the network policy in the application instantiation and operation
* @member steeredNetwork This attribute provides an option for the application to specify a type of network to carry the application traffic
* @member steeredNetwork Provides an option for the application to specify a type of network to carry the application traffic
* @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy
*/
type record AppNetworkPolicy {
SteeredNetwork steeredNetwork
}
/**
* @desc Provides an option for the application to specify a type of network to carry the application traffic
* @member cellularNetwork The application prefers to a cellular network to carry its traffic
* @member wi_fiNetwork The application prefers to a Wi-Fi network to carry its traffic
* @member fixedAccessNetwork The application prefers to a fixed access network to carry its traffic
* @see ETSI GS MEC 010-2 Clause 6.2.1.21 Type: AppNetworkPolicy
*/
type record SteeredNetwork {
Json.Bool cellularNetwork optional,
Json.Bool wi_fiNetwork optional,
Json.Bool fixedAccessNetwork optional
} with {
variant (wi_fiNetwork) "name as 'wi-fiNetwork'";
}
/**
* @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].
}
/**
* @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
* @member countryCode The two-letter ISO 3166 [0] country code in capital letters
* @member civicAddressElement Zero or more elements comprising the civic address
* @member area Geographic area
* @see ETSI GS MEC 010-2 Clause 6.2.2.2 Type: LocationConstraints
*/
type record LocationConstraints {
Json.String countryCode optional,
CivicAddressElement civicAddressElement optional,
Polygon area optional
}
type record CivicAddressElement_ {
Json.Integer caType,
Json.String caValue
}
type record of CivicAddressElement_ CivicAddressElement;
type record Geometry {
Json.String type_,
Coordinates coordinates
} with {
variant (type_) "name as 'type'";
}
type record of Json.Number Coordinate;
type record of Coordinate Coordinates;
type record Property {
Json.String key,
Json.String value_
} with {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this resource
* @member self_ URI of this resource
* @member subscriptions A link list to the subscriptions to an application package
* @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList
*/
type record AppPkgSubscriptionLinkList_Link {
LinkType self_,
AppPkgSubscriptionLinkList_Link_Subscriptions subscriptions optional
variant (value_) "name as 'value'";
}
type record of Property Properties;
type record Polygon {
Json.String type_,
Geometry geometry,
Properties properties,
Json.String this_
} with {
variant (self_) "name as 'self'";
}
variant (type_) "name as 'type'";
variant (this_) "name as 'this'";
}
/**
* @desc The data type of CreateAppInstanceRequest represents the parameters for creating a new application instance resource
* @member appDId The application descriptor identifier
* @member appInstanceName Human-readable name of the application instance to be created
* @member appInstanceDescription Human-readable description of the application instance to be created
* @member appPlacementInfo Describes the information of selected MEC platform for the application instance to associate
* @see ETSI GS MEC 010-2 Clause 6.2.2.3 Type: CreateAppInstanceRequest
*/
type record CreateAppInstanceRequest {
Json.String appDId,
Json.String appInstanceName optional,
Json.String appInstanceDescription optional,
MepInformation appPlacementInfo optional
}
/**
* @desc The data type of AppInstanceInfo represents the parameters of instantiated application instance resources
* @member id Identifier of the application instance represented by this data type
* @member appInstanceName Name of the application instance
* @member appInstanceDescription Human-readable description of the application instance to be created
* @member appDId The application descriptor identifier is managed by the application provider to identify the application descriptor in a globally unique way
* @member appProvider The onboarded application package provider name
* @member appName The onboarded application name
* @member appSoftVersion The application software version
* @member appDVersion Version of the application descriptor
* @member appPkgId Identifier of the onboarded application package
* @member vimConnectionInfo Information about VIM connections to be used for managing the resources for the application instance
* @member nsInstanceId Identifier of the NS instance created by NFVO in which the MEC application has been instantiated as a VNF instance
* @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 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
*/
type record AppInstanceInfo {
Json.String id,
Json.String appInstanceName optional,
Json.String appInstanceDescription optional,
Json.String appDId,
Json.String appProvider,
Json.String appName,
Json.String appSoftVersion,
Json.String appDVersion,
Json.String appPkgId,
VimConnectionInfo vimConnectionInfo optional,
Json.String nsInstanceId optional,
Json.String vnfInstanceId optional,
InstantiationState instantiationState,
InstantiatedAppState instantiatedAppState optional,
CommunicationInterface communicationInterface optional,
Link links
} with {
variant (links) "name as '_links'";
}
type record of AppInstanceInfo AppInstanceInfoList;
type enumerated InstantiationState {
INSTANTIATED (0),
NOT_INSTANTIATED (1)
}
type record InstantiatedAppState {
OperationalState operationalState optional,
LocationInformation appInstLocation optional,
McioInfo mcioInfo optional
}
type enumerated OperationalState {
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
* @member appInstances
* @member appsFromProviders Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers
* @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter
*/
type record AppInstanceSubscriptionFilter {
AppInstSelectorType appInstSelectorType,
AppInstances appInstances optional,
appsFromProviders appsFromProviders optional
}
type enumerated AppInstSelectorType {
VOID (0),
APP_IDENTITY (1),
APP_NAME (2),
APP_D_ID (3),
APP_FROM_PROVIDER (4)
} with {
variant "JSON: as number"
}
type record length(1..infinity) of Json.String AppInstances;
/**
* @desc Match existing application instances, or those created in the future whilst the subscription is active, that belong to applications from certain providers
* @member appProvider Name of the application provider to match
* @member appProducts Match application instances that belong to application products with certain product names, from one particular provider
* @see ETSI GS MEC 010-2 Clause 6.2.2.5 Type: AppInstanceSubscriptionFilter
*/
type record AppsFromProvider {
Json.String appProvider,
AppProducts appProducts optional
}
type record length(1..infinity) of AppsFromProvider appsFromProviders;
type record AppProduct {
Json.String appName,
Versions versions optional
}
type record length(1..infinity) of AppProduct AppProducts;
type record Version {
Json.String appSoftVersion,
AppDVersion appDVersion optional
}
type record of Json.String AppDVersion;
type record length(1..infinity) of Version Versions;
/**
* @desc This data type represents a subscription filter criteria to match an application LCM operation occurrence
* @member appInstanceSubscriptionFilter this attribute contains filter criteria that selects one or more application instances on which to receive "LCM operation occurrence" notifications
* @member notificationTypes Match particular notification types
* @member operationTypes Type of the LCM operation represented by this application instance LCM operation occurrence
* @member operationStates Type of the LCM operation state represented by this application instance LCM operation occurrence
* @see ETSI GS MEC 010-2 Clause 6.2.2.6 Type: AppLcmOpOccSubscriptionFilter
*/
type record AppLcmOpOccSubscriptionFilter {
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional,
Json.String notificationTypes optional,
OperationTypes operationTypes optional,
OperationStates operationStates optional
}
type enumerated OperationType {
INSTANTIATE (0),
OPERATE (1),
TERMINATE (2)
}
type record length(1..infinity) of OperationType OperationTypes;
type enumerated OperationState {
STARTING (0),
PROCESSING (1),
COMPLETED (2),
FAILED (3),
FAILED_TEMP (4)
}
type record length(1..infinity) of OperationState OperationStates;
/**
* @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
* @member appTermCandsForCoord Provides sets of applications as termination candidate alternatives that the MEO/MEAO shall select from when utilizing the coordinate LCM operation exchange
* @see ETSI GS MEC 010-2 Clause 6.2.2.7 Type: InstantiateAppRequest
*/
type record InstantiateAppRequest {
VirtualComputeDescriptor virtualComputeDescriptor optional,
OsContainerDescriptors osContainerDescriptor optional,
VirtualStorageDescriptor virtualStorageDescriptor optional,
MECHostInformation selectedMECHostInfo,
LocationConstraints locationConstraints optional,
VimConnectionInfos vimConnectionInfo optional,
AppTermCandsForCoord appTermCandsForCoord optional
}
/**
* @desc This data type represents request parameters of the "Operate Application" operation
* @member changeStateTo The desired operational state
* @member stopType The stop type
* @member gracefulStopTimeout The time interval (in seconds) to wait for the application instance to be taken out of service during graceful stop, before stopping the application
* @see ETSI GS MEC 010-2 Clause 6.2.2.8 Type: OperateAppRequest
*/
type record OperateAppRequest {
OperationalState changeStateTo,
StopType stopType optional,
Json.UInteger gracefulStopTimeout optional
}
type enumerated StopType {
FORCEFUL (0),
GRACEFUL (1),
ERROR_CASE (3) // In case of Bad Request tests
}
/**
* @desc This data type represents request parameters of the "Terminate Application Request" operation
* @member terminationType Indicates whether forceful or graceful termination is requested
* @member gracefulTerminationTimeout This attribute is only applicable in case of graceful termination
* @see ETSI GS MEC 010-2 Clause 6.2.2.9 Type: TerminateAppRequest
*/
type record TerminateAppRequest {
TerminationType terminationType,
Json.UInteger gracefulTerminationTimeout optional
}
type StopType TerminationType;
/**
* @desc The data type represents a subscription to notification of application instance operational state change
* @member id Identifier of the subscription to application instance operational state change notification
* @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription"
* @member appInstanceState Application instance state subscribed to
* @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.10 Type: AppInstSubscriptionInfo
*/
type record AppInstSubscriptionInfo {
Json.String id,
Json.String subscriptionType,
AppInstanceState appInstanceState optional,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional,
Json.AnyURI callbackUri,
AppInstSubscriptionInfo_Link links
} with {
variant (links) "name as '_links'";
}
type enumerated AppInstanceState {
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 {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents an application instance notification for informing the subscribers about operational state of application instance resources
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member appInstanceState Application instance state
* @member subscriptionId Identifier of the subscription related to this notification
* @member timeStamp Date and time of the notification generation
* @member appInstanceId Identifier of application instance
* @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 Links to resources related to this notification
* @see ETSI GS MEC 010-2 Clause 6.2.2.11 Type: AppInstNotification
*/
type record AppInstNotification {
Json.String id,
NotificationType notificationType,
AppInstanceState appInstanceState optional,
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appInstanceId,
Json.String appPkgId,
Json.String appDId,
LocationInformation appInstLocation optional,
AppInstNotification_Links links
} with {
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
}
/**
* @desc The data type represents the input parameters of "subscription operation" to notification of application lifecycle management for the operational state change of application instance
* @member subscriptionType Shall be set to "AppInstanceStateChangeSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceState Only send notifications for application instances that are in one of the states listed in this attribute
* @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.12 Type: AppInstSubscriptionRequest
*/
type record AppInstSubscriptionRequest {
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceState appInstanceState optional,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional
}
type record of AppInstSubscriptionRequest AppInstSubscriptionRequestList;
/**
* @desc This data type represents an application lifecycle management operation occurrence
* @member id Identifier of the subscription to application LCM operation occurrence notification
* @member operationState Operation state
* @member stateEnteredTime Date and time when the current state was entered
* @member startTime Date and time of the start of the operation
* @member lcmOperationType of the actual LCM operation represented by this application instance LCM operation occurrence
* @member operationParams Input parameters of the LCM operation
* @member isCancelPending If the application LCM operation occurrence operationState is in "PROCESSING" state and the operation is being cancelled, this attribute shall be set to true
* @member cancelMode The mode of an cancellation
* @member links 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 {
Json.String id,
OperationState operationState,
TimeStamp stateEnteredTime,
TimeStamp startTime,
OperationType lcmOperation,
OperationParams operationParams optional,
Json.Bool isCancelPending optional,
CancelMode cancelMode optional,
AppLcmOpOcc_Link links
} with {
variant (links) "name as '_links'";
}
type record of AppLcmOpOcc AppLcmOpOccList;
/**
* @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
} with {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents a subscription request to notification of application life cycle management operation occurrence
* @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appLcmOpOccSubscriptionFilter Subscription filter criteria to match specific application LCM operation occurrences
* @see ETSI GS MEC 010-2 Clause 6.2.2.14 Type: AppLcmOpOccSubscriptionRequest
*/
type record AppLcmOpOccSubscriptionRequest {
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional
}
/**
* @desc This data type represents a subscription to notifications of application life cycle management operation occurrence
* @member id Identifier of this subscription resource
* @member subscriptionType Shall be set to "AppLcmOpOccStateChangeSubscription"
* @member appLcmOpOccSubscriptionFilter Criteria used to select application LCM operation occurrences on which to send notifications related to this subscription
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.15 Type: AppLcmOpOccSubscriptionInfo
*/
type record AppLcmOpOccSubscriptionInfo {
Json.String id,
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppLcmOpOccSubscriptionFilter appLcmOpOccSubscriptionFilter optional,
AppLcmOpOccSubscriptionInfo_Link links
} with {
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 {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents a notification related to state changes of an application LCM operation occurrence which informs the subscribers
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member operationType Discriminator for the different notification types
* @member operationState Operation state
* @member subscriptionId Identifier of the subscription to this notification
* @member timeStamp Date and time of the notification generation
* @member appLcmOpOccId Identifier of application lifecycle management operation occurrence
* @member appInstanceId Identifier of application instance
* @member links Links to resources related to this notification
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.16 Type: AppLcmOpOccNotification
*/
type record AppLcmOpOccNotification {
Json.String id,
NotificationType notificationType,
OperationType operationType,
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,
LinkType appLcmOpOcc
}
/**
* @desc The data type represents the parameters of MEC host information
* @member hostName Human-readable name of MEC host
* @member hostId KeyValuePairs
* @see ETSI GS MEC 010-2 Clause 6.2.2.17 Type: MECHostInformation
*/
type record MECHostInformation {
Json.String hostName optional,
KeyValuePairs hostId
}
/**
* @desc The VimConnectionInfo data type specifies the connection information of VIM for managing the resources of the application instance
* @member id The identifier of the VIM Connection
* @member vimId The identifier of the VIM instance
* @member vimType Discriminator for the different types of the VIM information
* @member interfaceInfo Information about the interface or interfaces to the VIM, if applicable, such as the URI of an interface endpoint to communicate with the VIM
* @member accessInfo Authentication credentials for accessing the VIM, and other access-related information such as tenants or infrastructure resource groups
* @member extra VIM type specific additional information
* @see ETSI GS MEC 010-2 Clause 6.2.2.18 Type: VimConnectionInfo
*/
type record VimConnectionInfo {
Json.String id,
Json.String vimId optional,
Json.String vimType,
KeyValuePairs interfaceInfo optional,
KeyValuePairs accessInfo optional,
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 AppInstanceSubscriptionLinkList {
AppInstanceSubscriptionLinkList_Link links
} with {
variant (links) "name as '_links'";
}
/**
* @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_,
AppInstanceSubscriptionLinkList_Link_Subscriptions subscriptions optional
} with {
variant (self_) "name as 'self'";
}
/**
* @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 AppInstanceSubscriptionLinkList_Link_Subscription AppInstanceSubscriptionLinkList_Link_Subscriptions;
/**
* @desc String representing the type of a subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.20.2 Simple data types
*/
type Json.String AppInstanceSubscriptionType;
/**
* @desc This data type represents the parameters for configuring the MEP to run an application instance
* @member appServiceRequired Describes services a MEC application requires to run
* @member appServiceOptional Describes services a MEC application may use if available
* @member appServiceProduced Describes services a MEC application is able to produce to the platform or other MEC applications
* @member appFeatureRequired Describes features a MEC application requires to run
* @member transportDependencies Transports, if any, that this application requires to be provided by the platform
* @member appTrafficRule Describes traffic rules the MEC application requires
* @member appDNSRule Describes DNS rules the MEC application requires
* @member appLatency Describes the maximum latency tolerated by the MEC application
* @member userContextTransferCapability If the application supports the user context transfer capability, this attribute shall be included
* @member appNetworkPolicy If present, it represents the application network policy of carrying the application traffic
* @see ETSI GS MEC 010-2 Clause 6.2.2.21 Type: ConfigPlatformForAppRequest
*/
type record ConfigPlatformForAppRequest {
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
}
/**
* @desc The data type represents the parameters of MEC platform information
* @member mepName Human-readable name of MEC platform
* @member mepId Deployment-specific identifier of MEC platform
* @see ETSI GS MEC 010-2 Clause 6.2.2.22 Type: MepInformation
*/
type record MepInformation {
Json.String mepName optional,
Json.String mepId optional
}
/**
* @desc The AppTermCandsForCoord data type represents the parameters to provide candidates of applications to terminate in pre-emption situations for LCM coordination exchanges
* @member terminationOptions Sets of application options for the MEO/MEAO to select from as candidates for termination
* @see ETSI GS MEC 010-2 Clause 6.2.2.23 Type: AppTermCandsForCoord
*/
type record AppTermCandsForCoord {
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
}
type record length(1..infinity) of Json.String AppInstIdTerminationCands;
type record length(1..infinity) of TerminationOption TerminationOptions;
/**
* @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier creation
* @member subscriptionType Shall be set to "AppIdentifierCreationSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.25 Type: AppInstIdCreationSubscriptionRequest
*/
type record AppInstIdCreationSubscriptionRequest {
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional
}
/**
* @desc The data type represents a subscription to notification of application instance identifier creation
* @member id Identifier of the subscription to application instance operational state change notification
* @member subscriptionType Shall be set to "AppIdentifierCreationSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.26 Type: AppInstIdCreationSubscriptionInfo
*/
type record AppInstIdCreationSubscriptionInfo {
Json.String id,
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional,
AppInstIdCreationSubscriptionInfo_Link links
} with {
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 {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents a notification for informing the subscribers about the creation of a new "individual application instance" resource and the associated application instance identifier
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member subscriptionId Identifier of the subscription related to this notification
* @member timeStamp Date and time of the notification generation
* @member appInstanceId The created application instance Identifier
* @member links Links to resources related to this notification
* @see ETSI GS MEC 010-2 Clause 6.2.2.27 Type: AppInstanceIdentifierCreationNotification
*/
type record AppInstanceIdentifierCreationNotification {
Json.String id,
NotificationType notificationType,
TimeStamp timeStamp,
Json.String appInstanceId,
AppInstanceIdentifierCreationNotification_Link links
} with {
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
}
/**
* @desc The data type represents the input parameters of "subscription operation" to notification of application instance identifier deletion
* @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceSubscriptionFilter Criteria used to filter application instances for which to send notifications related to this subscription
* @see ETSI GS MEC 010-2 Clause 6.2.2.28 Type: AppInstIdDeletionSubscriptionRequest
*/
type record AppInstIdDeletionSubscriptionRequest {
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional
}
/**
* @desc The data type represents a subscription to notification of application instance identifier deletion
* @member id Identifier of the subscription to application instance operational state change notification
* @member subscriptionType Shall be set to "AppIdentifierDeletionSubscription"
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member appInstanceSubscriptionFilter Criteria used to select application instances on which to send notifications related to this subscription
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.2.29 Type: AppInstIdDeletionSubscriptionInfo
*/
type record AppInstIdDeletionSubscriptionInfo {
Json.String id,
Json.String subscriptionType,
Json.AnyURI callbackUri,
AppInstanceSubscriptionFilter appInstanceSubscriptionFilter optional,
AppInstIdDeletionSubscriptionInfo_Link links
} with {
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 {
variant (self_) "name as 'self'";
}
/**
* @desc This data type represents a notification for informing the subscribers about the deletion of an "individual application instance" resource and the associated application instance identifier
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member subscriptionId Identifier of the subscription related to this notification
* @member timeStamp Date and time of the notification generation
* @member appInstanceId The deleted application instance Identifier
* @member links Links to resources related to this notification
* @see ETSI GS MEC 010-2 Clause 6.2.2.30 Type: AppInstanceIdentifierDeletionNotification
*/
type record AppInstanceIdentifierDeletionNotification {
Json.String id,
NotificationType notificationType,
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appInstanceId,
AppInstIdDeletionSubscriptionRequest links
} with {
variant (links) "name as '_links'";
}
/**
* @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
* @member civicAddress Provides the civic address of the site hosting the MEC application instance
* @member Geographical position (i.e. latitude and longitude) where an instance is deployed
* @see ETSI GS MEC 010-2 Clause 6.2.2.31 Type: LocationInformation
*/
type record LocationInformation {
Json.String countryCode,
CivicAddressElement civicAddress optional,
Json.String geographicalPosition optional
}
/**
* @desc This data type represents the valid modes of cancelling an application LCM operation
* @see ETSI GS MEC 010-2 Clause 6.2.2.32 Type: CancelMode
*/
type StopType CancelMode;
/**
* @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].
}
/**
* @desc The data type CreateAppPkg represents the parameters for creating a new application package resource
* @member appPkgName Name of the application package to be onboarded
* @member appPkgVersion Version of the application package to be onboarded
* @member appProvider The provider's name of the application package to be onboarded
* @member checksum Checksum of the onboarded application package
* @member userDefinedData User defined data for the application package
* @member appPkgPath Address information of the application package
* @see ETSI GS MEC 010-2 Clause 6.2.3.2 Type: CreateAppPkg
*/
type record CreateAppPkg {
Json.String appPkgName,
Json.String appPkgVersion,
Json.String appProvider optional,
Checksum checksum,
KeyValuePairs userDefinedData optional,
Json.AnyURI appPkgPath
}
/**
* @desc The data type AppPkgInfo represents the parameters for an application package resource
* @member id Identifier of the application package resource
* @member appDId The application descriptor identifier
* @member appProvider The provider's name of the onboarded application package
* @member appName Name of the onboarded application
* @member appSoftwareVersion Software version of the application. This is updated when there is any change to the software in the onboarded application package
* @member appDVersion Version of the application descriptor
* @member checksum Checksum of the onboarded application package
* @member signingCertificate The singleton signing certificate if it is included as a file in the AppD archive
* @member softwareImages Information of application software image in application package
* @member additionalArtifacts Additional information of application package artifacts that are not application software images
* @member onboardingState Onboarding state of application package
* @member operationalState Operational state of the onboarded application package
* @member usageState Usage state of the onboarded instance of the application package
* @member mecInfo The MEC version that compatible with this application
* @member userDefinedData User defined data for the application package
* @member onboardingFailureDetails Failure details of current onboarding procedure
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.3.3 Type: AppPkgInfo
*/
type record AppPkgInfo {
Json.String id,
Json.String appDId,
Json.String appProvider optional,
Json.String appName,
Json.String appSoftwareVersion,
Json.String appDVersion,
Checksum checksum,
Json.String signingCertificate optional,
AppPkgSWImageInfo softwareImages,
AppPkgArtifactInfo additionalArtifacts optional,
OnboardingState onboardingState,
AppPkgInfo_OperationalState operationalState,
UsageState usageState,
AppPkgInfo_MecInfo mecInfo,
KeyValuePairs userDefinedData optional,
ProblemDetails onboardingFailureDetails optional,
AppPkgInfo_Links links
} with {
variant (links) "name as '_links'";
}
type record of AppPkgInfo AppPkgInfoList;
type record AppPkgSWImageInfo_ {
// 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 (0),
UPLOADING (1),
PROCESSING (2),
ONBOARDED (3)
}
type enumerated AppPkgInfo_OperationalState {
ENABLED (0),
DISABLED (1),
ERROR_BAD_REQUEST (2)
}
type enumerated UsageState {
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,
LinkType appPkgContent,
LinkType vnfPkgInfo optional
} with {
variant (self_) "name as 'self'";
}
/**
* @desc The data type represents a subscription to notification of application package management for the onboarding, or operational state change of application package
* @member id Identifier of the subscription to application package notification
* @member subscriptionType Type of subscription
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.3.4 Type: AppPkgSubscriptionInfo
*/
type record AppPkgSubscriptionInfo {
Json.String id,
AppPkgSubscriptionType subscriptionType,
Json.AnyURI callbackUri,
AppPkgSubscriptionInfo_Link links
} with {
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 {
variant (self_) "name as 'self'"
}
/**
* @desc The data type represents a subscription link list of notification on application package management
* @member links Links to resources related to this resource
* @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList
*/
type record AppPkgSubscriptionLinkList {
AppPkgSubscriptionLinkList_Link links
} with {
variant (links) "name as '_links'";
}
/**
* @desc Links to resources related to this resource
* @member self_ URI of this resource
* @member subscriptions A link list to the subscriptions to an application package
* @see ETSI GS MEC 010-2 Clause 6.2.3.5 Type: AppPkgSubscriptionLinkList
*/
type record AppPkgSubscriptionLinkList_Link {
LinkType self_,
AppPkgSubscriptionLinkList_Link_Subscriptions subscriptions optional
} with {
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
}
type record length(1..infinity) of AppPkgSubscriptionLinkList_Link_Subscription AppPkgSubscriptionLinkList_Link_Subscriptions;
/**
* @desc This data type represents an application package management notification for informing the subscribers about onboarding application package resources
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member subscriptionId Identifier of the subscription to this notification
* @member timeStamp Date and time of the notification generation
* @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 links Links to resources related to this notification
* @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification
*/
type record AppPkgNotification {
Json.String id,
Json.String notificationType,
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appPkgId,
Json.String appDId,
AppPkgInfo_OperationalState operationalState,
AppPkgNotification_Link links
} with {
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
}
/**
* @desc The data type represents the input parameters of "subscription operation" to notification of application package management for the onboarding, or operational state change of application package
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member subscriptionType Type of the subscription
* @member appPkgFilter The attribute-based filter is to filter application packages on which the query applies
* @see ETSI GS MEC 010-2 Clause 6.2.3.7 Type: AppPkgSubscription
*/
type record AppPkgSubscription {
Json.AnyURI callbackUri,
AppPkgSubscriptionType subscriptionType,
AppPkgFilter appPkgFilter optional
}
/**
* @desc The data type represents modifications of the "AppPkgInfo" data type that can be requested to perform "application package operation"
* @member New value of the "operationalState" attribute of the "OnboardedAppPkgInfo" structure
* @see ETSI GS MEC 010-2 Clause 6.2.3.8 Type: AppPkgInfoModifications
*/
type record AppPkgInfoModifications {
AppPkgInfo_OperationalState operationalState
}
/**
* @desc String representing the type of a subscription
* @see ETSI GS MEC 010-2 Clause 6.2.3.9.2 Simple data types
*/
type Json.String AppPkgSubscriptionType;
/**
* @desc This data type represents subscription filter criteria to match application package
* @member appPkgInfoId Match the application package identifier which is allocated by the MEO
* @member appDId Match the application descriptor identifier which is allocated by the application provider
* @member appProvider Match the provider's name of the onboarded application
* @member appName Match the name of the onboarded application
* @member appSoftwareVersion Match the software version of the application package
* @member appDVersion Match the version of the application descriptor
* @member operationalState Match particular operational state of the application package
* @member usageState Match particular usage state of the application package
* @see ETSI GS MEC 010-2 Clause 6.2.3.10 Type: AppPkgFilter
*/
type record AppPkgFilter {
Json.String appPkgInfoId optional,
Json.String appDId optional,
Json.String appProvider optional,
Json.String appName optional,
Json.String appSoftwareVersion optional,
Json.String appDVersion optional,
AppPkgInfo_OperationalState operationalState optional,
UsageState usageState optional
}
/**
* @desc This type represents a grant request
* @member appInstanceId Identifier of the application instance which this grant request is related to
* @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the GrantRequest
* @member appDId Identifier of the AppD that defines the application for which the LCM operation is to be granted
* @member operation The lifecycle management operation for which granting is requested
* @member addResources List of resource definitions in the AppD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource
* @member tempResources List of resource definitions in the AppD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request
* @member removeResources Removed by the LCM operation which is related to this grant request, with one entry per resource
* @member updateResources Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource
* @member additionalParams MEPM, specific to the application and the LCM operation
* @member links Links to resources related to this request
* @see ETSI GS MEC 010-2 Clause 6.2.4 Granting information model
*/
type record GrantRequest {
Json.String appInstanceId,
Json.String appLcmOpOccId,
Json.String appDId,
OperationType operation,
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
}
/**
* @desc This type provides information of an existing or proposed resource used by the application
* @member id Identifier of this "ResourceDefinition" structure, unique at least within the scope of the "GrantRequest" structure
* @member type_ Type of the resource definition referenced
* @member vduId Reference to the related VDU in the AppD applicable to this resource
* @member resourceTemplateId Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD
* @member resource Resource information for an existing resource
* @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition
*/
type record ResourceDefinition {
Json.String id,
ResourceDefinition_Type type_,
Json.String vduId optional,
ResourceTemplateId resourceTemplateId,
ResourceDefinition_Resource resource
} with {
variant (type_) "name as 'type'";
}
type record of ResourceDefinition ResourceDefinitions;
type enumerated ResourceDefinition_Type {
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
}
/**
* @desc This type represents a grant
* @member id Identifier of the Grant
* @member appInstanceId Identifier of the application instance which this Grant is related to
* @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the Grant
* @member vimConnections Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections
* @member zones Identifies resource zones where the resources are approved to be allocated by the MEPM
* @member zoneGroups Information about groups of resource zones that are related and that the MEO has chosen to fulfil a zoneGroup constraint in the Grant request
* @member addResources List of resources that are approved to be added, with one entry per resource
* @member tempResources List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource
* @member removeResources List of resources that are approved to be removed, with one entry per resource
* @member updateResources List of resources that are approved to be modified, with one entry per resource
* @member vimAssets Information about assets for the application that are managed by the MEO in the VIM, such as software images
* @member extVirtualLinks Information about external VLs to connect the application instance to
* @member MEPM, specific to the application and the LCM operation
* @member links Links to resources related to this request
* @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant
*/
type record Grant {
Json.String id,
Json.String appInstanceId,
Json.String appLcmOpOccId,
VimConnectionInfos vimConnections optional,
ZoneInfos zones optional,
ZoneGroupInfos zoneGroups optional,
GrantInfos addResources optional,
GrantInfos tempResources optional,
GrantInfos removeResources optional,
GrantInfos updateResources optional,
VimAssets vimAssets optional,
ExtVirtualLinkDatas extVirtualLinks optional,
KeyValuePairs additionalParams optional,
Grant_Link links
} with {
variant (links) "name as '_links'";
}
type record VimAssets {
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
}
/**
* @desc This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted
* @member resourceDefinitionId Identifier of the related "ResourceDefinition" structure from the related "GrantRequest" structure
* @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,
KeyValuePairs mcioConstraints optional
}
type record of GrantInfo GrantInfos;
/**
* @desc This type provides information regarding a resource zone
* @member id The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the "Grant" structure
* @member zoneId The identifier of the resource zone, as managed by the resource management layer (typically, the VIM)
* @member vimConnectionId Identifier of the connection to the VIM that manages the resource zone
* @see ETSI GS MEC 010-2 Clause 6.2.4.6 Type: ZoneInfo
*/
type record ZoneInfo {
Json.String id,
Json.String zoneId,
Json.String vimConnectionId optional
}
type record of ZoneInfo ZoneInfos;
/**
* @desc This type provides information regarding a resource zone group
* @member zoneId References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group
* @see ETSI GS MEC 010-2 Clause 6.2.4.7 Type: ZoneGroupInfo
*/
type record ZoneGroupInfo {
ZoneIds zoneId
}
type record of ZoneGroupInfo ZoneGroupInfos;
type record of Json.String ZoneIds;
/**
* @desc This type represents an external VL
* @member id The identifier of the external VL instance
* @member vimConnectionId Identifier of the VIM connection to manage this resource
* @member resourceId The identifier of the resource in the scope of the VIM
* @member extCps External CPs of the application instance to be connected to this external VL
* @member extLinkPorts Externally provided link ports to be used to connect external connection points to this external VL
* @see ETSI GS MEC 010-2 Clause 6.2.4.8 Type: ExtVirtualLinkData
*/
type record ExtVirtualLinkData {
Json.String id,
Json.String vimConnectionId optional,
Json.String resourceId,
AppExtCpData extCps,
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
* @member id Identifier of this link port as provided by the entity that has created the link port
* @member resourceHandleReference to the virtualised resource realizing this link port
* @see ETSI GS MEC 010-2 Clause 6.2.4.9 Type: ExtLinkPortData
*/
type record ExtLinkPortData {
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
* @member vimConnectionId Identifier of the VIM connection to manage the resource
* @member resourceId Identifier of the resource in the scope of the VIM
* @member vimLevelResourceType Type of the resource in the scope of the VIM
* @see ETSI GS MEC 010-2 Clause 6.2.4.10 Type: ResourceHandle
*/
type record ResourceHandle {
Json.String vimConnectionId optional,
Json.String resourceId,
Json.String vimLevelResourceType optional
}
/**
* @desc This type contains a mapping between a software image definition in the AppD and the corresponding software image managed by the MEO in the VIM which is needed during compute resource instantiation
* @member vimConnectionId Identifier of the VIM connection to access the software image referenced in this structure
* @member appDSoftwareImageId Identifier which references the software image descriptor in the AppD
* @member vimSoftwareImageId Identifier of the software image in the resource management layer (i.e. VIM)
* @see ETSI GS MEC 010-2 Clause 6.2.4.11 Type: VimSoftwareImage
*/
type record VimSoftwareImage {
Json.String vimConnectionId optional,
Json.String appDSoftwareImageId,
Json.String vimSoftwareImageId
}
/**
* @desc This type represents configuration information for external CPs created from a CPD
* @member cpdId The identifier of the CPD in the AppD
* @member cpConfig List of instance data that need to be configured on the CP instances created from the respective CPD
* @see ETSI GS MEC 010-2 Clause 6.2.4.12 Type: AppExtCpData
*/
type record AppExtCpData_ {
Json.String cpdId,
AppExtCpConfig cpConfig
}
type record length(1..infinity) of AppExtCpData_ AppExtCpData;
/**
* @desc This type represents an externally provided link port or network address information per instance of an external connection point
* @member cpInstanceId Identifier of the external CP instance to which this set of configuration parameters is requested to be applied
* @member linkPortId Identifier of a pre-configured link port to which the external CP will be associated
* @member cpProtocolData Parameters for configuring the network protocols on the link port that connects the CP to a VL
* @see ETSI GS MEC 010-2 Clause 6.2.4.13 Type: AppExtCpConfig
*/
type record AppExtCpConfig_ {
Json.String cpInstanceId optional,
Json.String linkPortId optional,
CpProtocolData cpProtocolData optional
}
type record length(1..infinity) of AppExtCpConfig_ AppExtCpConfig;
/**
* @desc This type represents network protocol data
* @member layerProtocol Identifier of layer(s) and protocol(s)
* @member ipOverEthernet Network address data for IP over Ethernet to assign to the extCP instance
* @see ETSI GS MEC 010-2 Clause 6.2.4.14 Type: CpProtocolData
*/
type record CpProtocolData_ {
LayerProtocol layerProtocol,
IpOverEthernetAddressData ipOverEthernet optional
}
type record length(1..infinity) of CpProtocolData_ CpProtocolData;
type enumerated LayerProtocol {
IP_OVER_ETHERNET
}
/**
* @desc This type represents network address data for IP over Ethernet
* @member macAddress MAC address
* @member ipAddresses List of IP addresses to assign to the CP instance
* @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData
*/
type record IpOverEthernetAddressData {
Json.String macAddress optional,
IpAddresses ipAddresses optional
}
/**
* @desc IP addresses to assign to the CP instance
* @member type_ The type of the IP addresses
* @member fixedAddresses Fixed addresses to assign (from the subnet defined by "subnetId" if provided)
* @member numDynamicAddresses Number of dynamic addresses to assign (from the subnet defined by "subnetId" if provided)
* @member addressRange An IP address range to be used, e.g. in case of egress connections
* @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData
*/
type record IpAddress {
IpAddressType type_,
FixedAddresses fixedAddresses optional,
Json.Integer numDynamicAddresses optional,
AddressRange addressRange optional
} with {
variant (type_) "name as 'type'";
}
type record length(1..infinity) of IpAddress IpAddresses;
type enumerated IpAddressType {
IPV4,
IPV6
}
type record length(1..infinity) of Json.String FixedAddresses;
type record AddressRange {
Json.String minAddress,
Json.String maxAddress,
Json.String subnetId optional
}
/**
* @desc This data type represents a type of link
* @member href URI referring to a resource
* @see ETSI GS MEC 010-2 Clause 6.2.5.2 Type: LinkType
*/
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 KeyValuePair {
Json.String key_name,
anytype key_value
}
type set of KeyValuePair KeyValuePairs;
type record AppPkgSubscriptionLinkList_Link_Subscription {
Json.AnyURI href,
AppPkgSubscriptionType subscriptionType
}
/**
* @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 Checksum {
Json.String algorithm,
Json.String hash
}
type record length(1..infinity) of AppPkgSubscriptionLinkList_Link_Subscription AppPkgSubscriptionLinkList_Link_Subscriptions;
group edge_platform_application_enablement { /* TITAN WORK-AROUND for build issue (class forward declaration) */
/**
* @desc This data type represents an application package management notification for informing the subscribers about onboarding application package resources
* @member id Identifier of this notification
* @member notificationType Discriminator for the different notification types
* @member subscriptionId Identifier of the subscription to this notification
* @member timeStamp Date and time of the notification generation
* @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
* @see ETSI GS MEC 010-2 Clause 6.2.3.6 Type: AppPkgNotification
* @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 record AppPkgNotification {
Json.String id,
Json.String notificationType,
Json.String subscriptionId,
TimeStamp timeStamp,
Json.String appPkgId,
Json.String appDId,
AppPkgInfo_OperationalState operationalState,
AppPkgNotification_Link links
} with {
variant (links) "name as '_links'";
}
type record AppPkgNotification_Link {
LinkType subscription
type enumerated TransportType {
REST_HTTP,
MB_TOPIC_BASED,
MB_ROUTING,
MB_PUBSUB,
RPC,
RPC_STREAMING,
WEBSOCKET
}
/**
* @desc The data type represents the input parameters of "subscription operation" to notification of application package management for the onboarding, or operational state change of application package
* @member callbackUri The URI of the endpoint for the subscription related notification to be sent to
* @member subscriptionType Type of the subscription
* @member appPkgFilter The attribute-based filter is to filter application packages on which the query applies
* @see ETSI GS MEC 010-2 Clause 6.2.3.7 Type: AppPkgSubscription
* @desc List of supported OAuth 2.0 grant types.
*/
type record AppPkgSubscription {
Json.AnyURI callbackUri,
AppPkgSubscriptionType subscriptionType,
AppPkgFilter appPkgFilter optional
}
// type enumerated GrantTypes {
// OAUTH2_AUTHORIZATION_CODE,
// OAUTH2_IMPLICIT_GRANT,
// OAUTH2_RESOURCE_OWNER,
// OAUTH2_CLIENT_CREDENTIALS
// }
// type record length(1..4) of GrantTypes GrantTypesList;
/**
* @desc The data type represents modifications of the "AppPkgInfo" data type that can be requested to perform "application package operation"
* @member New value of the "operationalState" attribute of the "OnboardedAppPkgInfo" structure
* @see ETSI GS MEC 010-2 Clause 6.2.3.8 Type: AppPkgInfoModifications
* @desc The token endpoint.
*/
type record AppPkgInfoModifications {
AppPkgInfo_OperationalState operationalState
}
//type Json.String TokenEndpoint;
/**
* @desc String representing the type of a subscription
* @see ETSI GS MEC 010-2 Clause 6.2.3.9.2 Simple data types
* @desc Parameters related to use of OAuth 2.0.
*/
type Json.String AppPkgSubscriptionType;
// type record OAuth2Info {
// GrantTypesList grantTypes,
// TokenEndpoint tokenEndpoint
// }
/**
* @desc This data type represents subscription filter criteria to match application package
* @member appPkgInfoId Match the application package identifier which is allocated by the MEO
* @member appDId Match the application descriptor identifier which is allocated by the application provider
* @member appProvider Match the provider's name of the onboarded application
* @member appName Match the name of the onboarded application
* @member appSoftwareVersion Match the software version of the application package
* @member appDVersion Match the version of the application descriptor
* @member operationalState Match particular operational state of the application package
* @member usageState Match particular usage state of the application package
* @see ETSI GS MEC 010-2 Clause 6.2.3.10 Type: AppPkgFilter
* @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 AppPkgFilter {
Json.String appPkgInfoId optional,
Json.String appDId optional,
Json.String appProvider optional,
Json.String appName optional,
Json.String appSoftwareVersion optional,
Json.String appDVersion optional,
AppPkgInfo_OperationalState operationalState optional,
UsageState usageState optional
type record SecurityInfo {
OAuth2Info oAuth2Info optional,
Json.UInt8 extensions 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
* @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the GrantRequest
* @member appDId Identifier of the AppD that defines the application for which the LCM operation is to be granted
* @member operation The lifecycle management operation for which granting is requested
* @member addResources List of resource definitions in the AppD for resources to be added by the LCM operation which is related to this grant request, with one entry per resource
* @member tempResources List of resource definitions in the AppD for resources to be temporarily instantiated during the runtime of the LCM operation which is related to this grant request
* @member removeResources Removed by the LCM operation which is related to this grant request, with one entry per resource
* @member updateResources Provides the definitions of resources to be modified by the LCM operation which is related to this grant request, with one entry per resource
* @member additionalParams MEPM, specific to the application and the LCM operation
* @member links Links to resources related to this request
* @see ETSI GS MEC 010-2 Clause 6.2.4 Granting 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 record GrantRequest {
Json.String appInstanceId,
Json.String appLcmOpOccId,
Json.String appDId,
OperationType operation,
ResourceDefinition addResources optional,
ResourceDefinition tempResources optional,
ResourceDefinition updateResources optional,
KeyValuePairs additionalParams optional,
GrantRequest_Link links
} with {
variant (links) "name as '_links'";
}
type record GrantRequest_Link {
LinkType appLcmOpOcc,
LinkType appInstance
type enumerated SerializerType {
JSON,
XML,
PROTOBUF3,
RAW // Used for invalid behavior
}
/**
* @desc This type provides information of an existing or proposed resource used by the application
* @member id Identifier of this "ResourceDefinition" structure, unique at least within the scope of the "GrantRequest" structure
* @member type_ Type of the resource definition referenced
* @member vduId Reference to the related VDU in the AppD applicable to this resource
* @member resourceTemplateId Reference to a resource template, i.e. VirtualComputeDescriptor, AppExtCpd, VirtualStorageDescriptor in the AppD
* @member resource Resource information for an existing resource
* @see ETSI GS MEC 010-2 Clause 6.2.4.3 Type: ResourceDefinition
* @desc Reference of the catalogue.
*/
type record ResourceDefinition {
Json.String id,
ResourceDefinition_Type type_,
Json.String vduId optional,
Json.String resourceTemplateId,
ResourceDefinition_Resource resource
}
type enumerated ResourceDefinition_Type {
COMPUTE,
VL,
STORAGE,
LINKPORT
}
type record ResourceDefinition_Resource {
VimConnectionInfo vimConnectionInfo,
Json.String resourceId
}
//type Json.String CategoryRef_Href;
/**
* @desc This type represents a grant
* @member id Identifier of the Grant
* @member appInstanceId Identifier of the application instance which this Grant is related to
* @member appLcmOpOccId The identifier of the application lifecycle management operation occurrence associated to the Grant
* @member vimConnections Provides information regarding VIM connections that are approved to be used by the MEPM to allocate resources, and provides parameters of these VIM connections
* @member zones Identifies resource zones where the resources are approved to be allocated by the MEPM
* @member zoneGroups Information about groups of resource zones that are related and that the MEO has chosen to fulfil a zoneGroup constraint in the Grant request
* @member addResources List of resources that are approved to be added, with one entry per resource
* @member tempResources List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation, with one entry per resource
* @member removeResources List of resources that are approved to be removed, with one entry per resource
* @member updateResources List of resources that are approved to be modified, with one entry per resource
* @member vimAssets Information about assets for the application that are managed by the MEO in the VIM, such as software images
* @member extVirtualLinks Information about external VLs to connect the application instance to
* @member MEPM, specific to the application and the LCM operation
* @member links Links to resources related to this request
* @see ETSI GS MEC 010-2 Clause 6.2.4.4 Type: Grant
* @desc Unique identifier of the category.
*/
type record Grant {
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,
VimAssets vimAssets optional,
ExtVirtualLinkData extVirtualLinks optional,
KeyValuePairs additionalParams optional,
Grant_Link links
} with {
variant (links) "name as '_links'";
}
type record VimAssets {
VimSoftwareImage softwareImages optional
}
type record Grant_Link {
LinkType appLcmOpOcc,
LinkType appInstance
}
//type Json.String CategoryRef_Id;
/**
* @desc This type contains information about a Compute, storage or network resource whose addition/update/deletion was granted
* @member resourceDefinitionId Identifier of the related "ResourceDefinition" structure from the related "GrantRequest" structure
* @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
* @see ETSI GS MEC 010-2 Clause 6.2.4.5 Type: GrantInfo
* @desc Name of the category.
*/
type record GrantInfo {
Json.String resourceDefinitionId,
Json.String vimConnectionId optional,
Json.String zoneId optional,
Json.String resourceGroupId optional
}
//type Json.String Name;
/**
* @desc This type provides information regarding a resource zone
* @member id The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the "Grant" structure
* @member zoneId The identifier of the resource zone, as managed by the resource management layer (typically, the VIM)
* @member vimConnectionId Identifier of the connection to the VIM that manages the resource zone
* @see ETSI GS MEC 010-2 Clause 6.2.4.6 Type: ZoneInfo
* @desc Category version.
*/
type record ZoneInfo {
Json.String id,
Json.String zoneId,
Json.String vimConnectionId optional
}
//type Json.String CategoryRef_Version;
/**
* @desc This type provides information regarding a resource zone group
* @member zoneId References of identifiers of "ZoneInfo" structures, each of which provides information about a resource zone that belongs to this group
* @see ETSI GS MEC 010-2 Clause 6.2.4.7 Type: ZoneGroupInfo
* @desc This type represents the category reference.
*/
type record ZoneGroupInfo {
ZoneIds zoneId
}
type record length(1..infinity) of Json.String ZoneIds;
// type record CategoryRef {
// CategoryRef_Href href,
// CategoryRef_Id id,
// Name name,
// CategoryRef_Version version
// }
/**
* @desc This type represents an external VL
* @member id The identifier of the external VL instance
* @member vimConnectionId Identifier of the VIM connection to manage this resource
* @member resourceId The identifier of the resource in the scope of the VIM
* @member extCps External CPs of the application instance to be connected to this external VL
* @member extLinkPorts Externally provided link ports to be used to connect external connection points to this external VL
* @see ETSI GS MEC 010-2 Clause 6.2.4.8 Type: ExtVirtualLinkData
*/
type record ExtVirtualLinkData {
Json.String id,
Json.String vimConnectionId optional,
Json.String resourceId,
AppExtCpData extCps,
ExtLinkPortData extLinkPorts optional
}
/**
* @desc This type represents an externally provided link port to be used to connect an external connection point to an external VL
* @member id Identifier of this link port as provided by the entity that has created the link port
* @member resourceHandleReference to the virtualised resource realizing this link port
* @see ETSI GS MEC 010-2 Clause 6.2.4.9 Type: ExtLinkPortData
*/
type record ExtLinkPortData {
Json.String id,
ResourceHandle resourceHandle
}
/**
* @desc This type represents the information that allows addressing a virtualised resource that is used by an application instance
* @member vimConnectionId Identifier of the VIM connection to manage the resource
* @member resourceId Identifier of the resource in the scope of the VIM
* @member vimLevelResourceType Type of the resource in the scope of the VIM
* @see ETSI GS MEC 010-2 Clause 6.2.4.10 Type: ResourceHandle
*/
type record ResourceHandle {
Json.String vimConnectionId optional,
Json.String resourceId,
Json.String vimLevelResourceType optional
}
/**
* @desc This type contains a mapping between a software image definition in the AppD and the corresponding software image managed by the MEO in the VIM which is needed during compute resource instantiation
* @member vimConnectionId Identifier of the VIM connection to access the software image referenced in this structure
* @member appDSoftwareImageId Identifier which references the software image descriptor in the AppD
* @member vimSoftwareImageId Identifier of the software image in the resource management layer (i.e. VIM)
* @see ETSI GS MEC 010-2 Clause 6.2.4.11 Type: VimSoftwareImage
*/
type record VimSoftwareImage {
Json.String vimConnectionId optional,
Json.String appDSoftwareImageId,
Json.String vimSoftwareImageId
}
/**
* @desc This type represents configuration information for external CPs created from a CPD
* @member cpdId The identifier of the CPD in the AppD
* @member cpConfig List of instance data that need to be configured on the CP instances created from the respective CPD
* @see ETSI GS MEC 010-2 Clause 6.2.4.12 Type: AppExtCpData
*/
type record AppExtCpData_ {
Json.String cpdId,
AppExtCpConfig cpConfig
}
type record length(1..infinity) of AppExtCpData_ AppExtCpData;
/**
* @desc This type represents an externally provided link port or network address information per instance of an external connection point
* @member cpInstanceId Identifier of the external CP instance to which this set of configuration parameters is requested to be applied
* @member linkPortId Identifier of a pre-configured link port to which the external CP will be associated
* @member cpProtocolData Parameters for configuring the network protocols on the link port that connects the CP to a VL
* @see ETSI GS MEC 010-2 Clause 6.2.4.13 Type: AppExtCpConfig
*/
type record AppExtCpConfig_ {
Json.String cpInstanceId optional,
Json.String linkPortId optional,
CpProtocolData cpProtocolData optional
}
type record length(1..infinity) of AppExtCpConfig_ AppExtCpConfig;
/**
* @desc This type represents network protocol data
* @member layerProtocol Identifier of layer(s) and protocol(s)
* @member ipOverEthernet Network address data for IP over Ethernet to assign to the extCP instance
* @see ETSI GS MEC 010-2 Clause 6.2.4.14 Type: CpProtocolData
*/
type record CpProtocolData_ {
LayerProtocol layerProtocol,
IpOverEthernetAddressData ipOverEthernet optional
}
type record length(1..infinity) of CpProtocolData_ CpProtocolData;
type enumerated LayerProtocol {
IP_OVER_ETHERNET
}
/**
* @desc This type represents network address data for IP over Ethernet
* @member macAddress MAC address
* @member ipAddresses List of IP addresses to assign to the CP instance
* @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData
*/
type record IpOverEthernetAddressData {
Json.String macAddress optional,
IpAddresses ipAddresses optional
}
/**
* @desc IP addresses to assign to the CP instance
* @member type_ The type of the IP addresses
* @member fixedAddresses Fixed addresses to assign (from the subnet defined by "subnetId" if provided)
* @member numDynamicAddresses Number of dynamic addresses to assign (from the subnet defined by "subnetId" if provided)
* @member addressRange An IP address range to be used, e.g. in case of egress connections
* @see ETSI GS MEC 010-2 Clause 6.2.4.15 Type: IpOverEthernetAddressData
*/
type record IpAddress {
IpAddressType type_,
FixedAddresses fixedAddresses optional,
integer numDynamicAddresses optional,
AddressRange addressRange optional
}
type record length(1..infinity) of IpAddress IpAddresses;
type enumerated IpAddressType {
IPV4,
IPV6
}
type record length(1..infinity) of Json.String FixedAddresses;
type record AddressRange {
Json.String minAddress,
Json.String maxAddress,
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
* @see ETSI GS MEC 010-2 Clause 6.2.5.2 Type: LinkType
*/
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 {
Json.String key_name,
anytype key_value // FIXME To be refined
}
/**
* @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
*/
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 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 Checksum {
Json.String algorithm,
Json.String hash
}
type Json.String NotificationType;
} // End of group common_information_model
} // End of group edge_platform_application_enablement
} with {
extension "anytype integer, float, boolean, universal charstring";
......