From fa658f6a48672cc005ad2877a59d1794a8963b1b Mon Sep 17 00:00:00 2001 From: elinuxhenrik Date: Thu, 5 Nov 2020 12:37:43 +0100 Subject: Sort out Maven dependencies in PMS Change-Id: I56a1f7187d53d57d54b5341f3b2dedb0464e3e27 Issue-ID: CCSDK-2502 Signed-off-by: elinuxhenrik --- a1-policy-management/pom.xml | 121 ++- .../aspect/LogAspectTest.java | 6 - docs/offeredapis/swagger/pms-api.json | 18 +- docs/offeredapis/swagger/pms-api.yaml | 1063 +++++++++++--------- 4 files changed, 643 insertions(+), 565 deletions(-) diff --git a/a1-policy-management/pom.xml b/a1-policy-management/pom.xml index 81a3b5cb..495b882d 100644 --- a/a1-policy-management/pom.xml +++ b/a1-policy-management/pom.xml @@ -39,21 +39,16 @@ 11 11 - 2.9.2 - 2.8.2 + 2.9.2 + 2.8.8 1.1.6 - 2.0.0 - 20190722 - 3.6 + 20200518 + 2.13.0 + 2.5.0 2.5 - 3.8.0 - 2.8.1 - 1.18.0 0.30.0 - 1.1.11 - 2.1.1 - 2.22.2 - 0.8.5 + 3.0.0-M5 + 0.8.6 true ${project.version} @@ -61,42 +56,71 @@ org.springframework.boot - spring-boot-starter-web + spring-boot - org.springframework.boot - spring-boot-starter-thymeleaf + org.springframework + spring-beans - org.springframework.boot - spring-boot-starter-webflux + org.springframework + spring-context org.springframework.boot - spring-boot-starter-aop + spring-boot-autoconfigure - org.springframework.boot - spring-boot-devtools - true + org.springframework + spring-web + + + org.springframework + spring-webmvc org.springframework spring-webflux - io.swagger.core.v3 - swagger-jaxrs2 - ${swagger.version} + io.springfox + springfox-spring-web + ${springfox.version} + + + io.springfox + springfox-spi + ${springfox.version} + + + io.springfox + springfox-core + ${springfox.version} + + + org.aspectj + aspectjweaver + + + com.fasterxml.jackson.core + jackson-databind + + + org.apache.tomcat.embed + tomcat-embed-core + + + org.onap.dcaegen2.services.sdk.rest.services + cbs-client + ${sdk.version} - io.swagger.core.v3 - swagger-jaxrs2-servlet-initializer - ${swagger.version} + javax.validation + validation-api - javax.xml.bind - jaxb-api + com.google.guava + guava org.immutables @@ -114,34 +138,16 @@ json ${json.version} - - commons-net - commons-net - ${commons-net.version} - - - org.springframework.boot - spring-boot-configuration-processor - true - - - org.onap.dcaegen2.services.sdk.rest.services - cbs-client - ${sdk.version} - org.projectlombok lombok provided - - javax.ws.rs - javax.ws.rs-api - org.springframework.boot spring-boot-starter-actuator + runtime @@ -153,8 +159,27 @@ io.springfox springfox-swagger-ui ${springfox.version} + runtime + + + + org.springframework.boot + spring-boot-devtools + true + runtime + + + org.springframework.boot + spring-boot-configuration-processor + true + runtime + + org.springframework.boot + spring-boot-test + test + org.springframework.boot spring-boot-starter-test diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/aspect/LogAspectTest.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/aspect/LogAspectTest.java index 339a8252..65dc8b5a 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/aspect/LogAspectTest.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/aspect/LogAspectTest.java @@ -32,20 +32,14 @@ import ch.qos.logback.core.read.ListAppender; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.reflect.MethodSignature; -import org.junit.Rule; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; import org.mockito.junit.jupiter.MockitoExtension; import org.onap.ccsdk.oran.a1policymanagementservice.utils.LoggingUtils; @ExtendWith(MockitoExtension.class) class LogAspectTest { - @Rule - MockitoRule mockitoRule = MockitoJUnit.rule(); - @Mock private ProceedingJoinPoint proceedingJoinPoint; diff --git a/docs/offeredapis/swagger/pms-api.json b/docs/offeredapis/swagger/pms-api.json index f5cc0165..5e9e5f06 100644 --- a/docs/offeredapis/swagger/pms-api.json +++ b/docs/offeredapis/swagger/pms-api.json @@ -79,7 +79,7 @@ "summary": "Returns service information", "deprecated": false, "produces": ["*/*"], - "operationId": "getServicesUsingGET", + "operationId": "getServicesUsingGET_1", "responses": { "200": { "schema": { @@ -109,7 +109,7 @@ "summary": "Delete a service", "deprecated": false, "produces": ["*/*"], - "operationId": "deleteServiceUsingDELETE", + "operationId": "deleteServiceUsingDELETE_1", "responses": { "200": { "schema": {"type": "string"}, @@ -141,7 +141,7 @@ "summary": "Unregister a service", "deprecated": false, "produces": ["*/*"], - "operationId": "deleteServiceUsingDELETE_1", + "operationId": "deleteServiceUsingDELETE", "responses": { "200": {"description": "Not used"}, "401": {"description": "Unauthorized"}, @@ -694,7 +694,7 @@ "deprecated": false, "produces": ["application/json"], "description": "Either information about a registered service with given identity or all registered services are returned.", - "operationId": "getServicesUsingGET_1", + "operationId": "getServicesUsingGET", "responses": { "200": { "schema": {"$ref": "#/definitions/service_list_v2"}, @@ -722,7 +722,7 @@ "deprecated": false, "produces": ["*/*"], "description": "Registering a service is needed to:
  • Get callbacks.<\/li>
  • Activate supervision of the service. If a service is inactive, its policies will be deleted.<\/li><\/ul>", - "operationId": "putServiceUsingPUT_1", + "operationId": "putServiceUsingPUT", "responses": { "200": { "schema": {"type": "object"}, @@ -782,7 +782,7 @@ "summary": "Heartbeat from a service", "deprecated": false, "produces": ["*/*"], - "operationId": "keepAliveServiceUsingPUT", + "operationId": "keepAliveServiceUsingPUT_1", "responses": { "200": { "schema": {"type": "string"}, @@ -808,7 +808,7 @@ "summary": "Heartbeat indicates that the service is running", "deprecated": false, "produces": ["*/*"], - "operationId": "keepAliveServiceUsingPUT_1", + "operationId": "keepAliveServiceUsingPUT", "responses": { "200": { "schema": {"type": "object"}, @@ -939,7 +939,7 @@ "summary": "Register a service", "deprecated": false, "produces": ["*/*"], - "operationId": "putServiceUsingPUT", + "operationId": "putServiceUsingPUT_1", "responses": { "200": { "schema": {"type": "string"}, @@ -1045,7 +1045,7 @@ } } }, - "host": "localhost:49657", + "host": "localhost:43299", "definitions": { "error_information": { "description": "Problem as defined in https://tools.ietf.org/html/rfc7807", diff --git a/docs/offeredapis/swagger/pms-api.yaml b/docs/offeredapis/swagger/pms-api.yaml index 245e52c2..024a28af 100644 --- a/docs/offeredapis/swagger/pms-api.yaml +++ b/docs/offeredapis/swagger/pms-api.yaml @@ -31,18 +31,38 @@ paths: required: false tags: - A1 Policy Management Version 1.0 - /v2/policy: + /v2/status: get: - summary: Returns a policy configuration + summary: Returns status and statistics of this service deprecated: false produces: - application/json - operationId: getPolicyUsingGET + operationId: getStatusUsingGET responses: '200': schema: - $ref: '#/definitions/json_object' - description: Policy found + $ref: '#/definitions/status_info_v2' + description: Service is living + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + description: Not Found + tags: + - A1 Policy Management Version 2.0 (in progress) + /v2/policy-types: + get: + summary: Query policy type identities + deprecated: false + produces: + - application/json + operationId: getPolicyTypesUsingGET + responses: + '200': + schema: + $ref: '#/definitions/policytype_id_list_v2' + description: Policy type IDs '401': description: Unauthorized '403': @@ -50,22 +70,142 @@ paths: '404': schema: $ref: '#/definitions/error_information' + description: Near-RT RIC is not found + parameters: + - in: query + allowEmptyValue: false + name: ric_id + description: The identity of the Near-RT RIC to get types for. + type: string + required: false + tags: + - A1 Policy Management Version 2.0 (in progress) + /services: + get: + summary: Returns service information + deprecated: false + produces: + - '*/*' + operationId: getServicesUsingGET + responses: + '200': + schema: + type: array + items: + $ref: '#/definitions/service_status_v1' + description: OK + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + schema: + type: string + description: Service is not found + parameters: + - in: query + allowEmptyValue: false + name: name + description: The name of the service + type: string + required: false + tags: + - A1 Policy Management Version 1.0 + delete: + summary: Delete a service + deprecated: false + produces: + - '*/*' + operationId: deleteServiceUsingDELETE + responses: + '200': + schema: + type: string + description: OK + '204': + schema: + type: string + description: Service deleted + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + schema: + type: string + description: Service not found + parameters: + - in: query + allowEmptyValue: false + name: name + description: The name of the service + type: string + required: true + tags: + - A1 Policy Management Version 1.0 + '/v2/services/{service_id}': + delete: + summary: Unregister a service + deprecated: false + produces: + - '*/*' + operationId: deleteServiceUsingDELETE_1 + responses: + '200': + description: Not used + '204': + schema: + type: object + description: Service unregistered + '401': + description: Unauthorized + '403': + description: Forbidden + '404': + schema: + $ref: '#/definitions/error_information' + description: Service not found + parameters: + - in: path + name: service_id + description: service_id + type: string + required: true + tags: + - A1 Policy Management Version 2.0 (in progress) + /policy: + get: + summary: Returns a policy configuration + deprecated: false + produces: + - '*/*' + operationId: getPolicyUsingGET_1 + responses: + '200': + schema: + type: object + description: Policy found + '401': + description: Unauthorized + '403': + description: Forbidden + '404': description: Policy is not found parameters: - in: query allowEmptyValue: false - name: policy_id + name: id description: The identity of the policy instance. type: string required: true tags: - - A1 Policy Management Version 2.0 (in progress) + - A1 Policy Management Version 1.0 delete: summary: Delete a policy deprecated: false produces: - '*/*' - operationId: deletePolicyUsingDELETE + operationId: deletePolicyUsingDELETE_1 responses: '200': description: Not used @@ -77,27 +217,27 @@ paths: description: Forbidden '404': schema: - $ref: '#/definitions/error_information' + type: string description: Policy is not found '423': schema: - $ref: '#/definitions/error_information' + type: string description: Near-RT RIC is not operational parameters: - in: query allowEmptyValue: false - name: policy_id + name: id description: The identity of the policy instance. type: string required: true tags: - - A1 Policy Management Version 2.0 (in progress) + - A1 Policy Management Version 1.0 put: - summary: Create or update a policy + summary: Put a policy deprecated: false produces: - - application/json - operationId: putPolicyUsingPUT + - '*/*' + operationId: putPolicyUsingPUT_1 responses: '200': description: Policy updated @@ -109,13 +249,19 @@ paths: description: Forbidden '404': schema: - $ref: '#/definitions/error_information' + type: string description: Near-RT RIC or policy type is not found '423': schema: - $ref: '#/definitions/error_information' + type: string description: Near-RT RIC is not operational parameters: + - in: query + allowEmptyValue: false + name: id + description: The identity of the policy instance. + type: string + required: true - schema: type: object in: body @@ -124,26 +270,14 @@ paths: required: true - in: query allowEmptyValue: false - name: policy_id - description: The identity of the policy instance. - type: string - required: true - - in: query - allowEmptyValue: false - name: policytype_id - description: The identity of the policy type. - type: string - required: false - - in: query - allowEmptyValue: false - name: ric_id - description: The identity of the Near-RT RIC where the policy will be created. + name: ric + description: The name of the Near-RT RIC where the policy will be created. type: string required: true - in: query allowEmptyValue: false - name: service_id - description: The identity of the service creating the policy. + name: service + description: The name of the service creating the policy. type: string required: true - default: false @@ -151,47 +285,33 @@ paths: allowEmptyValue: false name: transient x-example: false - description: If the policy is transient or not (boolean defaulted to false). A policy is transient if it will not be recreated in the Near-RT RIC when it has been lost (for instance due to a restart) + description: If the policy is transient or not (boolean defaulted to false). A policy is transient if it will be forgotten when the service needs to reconnect to the Near-RT RIC. type: boolean required: false + - in: query + allowEmptyValue: false + name: type + description: The name of the policy type. + type: string + required: false tags: - - A1 Policy Management Version 2.0 (in progress) + - A1 Policy Management Version 1.0 consumes: - application/json - /v2/status: - get: - summary: Returns status and statistics of this service - deprecated: false - produces: - - application/json - operationId: getStatusUsingGET_1 - responses: - '200': - schema: - $ref: '#/definitions/status_info_v2' - description: Service is living - '401': - description: Unauthorized - '403': - description: Forbidden - '404': - description: Not Found - tags: - - A1 Policy Management Version 2.0 (in progress) - /policy_ids: + /policies: get: - summary: 'Query policies, only policy identities returned' + summary: Query policies deprecated: false produces: - '*/*' - operationId: getPolicyIdsUsingGET_1 + operationId: getPoliciesUsingGET responses: '200': schema: type: array items: - type: string - description: Policy identitiess + $ref: '#/definitions/policy_info_v1' + description: Policies '401': description: Unauthorized '403': @@ -221,49 +341,18 @@ paths: required: false tags: - A1 Policy Management Version 1.0 - /policy_schemas: + '/v2/policies/{policy_id}': get: - summary: Returns policy type schema definitions - deprecated: false - produces: - - '*/*' - operationId: getPolicySchemasUsingGET_1 - responses: - '200': - schema: - type: array - items: - type: object - description: Policy schemas - '401': - description: Unauthorized - '403': - description: Forbidden - '404': - schema: - type: string - description: Near-RT RIC is not found - parameters: - - in: query - allowEmptyValue: false - name: ric - description: The name of the Near-RT RIC to get the definitions for. - type: string - required: false - tags: - - A1 Policy Management Version 1.0 - /v2/policy-types: - get: - summary: Query policy type identities + summary: Returns a policy deprecated: false produces: - application/json - operationId: getPolicyTypesUsingGET + operationId: getPolicyUsingGET responses: '200': schema: - $ref: '#/definitions/policy_type_id_list_v2' - description: Policy type IDs + $ref: '#/definitions/policy_info_v2' + description: Policy found '401': description: Unauthorized '403': @@ -271,29 +360,26 @@ paths: '404': schema: $ref: '#/definitions/error_information' - description: Near-RT RIC is not found + description: Policy is not found parameters: - - in: query - allowEmptyValue: false - name: ric_id - description: The identity of the Near-RT RIC to get types for. + - in: path + name: policy_id + description: policy_id type: string - required: false + required: true tags: - A1 Policy Management Version 2.0 (in progress) - /v2/services: - get: - summary: Returns service information + delete: + summary: Delete a policy deprecated: false produces: - - application/json - description: Either information about a registered service with given identity or all registered services are returned. - operationId: getServicesUsingGET + - '*/*' + operationId: deletePolicyUsingDELETE responses: '200': - schema: - $ref: '#/definitions/service_list_v2' - description: OK + description: Not used + '204': + description: Policy deleted '401': description: Unauthorized '403': @@ -301,97 +387,91 @@ paths: '404': schema: $ref: '#/definitions/error_information' - description: Service is not found + description: Policy is not found + '423': + schema: + $ref: '#/definitions/error_information' + description: Near-RT RIC is not operational parameters: - - in: query - allowEmptyValue: false - name: service_id - description: The identity of the service + - in: path + name: policy_id + description: policy_id type: string - required: false + required: true tags: - A1 Policy Management Version 2.0 (in progress) - delete: - summary: Unregister a service + /policy_schema: + get: + summary: Returns one policy type schema definition deprecated: false produces: - '*/*' - operationId: deleteServiceUsingDELETE + operationId: getPolicySchemaUsingGET responses: '200': - description: Not used - '204': schema: type: object - description: Service unregistered + description: Policy schema '401': description: Unauthorized '403': description: Forbidden '404': schema: - $ref: '#/definitions/error_information' - description: Service not found + type: string + description: The policy type is not found parameters: - in: query allowEmptyValue: false - name: service_id - description: The idenitity of the service + name: id + description: The identity of the policy type to get the definition for. type: string required: true tags: - - A1 Policy Management Version 2.0 (in progress) - put: - summary: Register a service + - A1 Policy Management Version 1.0 + /rics: + get: + summary: Query Near-RT RIC information deprecated: false produces: - '*/*' - description: 'Registering a service is needed to:
    • Get callbacks.
    • Activate supervision of the service. If a service is inactive, its policies will be deleted.
    ' - operationId: putServiceUsingPUT + operationId: getRicsUsingGET responses: '200': schema: - type: object - description: Service updated - '201': - schema: - type: object - description: Service created - '400': - schema: - $ref: '#/definitions/error_information' - description: The ServiceRegistrationInfo is not accepted + type: array + items: + $ref: '#/definitions/ric_info_v1' + description: OK '401': description: Unauthorized '403': description: Forbidden '404': - description: Not Found + schema: + type: string + description: Policy type is not found parameters: - - schema: - $ref: '#/definitions/service_registration_info_v2' - in: body - name: registrationInfo - description: registrationInfo - required: true + - in: query + allowEmptyValue: false + name: policyType + description: The name of the policy type + type: string + required: false tags: - - A1 Policy Management Version 2.0 (in progress) - consumes: - - application/json - /services: + - A1 Policy Management Version 1.0 + /policy_status: get: - summary: Returns service information + summary: Returns a policy status deprecated: false produces: - '*/*' - operationId: getServicesUsingGET_1 + operationId: getPolicyStatusUsingGET_1 responses: '200': schema: - type: array - items: - $ref: '#/definitions/service_status_v1' - description: OK + type: object + description: Policy status '401': description: Unauthorized '403': @@ -399,152 +479,167 @@ paths: '404': schema: type: string - description: Service is not found + description: Policy is not found parameters: - in: query allowEmptyValue: false - name: name - description: The name of the service + name: id + description: The identity of the policy. type: string - required: false + required: true tags: - A1 Policy Management Version 1.0 - delete: - summary: Delete a service + '/v2/policies/{policy_id}/status': + get: + summary: Returns a policy status deprecated: false produces: - - '*/*' - operationId: deleteServiceUsingDELETE_1 + - application/json + operationId: getPolicyStatusUsingGET responses: '200': schema: - type: string - description: OK - '204': - schema: - type: string - description: Service deleted + $ref: '#/definitions/policy_status_info_v2' + description: Policy status '401': description: Unauthorized '403': description: Forbidden '404': schema: - type: string - description: Service not found + $ref: '#/definitions/error_information' + description: Policy is not found parameters: - - in: query - allowEmptyValue: false - name: name - description: The name of the service + - in: path + name: policy_id + description: policy_id type: string required: true tags: - - A1 Policy Management Version 1.0 - /ric: + - A1 Policy Management Version 2.0 (in progress) + /v2/rics: get: - summary: Returns the name of a RIC managing one Mananged Element + summary: Query Near-RT RIC information deprecated: false produces: - - '*/*' - operationId: getRicUsingGET + - application/json + description: The call returns all Near-RT RICs that supports a given policy type identity + operationId: getRicsUsingGET_1 responses: '200': schema: - type: string - description: Near-RT RIC is found + $ref: '#/definitions/ric_info_list_v2' + description: OK '401': description: Unauthorized '403': description: Forbidden '404': schema: - type: string - description: Near-RT RIC is not found + $ref: '#/definitions/error_information' + description: Policy type is not found parameters: - in: query allowEmptyValue: false - name: managedElementId - description: The identity of the Managed Element + name: policytype_id + description: 'The identity of a policy type. If given, all Near-RT RICs supporteing the policy type are returned' type: string - required: true + required: false tags: - - A1 Policy Management Version 1.0 - /services/keepalive: + - A1 Policy Management Version 2.0 (in progress) + /v2/configuration: put: - summary: Heartbeat from a service + summary: Replace the current configuration with the given configuration deprecated: false produces: - '*/*' - operationId: keepAliveServiceUsingPUT_1 + operationId: putConfigurationUsingPUT responses: '200': - schema: - type: string - description: 'Service supervision timer refreshed, OK' + description: Configuration updated '201': description: Created + '400': + schema: + $ref: '#/definitions/error_information' + description: Invalid configuration provided '401': description: Unauthorized '403': description: Forbidden '404': - description: 'The service is not found, needs re-registration' + description: Not Found + '500': + schema: + $ref: '#/definitions/error_information' + description: Something went wrong when replacing the configuration. Try again. parameters: - - in: query - allowEmptyValue: false - name: name - description: The name of the service - type: string + - schema: + type: string + in: body + name: configuration + description: configuration required: true tags: - - A1 Policy Management Version 1.0 + - A1 Policy Management Configuration consumes: - application/json - /v2/services/keepalive: - put: - summary: Heartbeat indicates that the service is running + /policy_ids: + get: + summary: 'Query policies, only policy identities returned' deprecated: false produces: - '*/*' - operationId: keepAliveServiceUsingPUT + operationId: getPolicyIdsUsingGET_1 responses: '200': schema: - type: object - description: 'Service supervision timer refreshed, OK' - '201': - description: Created + type: array + items: + type: string + description: Policy identitiess '401': description: Unauthorized '403': description: Forbidden '404': schema: - $ref: '#/definitions/error_information' - description: 'The service is not found, needs re-registration' + type: string + description: Near-RT RIC or type not found parameters: - in: query allowEmptyValue: false - name: service_id - description: The identity of the service + name: ric + description: The name of the Near-RT RIC to get policies for. type: string - required: true + required: false + - in: query + allowEmptyValue: false + name: service + description: The name of the service to get policies for. + type: string + required: false + - in: query + allowEmptyValue: false + name: type + description: The name of the policy type to get policies for. + type: string + required: false tags: - - A1 Policy Management Version 2.0 (in progress) - consumes: - - application/json - /v2/policy-schemas: + - A1 Policy Management Version 1.0 + /policy_schemas: get: summary: Returns policy type schema definitions deprecated: false produces: - - application/json + - '*/*' operationId: getPolicySchemasUsingGET responses: '200': schema: - $ref: '#/definitions/policy_schema_list_v2' + type: array + items: + type: object description: Policy schemas '401': description: Unauthorized @@ -552,36 +647,30 @@ paths: description: Forbidden '404': schema: - $ref: '#/definitions/error_information' + type: string description: Near-RT RIC is not found parameters: - in: query allowEmptyValue: false - name: policytype_id - description: 'The identity of the policy type to get the definition for. When this parameter is given, max one schema will be returned' - type: string - required: true - - in: query - allowEmptyValue: false - name: ric_id - description: The identity of the Near-RT RIC to get the definitions for. + name: ric + description: The name of the Near-RT RIC to get the definitions for. type: string required: false tags: - - A1 Policy Management Version 2.0 (in progress) - /v2/ric: + - A1 Policy Management Version 1.0 + /v2/policy-instances: get: - summary: Returns info for a Near-RT RIC + summary: Query for A1 policy instances deprecated: false produces: - application/json - description: Either a Near-RT RIC identity or a Mananged Element identity can be specified.
    The intention with Mananged Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU). - operationId: getRicUsingGET_1 + description: 'Returns a list of A1 policies matching given search criteria.
    If several query parameters are defined, the policies matching all conditions are returned.' + operationId: getPolicyInstancesUsingGET responses: '200': schema: - $ref: '#/definitions/ric_info_v2' - description: Near-RT RIC is found + $ref: '#/definitions/policy_info_list_v2' + description: Policies '401': description: Unauthorized '403': @@ -589,92 +678,107 @@ paths: '404': schema: $ref: '#/definitions/error_information' - description: Near-RT RIC is not found + description: 'Near-RT RIC, policy type or service not found' parameters: - in: query allowEmptyValue: false - name: managed_element_id - description: 'The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.' + name: policytype_id + description: The identity of the policy type to get policies for. type: string required: false - in: query allowEmptyValue: false name: ric_id - description: The identity of a Near-RT RIC to get information for. + description: The identity of the Near-RT RIC to get policies for. + type: string + required: false + - in: query + allowEmptyValue: false + name: service_id + description: The identity of the service to get policies for. type: string required: false tags: - A1 Policy Management Version 2.0 (in progress) - /policy: + /v2/services: get: - summary: Returns a policy configuration + summary: Returns service information deprecated: false produces: - - '*/*' - operationId: getPolicyUsingGET_1 + - application/json + description: Either information about a registered service with given identity or all registered services are returned. + operationId: getServicesUsingGET_1 responses: '200': schema: - type: object - description: Policy found + $ref: '#/definitions/service_list_v2' + description: OK '401': description: Unauthorized '403': description: Forbidden '404': - description: Policy is not found + schema: + $ref: '#/definitions/error_information' + description: Service is not found parameters: - in: query allowEmptyValue: false - name: id - description: The identity of the policy instance. + name: service_id + description: The identity of the service type: string - required: true + required: false tags: - - A1 Policy Management Version 1.0 - delete: - summary: Delete a policy + - A1 Policy Management Version 2.0 (in progress) + put: + summary: Register a service deprecated: false produces: - '*/*' - operationId: deletePolicyUsingDELETE_1 + description: 'Registering a service is needed to:
    • Get callbacks.
    • Activate supervision of the service. If a service is inactive, its policies will be deleted.
    ' + operationId: putServiceUsingPUT_1 responses: '200': - description: Not used - '204': - description: Policy deleted + schema: + type: object + description: Service updated + '201': + schema: + type: object + description: Service created + '400': + schema: + $ref: '#/definitions/error_information' + description: The ServiceRegistrationInfo is not accepted '401': description: Unauthorized '403': description: Forbidden '404': - schema: - type: string - description: Policy is not found - '423': - schema: - type: string - description: Near-RT RIC is not operational + description: Not Found parameters: - - in: query - allowEmptyValue: false - name: id - description: The identity of the policy instance. - type: string + - schema: + $ref: '#/definitions/service_registration_info_v2' + in: body + name: registrationInfo + description: registrationInfo required: true tags: - - A1 Policy Management Version 1.0 - put: - summary: Put a policy + - A1 Policy Management Version 2.0 (in progress) + consumes: + - application/json + /ric: + get: + summary: Returns the name of a RIC managing one Mananged Element deprecated: false produces: - '*/*' - operationId: putPolicyUsingPUT_1 + operationId: getRicUsingGET responses: '200': - description: Policy updated - '201': - description: Policy created + schema: + type: string + description: Near-RT RIC is found '401': description: Unauthorized '403': @@ -682,87 +786,61 @@ paths: '404': schema: type: string - description: Near-RT RIC or policy type is not found - '423': - schema: - type: string - description: Near-RT RIC is not operational + description: Near-RT RIC is not found parameters: - in: query allowEmptyValue: false - name: id - description: The identity of the policy instance. - type: string - required: true - - schema: - type: object - in: body - name: jsonBody - description: jsonBody - required: true - - in: query - allowEmptyValue: false - name: ric - description: The name of the Near-RT RIC where the policy will be created. - type: string - required: true - - in: query - allowEmptyValue: false - name: service - description: The name of the service creating the policy. + name: managedElementId + description: The identity of the Managed Element type: string required: true - - default: false - in: query - allowEmptyValue: false - name: transient - x-example: false - description: If the policy is transient or not (boolean defaulted to false). A policy is transient if it will be forgotten when the service needs to reconnect to the Near-RT RIC. - type: boolean - required: false - - in: query - allowEmptyValue: false - name: type - description: The name of the policy type. - type: string - required: false tags: - A1 Policy Management Version 1.0 - consumes: - - application/json - /status: - get: - summary: Returns status and statistics of this service + /services/keepalive: + put: + summary: Heartbeat from a service deprecated: false produces: - '*/*' - operationId: getStatusUsingGET + operationId: keepAliveServiceUsingPUT responses: '200': schema: type: string - description: Service is living + description: 'Service supervision timer refreshed, OK' + '201': + description: Created '401': description: Unauthorized '403': description: Forbidden '404': - description: Not Found + description: 'The service is not found, needs re-registration' + parameters: + - in: query + allowEmptyValue: false + name: name + description: The name of the service + type: string + required: true tags: - A1 Policy Management Version 1.0 - /v2/policy-ids: - get: - summary: 'Query policies, only policy identities are returned' + consumes: + - application/json + '/v2/services/{service_id}/keepalive': + put: + summary: Heartbeat indicates that the service is running deprecated: false produces: - - application/json - description: 'Returns a list of A1 policies matching given search criteria.
    If several query parameters are defined, the policies matching all conditions are returned.' - operationId: getPolicyIdsUsingGET + - '*/*' + operationId: keepAliveServiceUsingPUT_1 responses: '200': schema: - $ref: '#/definitions/policy_id_list_v2' - description: Policy identities + type: object + description: 'Service supervision timer refreshed, OK' + '201': + description: Created '401': description: Unauthorized '403': @@ -770,83 +848,50 @@ paths: '404': schema: $ref: '#/definitions/error_information' - description: Near-RT RIC or type not found + description: 'The service is not found, needs re-registration' parameters: - - in: query - allowEmptyValue: false - name: policytype_id - description: The identity of the policy type to get policies for. - type: string - required: false - - in: query - allowEmptyValue: false - name: ric_id - description: The identity of the Near-RT RIC to get policies for. - type: string - required: false - - in: query - allowEmptyValue: false + - in: path name: service_id - description: The identity of the service to get policies for. + description: service_id type: string - required: false + required: true tags: - A1 Policy Management Version 2.0 (in progress) - /policies: + consumes: + - application/json + /status: get: - summary: Query policies + summary: Returns status and statistics of this service deprecated: false produces: - '*/*' - operationId: getPoliciesUsingGET_1 + operationId: getStatusUsingGET_1 responses: '200': schema: - type: array - items: - $ref: '#/definitions/policy_info_v1' - description: Policies + type: string + description: Service is living '401': description: Unauthorized '403': description: Forbidden '404': - schema: - type: string - description: Near-RT RIC or type not found - parameters: - - in: query - allowEmptyValue: false - name: ric - description: The name of the Near-RT RIC to get policies for. - type: string - required: false - - in: query - allowEmptyValue: false - name: service - description: The name of the service to get policies for. - type: string - required: false - - in: query - allowEmptyValue: false - name: type - description: The name of the policy type to get policies for. - type: string - required: false + description: Not Found tags: - A1 Policy Management Version 1.0 - /v2/policy-status: + /v2/rics/ric: get: - summary: Returns a policy status + summary: Returns info for one Near-RT RIC deprecated: false produces: - application/json - operationId: getPolicyStatusUsingGET + description: Either a Near-RT RIC identity or a Mananged Element identity can be specified.
    The intention with Mananged Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU). + operationId: getRicUsingGET_1 responses: '200': schema: - $ref: '#/definitions/json_object' - description: Policy status + $ref: '#/definitions/ric_info_v2' + description: Near-RT RIC is found '401': description: Unauthorized '403': @@ -854,83 +899,87 @@ paths: '404': schema: $ref: '#/definitions/error_information' - description: Policy is not found + description: Near-RT RIC is not found parameters: - in: query allowEmptyValue: false - name: policy_id - description: The identity of the policy. + name: managed_element_id + description: 'The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.' type: string - required: true + required: false + - in: query + allowEmptyValue: false + name: ric_id + description: The identity of a Near-RT RIC to get information for. + type: string + required: false tags: - A1 Policy Management Version 2.0 (in progress) - /policy_schema: - get: - summary: Returns one policy type schema definition + /r-app/pms-callback: + post: + summary: Callback for Near-RT RIC status deprecated: false produces: - - '*/*' - operationId: getPolicySchemaUsingGET + - application/json + description: The URL to this call is registerred at Service registration. + operationId: jobStatusCallbackUsingPOST responses: '200': - schema: - type: object - description: Policy schema + description: OK + '201': + description: Created '401': description: Unauthorized '403': description: Forbidden '404': - schema: - type: string - description: The policy type is not found + description: Not Found parameters: - - in: query - allowEmptyValue: false - name: id - description: The identity of the policy type to get the definition for. - type: string + - schema: + $ref: '#/definitions/service_callback_info_v2' + in: body + name: body + description: body required: true tags: - - A1 Policy Management Version 1.0 - /rics: + - R-App Callbacks + consumes: + - application/json + '/v2/policy-types/{policytype_id}': get: - summary: Query Near-RT RIC information + summary: Returns a policy type definition deprecated: false produces: - - '*/*' - operationId: getRicsUsingGET + - application/json + operationId: getPolicyTypeUsingGET responses: '200': schema: - type: array - items: - $ref: '#/definitions/ric_info_v1' - description: OK + $ref: '#/definitions/policytype_v2' + description: Policy type '401': description: Unauthorized '403': description: Forbidden '404': schema: - type: string + $ref: '#/definitions/error_information' description: Policy type is not found parameters: - - in: query - allowEmptyValue: false - name: policyType - description: The name of the policy type + - in: path + name: policytype_id + description: policytype_id type: string - required: false + required: true tags: - - A1 Policy Management Version 1.0 + - A1 Policy Management Version 2.0 (in progress) /service: put: summary: Register a service deprecated: false produces: - '*/*' - operationId: putServiceUsingPUT_1 + operationId: putServiceUsingPUT responses: '200': schema: @@ -963,17 +1012,17 @@ paths: - application/json /v2/policies: get: - summary: Query for existing A1 policies + summary: Query policy identities deprecated: false produces: - application/json description: 'Returns a list of A1 policies matching given search criteria.
    If several query parameters are defined, the policies matching all conditions are returned.' - operationId: getPoliciesUsingGET + operationId: getPolicyIdsUsingGET responses: '200': schema: - $ref: '#/definitions/policy_info_list_v2' - description: Policies + $ref: '#/definitions/policy_id_list_v2' + description: Policy identities '401': description: Unauthorized '403': @@ -981,7 +1030,7 @@ paths: '404': schema: $ref: '#/definitions/error_information' - description: 'Near-RT RIC, policy type or service not found' + description: Near-RT RIC or type not found parameters: - in: query allowEmptyValue: false @@ -1003,48 +1052,17 @@ paths: required: false tags: - A1 Policy Management Version 2.0 (in progress) - /policy_status: - get: - summary: Returns a policy status - deprecated: false - produces: - - '*/*' - operationId: getPolicyStatusUsingGET_1 - responses: - '200': - schema: - type: object - description: Policy status - '401': - description: Unauthorized - '403': - description: Forbidden - '404': - schema: - type: string - description: Policy is not found - parameters: - - in: query - allowEmptyValue: false - name: id - description: The identity of the policy. - type: string - required: true - tags: - - A1 Policy Management Version 1.0 - /v2/rics: - get: - summary: Query Near-RT RIC information + put: + summary: Create or update a policy deprecated: false produces: - application/json - description: The call returns all Near-RT RICs that supports a given policy type identity - operationId: getRicsUsingGET_1 + operationId: putPolicyUsingPUT responses: '200': - schema: - $ref: '#/definitions/ric_info_list_v2' - description: OK + description: Policy updated + '201': + description: Policy created '401': description: Unauthorized '403': @@ -1052,17 +1070,23 @@ paths: '404': schema: $ref: '#/definitions/error_information' - description: Policy type is not found + description: Near-RT RIC or policy type is not found + '423': + schema: + $ref: '#/definitions/error_information' + description: Near-RT RIC is not operational parameters: - - in: query - allowEmptyValue: false - name: policytype_id - description: 'The identity of a policy type. If given, all Near-RT RICs supporteing the policy type are returned' - type: string - required: false + - schema: + $ref: '#/definitions/policy_info_v2' + in: body + name: policyInfo + description: policyInfo + required: true tags: - A1 Policy Management Version 2.0 (in progress) -host: 'localhost:41437' + consumes: + - application/json +host: 'localhost:35345' definitions: error_information: description: 'Problem as defined in https://tools.ietf.org/html/rfc7807' @@ -1111,16 +1135,6 @@ definitions: ric: description: identity of the target Near-RT RIC type: string - policy_schema_list_v2: - description: Policy type json schemas - type: object - title: policy_schema_list_v2 - properties: - policy_schemas: - description: 'Policy type json schemas. The schema is a json object following http://json-schema.org/draft-07/schema' - type: array - items: - type: object Mono«ResponseEntity«object»»: type: object title: Mono«ResponseEntity«object»» @@ -1150,7 +1164,7 @@ definitions: - AVAILABLE - SYNCHRONIZING - CONSISTENCY_CHECK - policy_type_ids: + policytype_ids: description: supported policy types type: array items: @@ -1186,7 +1200,7 @@ definitions: - service_id properties: callback_url: - description: callback for notifying of RIC synchronization + description: callback for notifying of Near-RT RIC state changes type: string service_id: description: identity of the service @@ -1215,16 +1229,17 @@ definitions: ricName: description: identity of the Near-RT RIC type: string - policy_type_id_list_v2: - description: Information about policy types + policy_status_info_v2: + description: Status for one A1-P Policy type: object - title: policy_type_id_list_v2 + title: policy_status_info_v2 properties: - policy_type_ids: - description: Policy type identities - type: array - items: - type: string + last_modified: + description: 'timestamp, last modification time' + type: string + status: + description: the Policy status + type: object service_status_v1: type: object title: service_status_v1 @@ -1261,6 +1276,14 @@ definitions: format: int64 description: time since last invocation by the service type: integer + policytype_v2: + description: Policy type + type: object + title: policytype_v2 + properties: + policy_schema: + description: 'Policy type json scema. The schema is a json object following http://json-schema.org/draft-07/schema' + type: object ric_info_list_v2: description: List of Near-RT RIC information type: object @@ -1271,6 +1294,16 @@ definitions: type: array items: $ref: '#/definitions/ric_info_v2' + policytype_id_list_v2: + description: Information about policy types + type: object + title: policytype_id_list_v2 + properties: + policytype_ids: + description: Policy type identities + type: array + items: + type: string policy_id_list_v2: description: A list of policy identities type: object @@ -1285,6 +1318,12 @@ definitions: description: Information for one A1-P Policy type: object title: policy_info_v2 + required: + - policy_data + - policy_id + - policytype_id + - ric_id + - service_id properties: ric_id: description: identity of the target Near-RT RIC @@ -1292,22 +1331,21 @@ definitions: policy_id: description: identity of the policy type: string + 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.' + type: boolean service_id: description: the name of the service owning the policy type: string policy_data: description: the configuration of the policy type: object - last_modified: - description: 'timestamp, last modification time' + status_notification_uri: + description: Callback URI for policy status updates type: string - policy_type_id: - description: name of the policy type + policytype_id: + description: identity of the policy type type: string - json_object: - description: A JSON object defining the configuration of the policy. The schema is defined by the Policy Type. - type: object - title: json_object service_list_v2: description: List of service information type: object @@ -1318,6 +1356,24 @@ definitions: type: array items: $ref: '#/definitions/service_status_v2' + service_callback_info_v2: + description: Information transferred as in Service callbacks (callback_url) + type: object + title: service_callback_info_v2 + required: + - event_type + - ric_id + properties: + ric_id: + description: identity of a Near-RT RIC + type: string + event_type: + description: |- + values: + AVAILABLE: the Near-RT RIC has become available for A1 Policy management + type: string + enum: + - AVAILABLE Mono«ResponseEntity«string»»: type: object title: Mono«ResponseEntity«string»» @@ -1334,8 +1390,11 @@ info: title: A1 Policy management service version: 1.1.0 tags: + - name: A1 Policy Management Configuration + description: Configuration Controller - name: A1 Policy Management Version 1.0 description: Policy Controller - name: A1 Policy Management Version 2.0 (in progress) description: Policy Controller - + - name: R-App Callbacks + description: Rapp Simulator Controller -- cgit 1.2.3-korg