diff --git a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn index 3c7886d3b7b91c06a56bc4d229550d47aba4a718..a9c39b9f7dd0ec7f36e2d1f57a619bd078a38a1d 100644 --- a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn @@ -31,8 +31,12 @@ import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; - group appMobilityServices { +group appMobilityServices { + /** + * @desc Check that the AMS service returns information about the registered application mobility services when requested + * @see ETSI GS MEC 021 2.0.8, clause 8.3.3.1 + */ testcase TP_MEC_SRV_AMS_001_OK() runs on HttpComponent system HttpTestAdapter { // Local variables var HeaderLines v_headers; @@ -93,6 +97,10 @@ import from LibMec_Pixits all; } // End of 'alt' statement } // End of testcase TP_MEC_SRV_AMS_001_OK + /** + * @desc Check that the AMS service returns an error when receives a query about a registered application mobility service with wrong parameters + * @see ETSI GS MEC 021 2.0.8, clause 8.3.3.1 + */ testcase TP_MEC_SRV_AMS_001_BR() runs on HttpComponent system HttpTestAdapter { // Local variables var HeaderLines v_headers; @@ -142,7 +150,1058 @@ import from LibMec_Pixits all; } // End of 'alt' statement } // End of testcase TP_MEC_SRV_AMS_001_BR + + + /** + * @desc Check that the AMS service creates a new application mobility services when requested + * @see ETSI GS MEC 021 2.0.8, clause 8.3.3.4 + */ + testcase TP_MEC_SRV_AMS_002_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + 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_request( + m_registration_request( + m_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ) + ) + ) + ) + ) + ); + 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_app_mobility_service_info( + mw_app_mobility_service_info( + mw_registration_info( + mw_service_consumer_id( + PX_APP_INS_ID, + - + ), + -, + - + ), + PX_APP_MOBILITY_SERVICE_ID + ) + ) + ) + ) + ) + ) + + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo and status code set to 201 Created ***"); + 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 + } // End of testcase TP_MEC_SRV_AMS_002_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a new application mobility service + * @see ETSI GS MEC 021 2.0.8, clause 8.3.3.4 + */ + testcase TP_MEC_SRV_AMS_002_BR() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + 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_request( + m_registration_request_error( + m_service_consumer_error( + PX_APP_INS_ID, + - + ) + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + mw_problem_details( + -, -, 400 + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details when bad request is performed ***"); + 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 + + } // End of testcase TP_MEC_SRV_AMS_002_BR +} // End of group appMobilityServices + +group appMobilityServicesSubscriptions { + + /** + * @desc Check that the AMS service returns information about the available subscriptions when requested. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.0.8, clause 8.6.3.1 + */ + testcase TP_MEC_SRV_AMS_003_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + //@TODO: How can we convert enums in strings? + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionType=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), + 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_ams_subscriptions( + mw_ams_subscription( + PX_SUBSCRIPTION_TYPE, + -, + -, + -, + - + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); + 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 + + } // END TP_MEC_SRV_AMS_003_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed query about the available subscriptions + * @see ETSI GS MEC 021 2.0.8, clause 8.6.3.1 + */ + testcase TP_MEC_SRV_AMS_003_BR() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "?subscriptionTyp=" & int2str(enum2int(PX_SUBSCRIPTION_TYPE)), + 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( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + mw_problem_details( + -, -, 400 + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); + 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 + + } // END of TP_MEC_SRV_AMS_003_BR + + /** + * @desc Check that the AMS service creates a notification subscriptions when requested. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.0.8, clause 8.6.3.4 + */ + testcase TP_MEC_SRV_AMS_004_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + 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_subscriptions( + m_ams_subscription( + PX_SUBSCRIPTION_TYPE, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ); + 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_ams_subscriptions( + mw_ams_subscription( + PX_SUBSCRIPTION_TYPE, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AMS Subscription and 201 Created status 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 + + } // End of TP_MEC_SRV_AMS_004_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed request to create a notification subscription + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.0.8, clause 8.6.3.4 + */ + testcase TP_MEC_SRV_AMS_004_BR() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + 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_subscriptions( + m_ams_subscription_error( + PX_SUBSCRIPTION_TYPE, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + mw_problem_details( + -, -, 400 + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Problem Details and 400 Bad request status 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 + + } // End of TP_MEC_SRV_AMS_004_BR + + /** + * @desc Check that the AMS service returns information about a given subscription when requested. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.0.8, clause 8.7.3.1 + */ + testcase TP_MEC_SRV_AMS_005_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + 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_ams_subscriptions( + mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with the list of subscriptions type MobilityProcedureSubscription ***"); + 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 + + } // End of TP_MEC_SRV_AMS_005_OK + + /** + * @desc Check that the AMS service returns an error when receives a query about a not existing subscription + * @see ETSI GS MEC 021 2.0.8, clause 8.7.3.1 + */ + testcase TP_MEC_SRV_AMS_005_NF() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + 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( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + mw_problem_details( + -, -, 404 + ) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); + 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 + + } // End of TP_MEC_SRV_AMS_005_NF + + /** + * @desc Check that the AMS service deletes a given subscription when requested + * @see ETSI GS MEC 021 2.0.8, clause 8.7.3.5 + */ + testcase TP_MEC_SRV_AMS_006_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + 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 204 No Content on deletion request ***"); + 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 + + } // End of TP_MEC_SRV_AMS_006_OK + + /** + * @desc Check that the AMS service sends an error when it receives a delete request for a not existing subscription + * @see ETSI GS MEC 021 2.0.8, clause 8.7.3.5 + */ + testcase TP_MEC_SRV_AMS_006_NF() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_delete( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + 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( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + 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 + + } // End of TP_MEC_SRV_AMS_006_NF + + /** + * @desc Check that the AMS service modifies a given subscription when requested. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.0.8, clause 8.7.3.2 + */ + testcase TP_MEC_SRV_AMS_007_OK() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_subscriptions( + m_ams_subscription( + PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - + ) + ) + ) + ) + ) + ); + 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_ams_subscriptions( + mw_ams_subscription(PX_SUBSCRIPTION_TYPE, -, -, -, -) + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppMobilityServiceInfo ***"); + 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 + + } // End of TP_MEC_SRV_AMS_007_OK + + /** + * @desc Check that the AMS service sends an error when it receives a malformed modify request for a given subscription. + * Permitted SUBSCRIPTION_TYPE are: + * - MobilityProcedureSubscription + * - AdjacentAppInfoSubscription + * @see ETSI GS MEC 021 2.0.8, clause 8.7.3.2 + */ + testcase TP_MEC_SRV_AMS_007_BR() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_registration_request( + m_registration_request( + m_service_consumer_error(PX_APP_INS_ID, -), + -, + - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_400_bad_request( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 400 Bad Request ***"); + 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 + + } // End of TP_MEC_SRV_AMS_007_BR + + /** + * @desc Check that the AMS service sends an error when it receives a modify request for a not existing subscription + * @see ETSI GS MEC 021 2.0.8, clause 8.7.3.2 + */ + testcase TP_MEC_SRV_AMS_007_NF() runs on HttpComponent system HttpTestAdapter { + var HeaderLines v_headers; + if (not(PICS_AMS) or not(PICS_AMS_API_SUPPORTED)){ + log("*** " & testcasename() & ": PICS_AMS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_put( + "/" & PICS_ROOT_API & PX_ME_APP_AMS_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_ams_subscriptions( + m_ams_subscription( + PX_SUBSCRIPTION_TYPE, PX_CALLBACK_REFERENCE, -, -, - + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + mw_http_message_body_json( + mw_body_json_ams_problem_details( + ) + ) + ) + ) + ) + { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 404 Not Found ***"); + 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 + + } // End of TP_MEC_SRV_AMS_007_NF + + +} // End of group appMobilityServicesSubscriptions + +group ams_notifications { + + /** + * @desc Check that the AMS service sends an AMS notification about a mobility procedure if the AMS service has an associated subscription and the event is generated + * @see ETSI GS MEC 021 2.0.8, clause 7.4.2 + */ + testcase TP_MEC_SRV_AMS_008_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Trigger a mobility procedure event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_mobility_procedure_notification( + mw_mobility_procedure_notification( + -, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ) { + tc_wait.stop; + log("*** " & testcasename() & ": INFO: IUT successfully sends mobility procedure notification ***"); + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends mobility procedure 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_cf_01_http_notif_down(); + } // End of TP_MEC_SRV_AMS_008_OK + + /** + * @desc Check that the AMS service sends an AMS notification about adjacent application instances if the AMS service has an associated subscription and the event is generated + * @see ETSI GS MEC 021 2.0.8, clause 7.4.3 + */ + testcase TP_MEC_SRV_AMS_009_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Trigger a adjacent application info event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_adjacent_application_info_notification( + mw_adjacent_application_info_notification( + -, + PX_CALLBACK_REFERENCE, + -, + -, + - + ) + ) + ) + ) + ) + ) { + tc_wait.stop; + log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent application info 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_cf_01_http_notif_down(); + } + + + /** + * @desc Check that the AMS service sends an AMS notification on subscription expiration if the AMS service has an associated subscription and the event is generated + * @see ETSI GS MEC 021 2.0.8, clause 7.4.4 + */ + testcase TP_MEC_SRV_AMS_010_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_AMS) or not(PICS_AMS_NOTIFICATIONS)) { + log("*** " & testcasename() & ": PICS_AMS and PICS_AMS_NOTIFICATIONS required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_notif_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(-, -, v_headers); + action("Trigger a expire notification event"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_wait.start; + alt { + [] httpPort_notif.receive( + mw_http_request( + mw_http_request_post( + PX_CALLBACK_URI, + -, + mw_http_message_body_json( + mw_body_json_expire_notification( + mw_expire_notification( + -, + -, + timeStamp // @TODO how can I express timestamp in TTNC? + ) + ) + ) + ) + ) + ) { + tc_wait.stop; + log("*** " & testcasename() & ": INFO: IUT successfully sends adjacent application info notification ***"); + + // Send 204 No Content + httpPort_notif.send(m_http_response(m_http_response_204_no_content(v_headers))); + + log("*** " & testcasename() & ": PASS: IUT successfully sends adjacent applicationinfo 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_cf_01_http_notif_down(); + } + + } // End of group ams_notifications } // End of module AtsMec_Ams_TestCases + + + + + + + diff --git a/ttcn/AtsMec/AtsMec_Grant_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Grant_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..113baf57f20ec86df5db694705936d198ef58fc7 --- /dev/null +++ b/ttcn/AtsMec/AtsMec_Grant_TestCases.ttcn @@ -0,0 +1,399 @@ +/** +* @author ETSI / STF569 +* @version $URL:$ +* $ID:$ +* @desc This module provides the MEC test cases. +* @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. +* @see ETSI GS MEC 003, Draft ETSI GS MEC 013 V2.0.3 (2018-10) +*/ +module AtsMec_Grant_TestCases { + +// Libcommon +import from LibCommon_Sync all; + +// LibHttp +import from LibItsHttp_TypesAndValues all; +import from LibItsHttp_Functions all; +import from LibItsHttp_Templates all; +import from LibItsHttp_JsonTemplates all; +import from LibItsHttp_TestSystem all; + +// LibMec_LocationAPI +import from Grant_Templates all; +import from Grant_Pics all; +import from Grant_Pixits all; + +// LibMec +import from LibMec_Functions all; +import from LibMec_Pics all; +import from LibMec_Pixits all; + +group grant { + + /** + * @desc: Check that MEO sends a synchronous grant response when a grant request is requested + * ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1, + * ETSI GS MEC 010-2 2.0.10, Table 6.2.4.2.2-1, //GrantRequest + * ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1 //Grant + */ + testcase TP_MEC_MEO_GRANT_001_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PIC_GRANTS_MANAGEMENT)){ + log("*** " & testcasename() & ": PIC_GRANTS_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + 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_OPERATION + ) + ) + ) + + ))); + 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_grant_response( + mw_grant_response( + PX_APP_INSTANCE_ID + ) + ))))) -> value v_response { + tc_ac.stop; + + if (v_response.response.statuscode == 201) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Grant Response ***"); + 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 + } // End of testcase TP_MEC_MEO_GRANT_001_OK + + + + /** + * @desc: Check that MEO responds with an error when it receives a malformed request when a new grant request is performed + * ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1, + * ETSI GS MEC 010-2 2.0.10, Table 6.2.4.2.2-1, //GrantRequest + */ + testcase TP_MEC_MEO_GRANT_001_BR() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PIC_GRANTS_MANAGEMENT)){ + log("*** " & testcasename() & ": PIC_GRANTS_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + 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_with_error( + m_grant_request_with_error( + PX_APP_INSTANCE_ID, + PX_APP_OPERATION_ERROR + ) + ) + ) + + ))); + 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; + + if (v_response.response.statuscode == 400) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Bad response ***"); + 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 + } // End of testcase TP_MEC_MEO_GRANT_001_BR + + + /** + * @desc: Check that MEO sends a asynchronous grant response when a grant request is requested + * ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.1, + * ETSI GS MEC 010-2 2.0.10, Table 6.2.4.2.2-1, //GrantRequest + */ + testcase TP_MEC_MEO_GRANT_002_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PIC_GRANTS_MANAGEMENT)){ + log("*** " & testcasename() & ": PIC_GRANTS_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + 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_OPERATION + ) + ) + ) + + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + //@TODO: Need to add 202 accepted to the library + mw_http_response_202_accepted() + )) -> value v_response { + tc_ac.stop; + //@TODO: How to check Location??? + if (v_response.response.statuscode == 202) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status 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 + } // End of testcase TP_MEC_MEO_GRANT_002_OK + + + /** + * @desc: Check that MEO sends the status of a grant request when a query on a granting ID is performed + * ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2, + */ + testcase TP_MEC_MEO_GRANT_003_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PIC_GRANTS_MANAGEMENT)){ + log("*** " & testcasename() & ": PIC_GRANTS_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), + v_headers + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + //@TODO: Need to add 202 accepted to the library + mw_http_response_202_accepted() + )) -> value v_response { + tc_ac.stop; + //@TODO: How to check Location??? + if (v_response.response.statuscode == 201) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status 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 + } // End of testcase TP_MEC_MEO_GRANT_003_OK + + + /** + * @desc: Check that MEO responds with an error when it receives a request for returning a grant referred with a wrong ID + * ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2 + */ + testcase TP_MEC_MEO_GRANT_003_NF() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PIC_GRANTS_MANAGEMENT)){ + log("*** " & testcasename() & ": PIC_GRANTS_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_NON_EXISTANT_GRANTING_ID, "UTF-8")), + v_headers, + m_http_message_body_json( + m_body_json_grant_request( + m_grant_request( + PX_APP_INSTANCE_ID, + PX_APP_OPERATION + ) + ) + ) + + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_404_not_found( + ))) -> value v_response { + tc_ac.stop; + + if (v_response.response.statuscode == 404) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a not found status 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 + } // End of testcase TP_MEC_MEO_GRANT_003_NF + + + /** + * @desc: Check that MEO sends the status of a grant request when a query on a granting ID is performed + * ETSI GS MEC 010-2 2.0.10, clause 7.6.1.3.2 + * ETSI GS MEC 010-2 2.0.10, Table 6.2.4.4.2-1 //Grant + */ + testcase TP_MEC_MEO_GRANT_004_OK() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PIC_GRANTS_MANAGEMENT)){ + log("*** " & testcasename() & ": PIC_GRANTS_MANAGEMENT required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Preamble + f_init_default_headers_list(-, -, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/" & PICS_ROOT_API & PX_MEO_GRANT_URI & oct2char(unichar2oct(PX_GRANTING_ID, "UTF-8")), + 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_grant_response( + mw_grant_response( + PX_APP_INSTANCE_ID + ) + ))))) -> value v_response { + tc_ac.stop; + //@TODO: How to check Location??? + if (v_response.response.statuscode == 200) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a 202 accepted status 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 + } // End of testcase TP_MEC_MEO_GRANT_004_OK + +} + + + +} diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn index 2f25a5be8e576138ce0746b60654a8fa7fb21990..3c96472470178cdd67b588ebe55adb6ad703c9fb 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_Pixits.ttcn @@ -10,7 +10,7 @@ module Ams_Pixits { modulepar JSON.String PX_APP_INS_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" - modulepar JSON.String PX_SUBSCRIPTION_TYPE := "MobilityProcedureSubscription" + modulepar SubscriptionType PX_SUBSCRIPTION_TYPE := MobilityProcedureSubscription modulepar JSON.String PX_SUBSCRIPTION_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3" @@ -18,6 +18,8 @@ module Ams_Pixits { 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 diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn index f08fa331efc00500261971c9a759d0d3334a3bc6..329232ebf5da702ea49a1cfc0adf518b1ec5927f 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn @@ -54,6 +54,14 @@ module Ams_Templates { appInstanceId := p_appInstanceId, 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 := *, @@ -66,13 +74,25 @@ module Ams_Templates { template (omit) RegistrationRequest m_registration_request ( in template (omit) ServiceConsumerId p_service_consumer_id := omit, in template (omit) DeviceInformations p_device_info := omit, - in UInt32 p_expire_time + in template (omit) UInt32 p_expire_time := omit ) := { serviceConsumerId := p_service_consumer_id, 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, @@ -94,14 +114,12 @@ module Ams_Templates { expiryTime := p_expire_time } - template (present) RegistrationInfo mw_registration_info( + 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 (present) UInt32 p_expire_time := ? ) := { - serviceConsumerId := p_service_consumer_id, - deviceInformation := p_device_info, - expiryTime := p_expire_time + } @@ -112,6 +130,14 @@ module Ams_Templates { 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 @@ -129,14 +155,28 @@ module Ams_Templates { 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, + in SubscriptionType p_subscriptionType := PX_SUBSCRIPTION_TYPE, in JSON.AnyURI p_callbackReference, - in JSON.AnyURI p_links, - in FilterCriteria p_filterCriteria, - in TimeStamp p_expiryDeadline + 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 , @@ -147,12 +187,28 @@ module Ams_Templates { } + + 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 JSON.AnyURI p_links, - in FilterCriteria p_filterCriteria, - in TimeStamp p_expiryDeadline + 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, @@ -164,10 +220,10 @@ module Ams_Templates { template (present) MobilityProcedureSubscription mw_ams_subscription ( in SubscriptionType p_subscriptionType, - in JSON.AnyURI p_callbackReference, - in JSON.AnyURI p_links, - in FilterCriteria p_filterCriteria, - in TimeStamp p_expiryDeadline + 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, @@ -176,6 +232,16 @@ module Ams_Templates { 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 + } + template (value) ProblemDetails m_problem_details( @@ -208,148 +274,4 @@ module Ams_Templates { - - -// -// template (omit) UserList m_user_list( -// in template (omit) UserInfos p_userInfo := omit, -// in ResourceURL p_resource_url -// ) := { -// user := p_userInfo, -// resourceURL := p_resource_url -// } // End of template m_user_list -// -// template UserList mw_user_list( -// template UserInfos p_userInfo := *, -// template (present) ResourceURL p_resource_url := ? -// ) := { -// user := p_userInfo, -// resourceURL := p_resource_url -// } // End of template mw_user_list -// -// template (value) LocationInfo m_location_info( -// in JSON.Number p_latitude, -// in JSON.Number p_longitude, -// in UInt32 p_accuracy -// ) := { -// latitude := p_latitude, -// longitude := p_longitude, -// altitude := omit, -// accuracy := p_accuracy -// } // End of template m_location_info -// -// template (present) LocationInfo mw_location_info( -// template (present) JSON.Number p_latitude := ?, -// template (present) JSON.Number p_longitude := ?, -// template (present) UInt32 p_accuracy := ? -// ) := { -// latitude := p_latitude, -// longitude := p_longitude, -// altitude := *, -// accuracy := p_accuracy -// } // End of template mw_location_info -// -// template (value) ZoneInfo m_zone_info( -// in ZoneId p_zone_id := PX_ZONE_ID, -// in NumberOfAccessPoints p_number_of_access_points := PX_NB_ACCESS_POINTS, -// in NumberOfUnserviceableAccessPoints p_number_of_unservicable_access_points := PX_NB_UNSERVICABLEL_ACCESS_POINTS, -// in NumberOfUsers p_number_of_users := PX_NB_USERS, -// in ResourceURL p_resource_url := PX_RESOURCE_URL -// ) := { -// zoneId := p_zone_id, -// numberOfAccessPoints := p_number_of_access_points, -// numberOfUnservicableAccessPoints := p_number_of_unservicable_access_points, -// numberOfUsers := p_number_of_users, -// resourceURL := p_resource_url -// } // End of template m_zone_info -// -// template (present) ZoneInfo mw_zone_info( -// template (present) ZoneId p_zone_id := ?, -// template (present) NumberOfAccessPoints p_number_of_access_points := ?, -// template (present) NumberOfUnserviceableAccessPoints p_number_of_unservicable_access_points := ?, -// template (present) NumberOfUsers p_number_of_users := ?, -// template (present) ResourceURL p_resource_url := ? -// ) := { -// zoneId := p_zone_id, -// numberOfAccessPoints := p_number_of_access_points, -// numberOfUnservicableAccessPoints := p_number_of_unservicable_access_points, -// numberOfUsers := p_number_of_users, -// resourceURL := p_resource_url -// } // End of template mw_zone_info -// -// template (omit) AccessPointList m_access_point_list( -// in ZoneId p_zoneId := PX_ZONE_ID, -// in ResourceURL p_resourceURL, -// in template (omit) AccessPointInfos p_accessPoint := omit -// ) := { -// zoneId := p_zoneId, -// accessPoint := p_accessPoint, -// resourceURL := p_resourceURL -// } // End of template m_access_point_list -// -// template AccessPointList mw_access_point_list( -// template (present) ZoneId p_zoneId := ?, -// template (present) ResourceURL p_resourceURL := ?, -// template AccessPointInfos p_accessPoint := * -// ) := { -// zoneId := p_zoneId, -// accessPoint := p_accessPoint, -// resourceURL := p_resourceURL -// } // End of template mw_access_point_list -// -// template (value) UserTrackingSubscription m_user_tracking_subscription( -// in ClientCorrelator p_clientCorrelator, -// in CallbackReference p_callbackReference, -// in Address p_address := PX_USER, -// in UserEventCriteria p_userEventCriteria := { Transferring } -// ) := { -// clientCorrelator := p_clientCorrelator, -// callbackReference := p_callbackReference, -// address_ := p_address, -// userEventCriteria := p_userEventCriteria, -// resourceURL := omit -// } // End of template m_user_tracking_subscription -// -// template (present) UserTrackingSubscription mw_user_tracking_subscription_response( -// template (present) ClientCorrelator p_clientCorrelator := ?, -// template (present) CallbackReference p_callbackReference := ?, -// template (present) Address p_address := PX_USER, -// template (present) UserEventCriteria p_userEventCriteria := { Transferring }, -// template (present) ResourceURL p_resourceURL := ? -// ) := { -// clientCorrelator := p_clientCorrelator, -// callbackReference := p_callbackReference, -// address_ := p_address, -// userEventCriteria := p_userEventCriteria, -// resourceURL := p_resourceURL -// } // End of template mw_user_tracking_subscription -// -// template (value) ZonalTrafficSubscription m_zonal_traffic_subscription( -// in ClientCorrelator p_client_correlator, -// in CallbackReference p_callback_reference, -// in ZoneId p_zone_id -// ) := { -// clientCorrelator := p_client_correlator, -// callbackReference := p_callback_reference, -// zoneId := p_zone_id, -// interestRealm := omit, -// userEventCriteria := omit, -// duration := omit, -// resourceURL := omit -// } // End of template m_zonal_traffic_subscription -// -// template (present) ZonalTrafficSubscription mw_zonal_traffic_subscription( -// template (present) ClientCorrelator p_client_correlator := ?, -// template (present) CallbackReference p_callback_reference := ?, -// template (present) ZoneId p_zone_id := ? -// ) := { -// clientCorrelator := p_client_correlator, -// callbackReference := p_callback_reference, -// zoneId := p_zone_id, -// interestRealm := *, -// userEventCriteria := *, -// duration := *, -// resourceURL := * -// } // End of template mw_zonal_traffic_subscription - } // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn index 9b636df8e380f684d545c857abcf9c1a66fc253c..ef4fa83b7ee406719c0552325763a42d09c333d9 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn @@ -6,6 +6,7 @@ import from JSON all; // LibCommon import from LibCommon_BasicTypesAndValues all; + type record of AppMobilityServiceInfo AppMobilityServiceInfos; type record AppMobilityServiceInfo { RegistrationInfos registeredAppMobilityService , @@ -49,9 +50,8 @@ type record DeviceInformation { type JSON.AnyURI links; type enumerated SubscriptionType { - RESERVED, - MOBILITY_PROCEDURE, - ADJACENT_APPINFO + MobilityProcedureSubscription, + AdjacentAppInfoSubscription } type record Subscription { @@ -76,6 +76,8 @@ type record MobilityProcedureSubscriptionError { } + + type record of MobilityProcedureSubscription MobilityProcedureSubscriptions; type record MobilityProcedureSubscription { SubscriptionType subscriptionType, @@ -111,6 +113,13 @@ type record AdjacentFilterCriteria { } +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, diff --git a/ttcn/LibMec/Grant/ttcn/Grant_EncdecDeclarations.ttcn b/ttcn/LibMec/Grant/ttcn/Grant_EncdecDeclarations.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0cf0ca86866b57ee40413e1aef1dcbbed60ce9bf --- /dev/null +++ b/ttcn/LibMec/Grant/ttcn/Grant_EncdecDeclarations.ttcn @@ -0,0 +1,35 @@ +module Grant_EncdecDeclarations { + + import from Grant_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)" }; +// +// +// external function enc_SubscriptionLink(in SubscriptionLink p_subscription_link) return octetstring +// with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; +// external function dec_SubscriptionLinks(in octetstring p_pdu) return SubscriptionLinks +// with { extension "prototype (convert) decode(JSON)" }; +// +// +// external function enc_NotificationSubscription(in NotificationSubscription p_notification_subscription) return octetstring +// with { extension "prototype (convert) encode(JSON)"; extension "printing(pretty)" }; +// external function dec_NotificationSubscription(in octetstring p_pdu) return NotificationSubscription +// with { extension "prototype (convert) decode(JSON)" }; + +} diff --git a/ttcn/LibMec/Grant/ttcn/Grant_Pics.ttcn b/ttcn/LibMec/Grant/ttcn/Grant_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..441a1803b31790adff8feb722f49e395065141e9 --- /dev/null +++ b/ttcn/LibMec/Grant/ttcn/Grant_Pics.ttcn @@ -0,0 +1,8 @@ +module Grant_Pics { + + /** + * @desc Does the IUT support GRANT? + */ + modulepar boolean PICS_GRANT_API_SUPPORTED := true; + +} \ No newline at end of file diff --git a/ttcn/LibMec/Grant/ttcn/Grant_Pixits.ttcn b/ttcn/LibMec/Grant/ttcn/Grant_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..01533399791c9b43c3c064942f3fb76165bd4023 --- /dev/null +++ b/ttcn/LibMec/Grant/ttcn/Grant_Pixits.ttcn @@ -0,0 +1,20 @@ +module Grant_Pixits { + + // JSON + import from JSON all; + + // LibMec/LocationAPI + import from Grant_TypesAndValues all; + + modulepar JSON.String PX_APP_INSTANCE_ID := "5abe4782-2c70-4e47-9a4e-0ee3a1a0fd1f" + + modulepar Operation_type PX_APP_OPERATION := INSTANTIATE + + modulepar Operation_type_error PX_APP_OPERATION_ERROR := INSTANTIATE + + modulepar JSON.String PX_GRANTING_ID := "e0deee2b-6e50-4f33-ab09-8bf0585025d3" + + modulepar JSON.String PX_NON_EXISTANT_GRANTING_ID := "PX_NON_EXISTANT_GRANTING_ID" + + +} diff --git a/ttcn/LibMec/Grant/ttcn/Grant_Templates.ttcn b/ttcn/LibMec/Grant/ttcn/Grant_Templates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..da89f69760a93d3495c537978ff818138ed503e3 --- /dev/null +++ b/ttcn/LibMec/Grant/ttcn/Grant_Templates.ttcn @@ -0,0 +1,238 @@ +module Grant_Templates { + + // JSON + import from JSON all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + import from Grant_TypesAndValues all; + import from Grant_Pixits all; + + + template (value) GrantRequest m_grant_request ( + in String p_app_instance_id := PX_APP_INSTANCE_ID, + in Operation_type p_app_operation := PX_APP_OPERATION + ) := { + appInstanceId := p_app_instance_id, + operation := p_app_operation + } + + + template (present) Grant mw_grant_response ( + in String p_app_instance_id := PX_APP_INSTANCE_ID + ) := { + appInstanceId := p_app_instance_id + } + + template (value) GrantRequestWithError m_grant_request_with_error ( + in String p_app_instance_id := PX_APP_INSTANCE_ID, + in Operation_type_error p_app_operation := PX_APP_OPERATION_ERROR + ) := { + appInstanceId := p_app_instance_id, + operation := p_app_operation + } + +// 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 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 UInt32 p_expire_time +// ) := { +// serviceConsumerId := p_service_consumer_id, +// 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) RegistrationInfo mw_registration_info( +// template (present) ServiceConsumerId p_service_consumer_id := ?, +// template (present) DeviceInformations p_device_info := ?, +// template (present) UInt32 p_expire_time +// ) := { +// serviceConsumerId := p_service_consumer_id, +// deviceInformation := p_device_info, +// expiryTime := 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 (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) MobilityProcedureSubscription m_ams_subscription ( +// in SubscriptionType p_subscriptionType, +// in JSON.AnyURI p_callbackReference, +// in JSON.AnyURI p_links, +// in FilterCriteria p_filterCriteria, +// in TimeStamp p_expiryDeadline +// +// ) := { +// 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 JSON.AnyURI p_links, +// in FilterCriteria p_filterCriteria, +// in TimeStamp p_expiryDeadline +// +// ) := { +// 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 JSON.AnyURI p_callbackReference, +// in JSON.AnyURI p_links, +// in FilterCriteria p_filterCriteria, +// in TimeStamp p_expiryDeadline +// ) := { +// subscriptionType := p_subscriptionType , +// callbackReference := p_callbackReference, +// links := p_links, +// filterCriteria := p_filterCriteria, +// expiryDeadline := p_expiryDeadline +// } +// +// +// +// template (value) ProblemDetails m_problem_details( +// in JSON.String p_type, +// in JSON.String p_title, +// in UInt32 p_status, +// in JSON.String p_detail, +// in JSON.String p_instance +// ) := { +// type_ := p_type, +// title := p_title, +// status := p_status, +// detail := p_detail, +// instance := p_instance +// } // End of template m_problem_details +// +// template (present) ProblemDetails mw_problem_details( +// template (present) JSON.String p_type := ?, +// template (present) JSON.String p_title := ?, +// template (present) UInt32 p_status := ?, +// template (present) JSON.String p_detail := ?, +// template (present) JSON.String p_instance := ? +// ) := { +// type_ := p_type, +// title := p_title, +// status := p_status, +// detail := p_detail, +// instance := p_instance +// } // End of template mw_problem_details +// +// + + + + + +} // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/Grant/ttcn/Grant_TypesAndValues.ttcn b/ttcn/LibMec/Grant/ttcn/Grant_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6d88b806c0671bdb74a7b65d7e8eb5ad0360d517 --- /dev/null +++ b/ttcn/LibMec/Grant/ttcn/Grant_TypesAndValues.ttcn @@ -0,0 +1,82 @@ +module Grant_TypesAndValues { + +// JSON +import from JSON all; + +// LibCommon +import from LibCommon_BasicTypesAndValues all; + + + type enumerated Operation_type { + INSTANTIATE (0), + OPERATE (1), + TERMINATE (2) + } + + + + type record GrantRequest { + JSON.String appInstanceId, + Operation_type operation + } + + + type record GrantRequestWithError { + JSON.String appInstanceId, + Operation_type_error operation + } + + type enumerated Operation_type_error { + INSTANTIATE (0), + OPERATE (1), + TERMINATE (2) + } + + type record Grant { + JSON.String appInstanceId + } + + /** + * @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 Problem Details for HTTP APIs +* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type +* @member title A short, human-readable summary of the problem type +* @member status The HTTP status code for this occurrence of the problem +* @member detail A human-readable explanation specific to this occurrence of the problem +* @member instance A URI reference that identifies the specific occurrence of the problem +* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object +*/ +type record ProblemDetails { + JSON.String type_, + JSON.String title, + UInt32 status, + JSON.String detail, + JSON.String instance +} with { + variant (type_) "name as 'type'"; +} + + +} with { +encode "JSON" +} diff --git a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn index 547721abb49eaeaa655e0891cbc7cd3495764cc9..d0817f72b1e7ae8f071742a5e03dc5fddf860121 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn @@ -33,6 +33,8 @@ module LibMec_Pics { modulepar boolean PICS_AMS := true; modulepar boolean PICS_AMS_NOTIFICATIONS := false; + + modulepar boolean PIC_GRANTS_MANAGEMENT := true; modulepar charstring PICS_ROOT_API := "exampleAPI"; diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 73e9d7ecacc2ebac618fedda9737725f2db94241..36ae13f50cbecb16d88ff7b249aab154d6eff431 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -27,6 +27,8 @@ module LibMec_Pixits { modulepar charstring PX_ME_APP_AMS_URI := "/amsi/v1/appMobilityServices" modulepar charstring PX_ME_APP_AMS_SUBS := "/amsi/v1/subscriptions" + + modulepar charstring PX_MEO_GRANT_URI := "/granting/v1/grants" } // End of module LibMec_Pixits