From c7f757e98066775ed2fdeb67f3d31777e8430624 Mon Sep 17 00:00:00 2001
From: PatrikBuhr The O-RAN Non-RT RIC Policy Management Service provides a REST API for management of A1 policies. This is an API for management of A1 Policies.<\/p> API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p> These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p> This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p> API used for supervision of the PMS component.<\/p> API used for registering services that uses PMS. Each A1 policy is owned by a service. PMS can supervise each registered service and will automatically remove policies for unavailable services.<\/p>",
+ "description": " The O-RAN Non-RT RIC Policy Management Service provides a REST API for management of A1 policies. This is an API for management of A1 Policies.<\/p> API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p> These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p> This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p> API used for supervision of the PMS component.<\/p> API used for registering services that uses PMS. Each A1 policy is optionally owned by a service. PMS can supervise each registered service by a heart-beat supervision and will automatically remove policies for unavailable services. Note that a service does not need to be registered in order to create A1 Policies. This is a feature that is optional to use.<\/p>",
"title": "A1 Policy Management Service",
"version": "1.1.0"
},
diff --git a/a1-policy-management/api/pms-api.yaml b/a1-policy-management/api/pms-api.yaml
index 1f84399e..6d620c23 100644
--- a/a1-policy-management/api/pms-api.yaml
+++ b/a1-policy-management/api/pms-api.yaml
@@ -18,8 +18,10 @@ info:
provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one
Near-RT RIC. API used for supervision of the PMS component. API used for registering services that uses PMS.
- Each A1 policy is owned by a service. PMS can supervise each registered service
- and will automatically remove policies for unavailable services.General<\/h2>
The main tasks of the service are:<\/p>APIs provided by the service<\/h2>
A1 Policy Management<\/h3>
Management of configuration<\/h3>
Callbacks<\/h3>
NearRT-RIC Repository<\/h3>
Health Check<\/h3>
Service Registry and Supervision<\/h3>
General<\/h2>
The main tasks of the service are:<\/p>APIs provided by the service<\/h2>
A1 Policy Management<\/h3>
Management of configuration<\/h3>
Callbacks<\/h3>
NearRT-RIC Repository<\/h3>
Health Check<\/h3>
Service Registry and Supervision<\/h3>
Health Check
Service
Registry and Supervision
API used for supervision of the PMS component.
" + // H3 + ServiceController.API_NAME + H3_END + // - "API used for registering services that uses PMS. Each A1 policy is owned by a service. PMS can supervise each registered service and will automatically remove policies for unavailable services.
"; + "" + "API used for registering services that uses PMS." + + " Each A1 policy is optionally owned by a service. PMS can supervise each registered service by a heart-beat supervision and will automatically remove policies for unavailable services." + + " Note that a service does not need to be registered in order to create A1 Policies. This is a feature that is optional to use." + + "
"; public static final String VERSION = "1.1.0"; } diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyInfo.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyInfo.java index 55a9343d..a3870b2c 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyInfo.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/PolicyInfo.java @@ -48,19 +48,24 @@ public class PolicyInfo { @SerializedName("policy_data") public Object policyData; - @Schema(name = "service_id", description = "the identity of the service owning the policy", required = true) - @JsonProperty(value = "service_id", required = true) + private static final String SERVICE_ID_DESCRIPTION = "the identity of the service owning the policy." + + " This can be used to group the policies (it is possible to get all policies associated to a service)." + + " Note that the service does not need to be registerred."; + + @Schema(name = "service_id", description = SERVICE_ID_DESCRIPTION, required = false, defaultValue = "") + @JsonProperty(value = "service_id", required = false) @SerializedName("service_id") - public String serviceId; + public String serviceId = ""; @Schema(name = "transient", description = "if true, the policy is deleted at RIC restart. If false, its value is maintained by this service until explicitly deleted. Default false.", - required = false) + required = false, defaultValue = "false", example = "false") @JsonProperty(value = "transient", required = false, defaultValue = "false") @SerializedName("transient") public boolean isTransient = false; - @Schema(name = "status_notification_uri", description = "Callback URI for policy status updates", required = false) + @Schema(name = "status_notification_uri", description = "Callback URI for policy status updates", required = false, + defaultValue = "") @JsonProperty(value = "status_notification_uri", required = false) @SerializedName("status_notification_uri") public String statusNotificationUri = ""; diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java index faa152ca..c3f41768 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/ServiceController.java @@ -128,10 +128,10 @@ public class ServiceController { private static final String REGISTER_SERVICE_DETAILS = "Registering a service is needed to:" // + "The O-RAN Non-RT RIC Policy Management Service provides a REST API for management of A1 policies.
The main tasks of the service are:<\/p>
This is an API for management of A1 Policies.<\/p>
API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p>
These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p>
This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p>
API used for supervision of the PMS component.<\/p>
API used for registering services that uses PMS. Each A1 policy is owned by a service. PMS can supervise each registered service and will automatically remove policies for unavailable services.<\/p>", + "description": "
The O-RAN Non-RT RIC Policy Management Service provides a REST API for management of A1 policies.
The main tasks of the service are:<\/p>
This is an API for management of A1 Policies.<\/p>
API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p>
These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p>
This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p>
API used for supervision of the PMS component.<\/p>
API used for registering services that uses PMS. Each A1 policy is optionally owned by a service. PMS can supervise each registered service by a heart-beat supervision and will automatically remove policies for unavailable services. Note that a service does not need to be registered in order to create A1 Policies. This is a feature that is optional to use.<\/p>", "title": "A1 Policy Management Service", "version": "1.1.0" }, diff --git a/docs/offeredapis/swagger/pms-api.yaml b/docs/offeredapis/swagger/pms-api.yaml index 1f84399e..6d620c23 100644 --- a/docs/offeredapis/swagger/pms-api.yaml +++ b/docs/offeredapis/swagger/pms-api.yaml @@ -18,8 +18,10 @@ info: provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.
API used for supervision of the PMS component.
API used for registering services that uses PMS. - Each A1 policy is owned by a service. PMS can supervise each registered service - and will automatically remove policies for unavailable services.
+ Each A1 policy is optionally owned by a service. PMS can supervise each registered + service by a heart-beat supervision and will automatically remove policies for + unavailable services. Note that a service does not need to be registered in order + to create A1 Policies. This is a feature that is optional to use. license: name: Copyright (C) 2020-2022 Nordix Foundation. Licensed under the Apache License. url: http://www.apache.org/licenses/LICENSE-2.0 @@ -539,9 +541,11 @@ paths: tags: - Service Registry and Supervision summary: Register a service - description: Registering a service is needed to: