Commit 33239901 authored by Elian Kraja's avatar Elian Kraja

Adding TPs for Granting operations. Fixing AMS TPs

parent d55aa377
This diff is collapsed.
This diff is collapsed.
......@@ -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
This diff is collapsed.
......@@ -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,
......
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)" };
}
module Grant_Pics {
/**
* @desc Does the IUT support GRANT?
*/
modulepar boolean PICS_GRANT_API_SUPPORTED := true;
}
\ No newline at end of file
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"
}
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
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"
}
......@@ -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";
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment