From e2a121d9c46506c06ef2844424a3f0a4ab201c85 Mon Sep 17 00:00:00 2001 From: Elian Kraja Date: Wed, 25 Sep 2019 10:24:41 +0200 Subject: [PATCH] Moving specific definitions to patch part for Http --- .../Ams/ttcn/Ams_EncdecDeclarations.ttcn | 33 --- ttcn/LibMec/ttcn/LibMec_Pics.ttcn | 2 + ttcn/LibMec/ttcn/LibMec_Pixits.ttcn | 4 + .../LibItsHttp_JsonMessageBodyTypes.ttcn | 39 ++- .../LibItsHttp_JsonTemplates.ttcn | 276 +++++++++++++++++- 5 files changed, 313 insertions(+), 41 deletions(-) delete mode 100644 ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn diff --git a/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn deleted file mode 100644 index 0b6653c..0000000 --- a/ttcn/LibMec/Ams/ttcn/Ams_EncdecDeclarations.ttcn +++ /dev/null @@ -1,33 +0,0 @@ -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)" }; - - - 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)" }; - -} // End of module LocationAPI_EncdecDeclarations diff --git a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn index 6bc3e5c..0e654c5 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pics.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pics.ttcn @@ -42,4 +42,6 @@ module LibMec_Pics { modulepar charstring PICS_ROOT_API := "exampleAPI"; + modulepar boolean PIC_APP_LCM_MANAGEMENT := true; + } // End of module LibMec_Pics diff --git a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn index 1bca3a5..1085e78 100644 --- a/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Pixits.ttcn @@ -37,5 +37,9 @@ module LibMec_Pixits { modulepar charstring PX_MEPM_PKGM_URI := "/apmi/v1/app_packages" modulepar charstring PX_MEPM_PKGM_SUBS := "/apmi/v1/subscriptions" + + modulepar charstring PX_MEX_LCM_URI := "/alcmi/v1/app_instances" + + modulepar charstring PX_MEX_LCM_SUBS := "/alcmi/v1/subscriptions" } // End of module LibMec_Pixits diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn index fbe3e0c..f56e8ec 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn @@ -12,6 +12,14 @@ module LibItsHttp_JsonMessageBodyTypes { import from Ams_TypesAndValues all; // LibMec/AppEnablementAPI import from AppEnablementAPI_TypesAndValues all; + + import from Grant_TypesAndValues all; + + import from MeoPkgm_TypesAndValues all; + + import from MepmPkgm_TypesAndValues all; + + import from AppLCM_TypesAndValues all; /** * This file volontary contains a trivial declaration of the type JsonBody. @@ -52,7 +60,36 @@ module LibItsHttp_JsonMessageBodyTypes { AppMobilityServiceInfo appMobilityServiceInfo, Ams_TypesAndValues.ProblemDetails problemDetails_ams, Ams_TypesAndValues.RegistrationRequest registrationRequest_ams, - Ams_TypesAndValues.AmsSubscriptionLinkLists subscriptionLinkList_ams, + Ams_TypesAndValues.MobilityProcedureSubscription subscriptionLinkList_ams, + Ams_TypesAndValues.AdjacentAppInfoSubscription adjacentAppInfoSubscription_ams, + Ams_TypesAndValues.ExpiryNotification expireNotification_ams, + Grant_TypesAndValues.GrantRequest grantRequest, + Grant_TypesAndValues.Grant grantResponse, + Grant_TypesAndValues.GrantRequestWithError grantRequestWithError, + MeoPkgm_TypesAndValues.AppPkg appPackageManagement, + MeoPkgm_TypesAndValues.OnboardedAppPkgInfo onboardedAppPkgInfo, + MeoPkgm_TypesAndValues.OnboardedAppPkgInfoList appOnboardPackageInfoList, + MeoPkgm_TypesAndValues.AppPkgWithError appPackageManagementWithError, + MeoPkgm_TypesAndValues.AppPkgSubscription appPkgSubscription, + MeoPkgm_TypesAndValues.AppPkgSubscriptionInfo appPkgSubscriptionInfo, + MeoPkgm_TypesAndValues.AppPkgSubscriptionInfoList appPkgSubscriptionInfoList, + MeoPkgm_TypesAndValues.AppPkgSubscriptionWithError appPkgSubscriptionWithError, + MeoPkgm_TypesAndValues.AppPkgNotification appPkgNotification, + MepmPkgm_TypesAndValues.AppPkg appMepmPackageManagement, + MepmPkgm_TypesAndValues.OnboardedAppPkgInfo onboardedMepmAppPkgInfo, + MepmPkgm_TypesAndValues.OnboardedAppPkgInfoList appOnboardMepmPackageInfoList, + MepmPkgm_TypesAndValues.AppPkgWithError appMepmPackageManagementWithError, + MepmPkgm_TypesAndValues.AppPkgSubscription appMepmPkgSubscription, + MepmPkgm_TypesAndValues.AppPkgSubscriptionInfo appMepmPkgSubscriptionInfo, + MepmPkgm_TypesAndValues.AppPkgSubscriptionInfoList appMepmPkgSubscriptionInfoList, + MepmPkgm_TypesAndValues.AppPkgSubscriptionWithError appMepmPkgSubscriptionWithError, + MepmPkgm_TypesAndValues.AppPkgNotification appMepmPkgNotification, + MepmPkgm_TypesAndValues.OnboardedAppPkgInfo appOnboardMepmPackageInfo, + AppLCM_TypesAndValues.CreateAppInstanceRequest createAppInstanceRequest, + AppLCM_TypesAndValues.AppInstanceInfo appInstanceInfo, + AppLCM_TypesAndValues.CreateAppInstanceRequestWithError createAppInstanceRequestWithError, + AppLCM_TypesAndValues.AppInstanceInfoList appInstanceInfoList, + AppLCM_TypesAndValues.InstantiateAppRequest appInstanceInstantiate, universal charstring raw } with { variant "" diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn index 08714d3..7087ea0 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn @@ -25,9 +25,24 @@ module LibItsHttp_JsonTemplates { // LibMec/AppEnablementAPI import from AppEnablementAPI_TypesAndValues all; import from AppEnablementAPI_Templates all; -// LibMec/Ams -import from Ams_TypesAndValues all; -import from Ams_Templates all; + // LibMec/Ams + import from Ams_TypesAndValues all; + import from Ams_Templates all; + + //LibMec/Grant + import from Grant_TypesAndValues all; + import from Grant_Templates all; + + //LibMec/MeoPkg + import from MeoPkgm_TypesAndValues all; + import from MeoPkgm_Templates all; + + //LibMec/MepmPkg + import from MepmPkgm_TypesAndValues all; + import from MepmPkgm_Templates all; + + import from AppLCM_TypesAndValues all; + import from AppLCM_Templates all; // TODO Add here your custom RFCs import @@ -47,16 +62,187 @@ import from Ams_Templates all; raw := p_raw } // End of template mw_json_body_raw + +group grant_api{ + + template (value) JsonBody m_body_json_grant_request( + in template (value) GrantRequest p_grant_request + ) := { + grantRequest := p_grant_request + } + + template (present) JsonBody mw_body_json_grant_response ( + in template (value) Grant p_grant_response + ) := { + grantResponse := p_grant_response + } + + + template (value) JsonBody m_body_json_grant_request_with_error ( + in template (value) GrantRequestWithError p_grant_request + ) := { + grantRequestWithError := p_grant_request + } + +} + +group meo_pkg_mgmt_api { + template (value) JsonBody m_body_json_package_management( + in template (value) MeoPkgm_TypesAndValues.AppPkg p_app_package_management + ) := { + appPackageManagement := p_app_package_management + } + + template (value) JsonBody m_body_json_package_management_with_error( + in template (value) MeoPkgm_TypesAndValues.AppPkgWithError p_app_package_management_with_error + ) := { + appPackageManagementWithError := p_app_package_management_with_error + } + + template (present) JsonBody mw_body_json_pkg_mgmt_response( + in template (present) MeoPkgm_TypesAndValues.OnboardedAppPkgInfoList p_onboarded_app_pkg_mgmt_list + ) := { + appOnboardPackageInfoList := p_onboarded_app_pkg_mgmt_list + } + + template (value) JsonBody m_body_json_pkgm_subscription( + in template (value) MeoPkgm_TypesAndValues.AppPkgSubscription p_app_pkg_subscription + ) := { + appPkgSubscription := p_app_pkg_subscription + } + + template (present) JsonBody mw_body_json_pkgm_subscription_info ( + in template (present) MeoPkgm_TypesAndValues.AppPkgSubscriptionInfo p_app_pkg_subscription_info + ) := { + appPkgSubscriptionInfo := p_app_pkg_subscription_info + } + + template (value) JsonBody m_body_json_pkgm_subscription_with_error( + in template (value) MeoPkgm_TypesAndValues.AppPkgSubscriptionWithError p_app_pkg_subscription_with_error + ) := { + appPkgSubscriptionWithError := p_app_pkg_subscription_with_error + } + + template (present) JsonBody mw_body_json_pkgm_subscription_info_list ( + in template (present) MeoPkgm_TypesAndValues.AppPkgSubscriptionInfoList p_app_pkg_subscription_info_list + ) := { + appPkgSubscriptionInfoList := p_app_pkg_subscription_info_list + } + + + template (present) JsonBody mw_body_json_app_package_notification ( + in template (present) MeoPkgm_TypesAndValues.AppPkgNotification p_app_pkg_notification + ) := { + appPkgNotification := p_app_pkg_notification + } + +} + +group mepm_pkg_mgmt_api { + template (value) JsonBody m_body_json_mepm_package_management( + in template (value) MepmPkgm_TypesAndValues.AppPkg p_app_package_management + ) := { + appMepmPackageManagement := p_app_package_management + } + + template (value) JsonBody m_body_json_mepm_package_management_with_error( + in template (value) MepmPkgm_TypesAndValues.AppPkgWithError p_app_mepm_package_management_with_error + ) := { + appMepmPackageManagementWithError := p_app_mepm_package_management_with_error + } + + template (present) JsonBody mw_body_json_mepm_pkg_mgmt_response_list( + in template (present) MepmPkgm_TypesAndValues.OnboardedAppPkgInfoList p_onboarded_app_mepm_pkg_mgmt_list + ) := { + appOnboardMepmPackageInfoList := p_onboarded_app_mepm_pkg_mgmt_list + } + + template (present) JsonBody mw_body_json_mepm_pkg_mgmt_response( + in template (present) MepmPkgm_TypesAndValues.OnboardedAppPkgInfo p_onboarded_app_mepm_pkg_mgmt + ) := { + appOnboardMepmPackageInfo := p_onboarded_app_mepm_pkg_mgmt + } + + + template (value) JsonBody m_body_json_mepm_pkgm_subscription( + in template (value) MepmPkgm_TypesAndValues.AppPkgSubscription p_app_mepm_pkg_subscription + ) := { + appMepmPkgSubscription := p_app_mepm_pkg_subscription + } + + template (present) JsonBody mw_body_json_mepm_pkgm_subscription_info ( + in template (present) MepmPkgm_TypesAndValues.AppPkgSubscriptionInfo p_app_mepm_pkg_subscription_info + ) := { + appMepmPkgSubscriptionInfo := p_app_mepm_pkg_subscription_info + } + + template (value) JsonBody m_body_json_mepm_pkgm_subscription_with_error( + in template (value) MepmPkgm_TypesAndValues.AppPkgSubscriptionWithError p_app_mepm_pkg_subscription_with_error + ) := { + appMepmPkgSubscriptionWithError := p_app_mepm_pkg_subscription_with_error + } + + template (present) JsonBody mw_body_json_mepm_pkgm_subscription_info_list ( + in template (present) MepmPkgm_TypesAndValues.AppPkgSubscriptionInfoList p_app_mepm_pkg_subscription_info_list + ) := { + appMepmPkgSubscriptionInfoList := p_app_mepm_pkg_subscription_info_list + } + + + template (present) JsonBody mw_body_json_mepm_app_package_notification ( + in template (present) MepmPkgm_TypesAndValues.AppPkgNotification p_app_mepm_pkg_notification + ) := { + appMepmPkgNotification := p_app_mepm_pkg_notification + } + +} + +group lcm_api { + + + template (present) JsonBody m_body_json_lifecycle_management ( + in template (present) CreateAppInstanceRequest p_create_app_instance_request + ) := { + createAppInstanceRequest := p_create_app_instance_request + } + + template (present) JsonBody m_body_json_lifecycle_management_with_error ( + in template (present) CreateAppInstanceRequestWithError p_create_app_instance_request_with_error + ) := { + createAppInstanceRequestWithError := p_create_app_instance_request_with_error + } + + + template (present) JsonBody mw_body_json_mex_lcm_instance_info ( + in template (present) AppInstanceInfo p_app_instance_info + ) := { + appInstanceInfo := p_app_instance_info + } + + template (present) JsonBody mw_body_json_mex_lcm_instance_info_list ( + in template (present) AppInstanceInfoList p_app_instance_info_list + ) := { + appInstanceInfoList := p_app_instance_info_list + } + + + template (present) JsonBody m_body_json_lifecycle_management_instantiate ( + in template (present) InstantiateAppRequest p_app_instance_instantiate + ) := { + appInstanceInstantiate := p_app_instance_instantiate + } +} + group ams_api { template (value) JsonBody m_body_json_app_mobility_service_info( - in template (value) AppMobilityServiceInfo p_app_mobility_service_info + in template (value) AppMobilityServiceInfo p_app_mobility_service_info ) := { appMobilityServiceInfo := p_app_mobility_service_info } // End of template mw_body_json_app_mobility_service_info template (present) JsonBody mw_body_json_app_mobility_service_info( - template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? + template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? ) := { appMobilityServiceInfo := p_app_mobility_service_info } // End of template mw_body_json_app_mobility_service_info @@ -89,19 +275,95 @@ group ams_api { template (present) JsonBody mw_body_json_ams_subscriptions( - template (present) Ams_TypesAndValues.AmsSubscriptionLinkLists p_amsSubscriptionLinkList := ? + template (present) Ams_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? ) := { subscriptionLinkList_ams := p_amsSubscriptionLinkList } // End of template mw_body_json_ue_identity_problem_details template (present) JsonBody m_body_json_ams_subscriptions( - template (present) Ams_TypesAndValues.AmsSubscriptionLinkLists p_amsSubscriptionLinkList := ? + template (present) Ams_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? ) := { subscriptionLinkList_ams := p_amsSubscriptionLinkList } // End of template mw_body_json_ue_identity_problem_details + + + template (present) JsonBody mw_body_json_mobility_procedure_notification( + template (present) Ams_TypesAndValues.MobilityProcedureSubscription p_amsSubscriptionLinkList := ? + ) := { + subscriptionLinkList_ams := p_amsSubscriptionLinkList + } // End of template mw_body_json_mobility_procedure_notification + + template (present) JsonBody mw_body_json_adjacent_application_info_notification( + template (present) Ams_TypesAndValues.AdjacentAppInfoSubscription p_adjacentAppInfoSubscription := ? + ) := { + adjacentAppInfoSubscription_ams := p_adjacentAppInfoSubscription + } // End of template mw_body_json_mobility_procedure_notification + + + template (present) JsonBody mw_body_json_expire_notification( + template (present) Ams_TypesAndValues.ExpiryNotification p_expire_notification := ? + ) := { + expireNotification_ams := p_expire_notification + } // End of template mw_body_json_mobility_procedure_notification + } // end of group ams api +//group ams_api { +// +// template (value) JsonBody m_body_json_app_mobility_service_info( +// in template (value) AppMobilityServiceInfo p_app_mobility_service_info +// ) := { +// appMobilityServiceInfo := p_app_mobility_service_info +// } // End of template mw_body_json_app_mobility_service_info +// +// template (present) JsonBody mw_body_json_app_mobility_service_info( +// template (present) AppMobilityServiceInfo p_app_mobility_service_info := ? +// ) := { +// appMobilityServiceInfo := p_app_mobility_service_info +// } // End of template mw_body_json_app_mobility_service_info +// +// +// template (value) JsonBody m_body_json_ams_problem_details( +// in template (value) Ams_TypesAndValues.ProblemDetails p_problemDetails +// ) := { +// problemDetails_ams := p_problemDetails +// } // End of template m_body_json_ue_identity_problem_details +// +// template (present) JsonBody mw_body_json_ams_problem_details( +// template (present) Ams_TypesAndValues.ProblemDetails p_problemDetails := ? +// ) := { +// problemDetails_ams := p_problemDetails +// } // End of template mw_body_json_ue_identity_problem_details +// +// +// template (present) JsonBody mw_body_json_ams_registration_request( +// template (present) Ams_TypesAndValues.RegistrationRequest p_registrationRequest := ? +// ) := { +// registrationRequest_ams := p_registrationRequest +// } // End of template mw_body_json_ue_identity_problem_details +// +// template (value) JsonBody m_body_json_ams_registration_request( +// in template (value) Ams_TypesAndValues.RegistrationRequest p_registrationRequest +// ) := { +// registrationRequest_ams := p_registrationRequest +// } // End of template m_body_json_ue_identity_problem_details +// +// +// template (present) JsonBody mw_body_json_ams_subscriptions( +// template (present) Ams_TypesAndValues.AmsSubscriptionLinkLists p_amsSubscriptionLinkList := ? +// ) := { +// subscriptionLinkList_ams := p_amsSubscriptionLinkList +// } // End of template mw_body_json_ue_identity_problem_details +// +// template (present) JsonBody m_body_json_ams_subscriptions( +// template (present) Ams_TypesAndValues.AmsSubscriptionLinkLists p_amsSubscriptionLinkList := ? +// ) := { +// subscriptionLinkList_ams := p_amsSubscriptionLinkList +// } // End of template mw_body_json_ue_identity_problem_details +// +//} // end of group ams api + group locarion_api { template (value) JsonBody m_body_json_user_info( -- GitLab