From 9f1d9499e4e1ca40fddffb195353148cc3271b9c Mon Sep 17 00:00:00 2001 From: PatrikBuhr Date: Mon, 17 Apr 2023 13:00:15 +0200 Subject: A1 PMS support for fine grained access control -A1 London Documentation updates. Issue-ID: CCSDK-3889 Signed-off-by: PatrikBuhr Change-Id: Iaa73d0128a4c466ed2b3d1803af66368d3c37fa6 --- a1-policy-management/api/pms-api.json | 6 +- a1-policy-management/api/pms-api.yaml | 37 +- a1-policy-management/api/pms-api/index.html | 1862 ++++++++++---------- .../a1policymanagementservice/SwaggerConfig.java | 22 +- .../authorization/AuthorizationConsts.java | 4 +- .../controllers/v2/Consts.java | 2 +- .../OpenPolicyAgentSimulatorController.java | 2 +- docs/architecture/architecture.rst | 16 +- docs/conf.py | 4 +- docs/guide/developer-guide.rst | 4 +- docs/media/ONAP-A1ControllerArchitecture.png | Bin 172679 -> 88893 bytes docs/media/ONAP-A1ControllerArchitecture.pptx | Bin 0 -> 32575 bytes .../openapitoolgen/offeredapis/pms-api/index.html | 407 +++++ docs/offeredapis/swagger/pms-api.json | 6 +- docs/offeredapis/swagger/pms-api.yaml | 64 + docs/requirements-docs.txt | 1 + docs/tox.ini | 14 +- 17 files changed, 1477 insertions(+), 974 deletions(-) create mode 100644 docs/media/ONAP-A1ControllerArchitecture.pptx diff --git a/a1-policy-management/api/pms-api.json b/a1-policy-management/api/pms-api.json index 9efa7b75..33fa5e18 100644 --- a/a1-policy-management/api/pms-api.json +++ b/a1-policy-management/api/pms-api.json @@ -936,7 +936,7 @@ "description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}} }}, - "tags": ["Callbacks"] + "tags": ["Service callbacks"] }}, "/a1-policy/v2/services/{service_id}": {"delete": { "summary": "Unregister a service", @@ -999,9 +999,9 @@ "name": "Copyright (C) 2020-2023 Nordix Foundation. Licensed under the Apache License.", "url": "http://www.apache.org/licenses/LICENSE-2.0" }, - "description": "

General<\/h2>

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>

  • A1 Policy creation, modification and deletion.<\/li>
  • Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs<\/li>
  • Maintaining a view of supported Near-RT RIC policy types<\/li>
  • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.<\/li><\/ul>

    APIs provided by the service<\/h2>

    A1 Policy Management<\/h3>

    This is an API for management of A1 Policies.<\/p>

    • A1 Policy retrieval, creation, modification and deletion.<\/li>
    • Retrieval of supported A1 Policy types for a Near-RT RIC<\/li>
    • Retrieval of status for existing A1 policies<\/li><\/ul>

      Management of configuration<\/h3>

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p>

      Callbacks<\/h3>

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p>

      NearRT-RIC Repository<\/h3>

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p>

      Health Check<\/h3>

      API used for supervision of the PMS component.<\/p>

      Service Registry and Supervision<\/h3>

      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>

      Spring Boot Actuator<\/h3>

      Provides generic functions used to monitor and manage the Spring web application.<\/p>", + "description": "

      General<\/h2>

      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>

      • A1 Policy creation, modification and deletion.<\/li>
      • Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs<\/li>
      • Maintaining a view of supported Near-RT RIC policy types<\/li>
      • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.<\/li><\/ul>

        APIs provided or defined by the service<\/h2>

        A1 Policy Management<\/h3>

        This is an API for management of A1 Policies.<\/p>

        • A1 Policy retrieval, creation, modification and deletion.<\/li>
        • Retrieval of supported A1 Policy types for a Near-RT RIC<\/li>
        • Retrieval of status for existing A1 policies<\/li><\/ul>

          Management of configuration<\/h3>

          API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p>

          Service callbacks<\/h3>

          These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p>

          NearRT-RIC Repository<\/h3>

          This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p>

          Health Check<\/h3>

          API used for supervision of the PMS component.<\/p>

          Service Registry and Supervision<\/h3>

          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>

          Authorization API<\/h3>

          API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy type.<\/p>

          Spring Boot Actuator<\/h3>

          Provides generic functions used to monitor and manage the Spring web application.<\/p>", "title": "A1 Policy Management Service", - "version": "1.1.0" + "version": "1.2.0" }, "tags": [ { diff --git a/a1-policy-management/api/pms-api.yaml b/a1-policy-management/api/pms-api.yaml index a905c40e..44dc2ba4 100644 --- a/a1-policy-management/api/pms-api.yaml +++ b/a1-policy-management/api/pms-api.yaml @@ -6,28 +6,31 @@ info: \ and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs

        • Maintaining\ \ a view of supported Near-RT RIC policy types
        • Supervision of using services\ \ (R-APPs). When a service is unavailable, its policies are removed.

        APIs\ - \ provided by the service

        A1 Policy Management

        This is an API for\ - \ management of A1 Policies.

        • A1 Policy retrieval, creation, modification\ - \ and deletion.
        • Retrieval of supported A1 Policy types for a Near-RT RIC
        • Retrieval\ - \ of status for existing A1 policies

        Management of configuration

        API\ - \ for updating and retrieval of the component configuration. Note that there other\ - \ ways to maintain the configuration.

        Callbacks

        These are endpoints\ - \ that are invoked by this service. The callbacks are registered in this service\ - \ at service registration.

        NearRT-RIC Repository

        This is an API\ - \ that provides support for looking up a NearRT-RIC. Each A1 policy is targeted\ - \ for one Near-RT RIC.

        Health Check

        API used for supervision of\ - \ the PMS component.

        Service Registry and Supervision

        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\ + \ provided or defined by the service

      A1 Policy Management

      This\ + \ is an API for management of A1 Policies.

      • A1 Policy retrieval, creation,\ + \ modification and deletion.
      • Retrieval of supported A1 Policy types for\ + \ a Near-RT RIC
      • Retrieval of status for existing A1 policies

      Management\ + \ of configuration

      API for updating and retrieval of the component configuration.\ + \ Note that there other ways to maintain the configuration.

      Service callbacks

      These\ + \ are endpoints that are invoked by this service. The callbacks are registered\ + \ in this service at service registration.

      NearRT-RIC Repository

      This\ + \ is an API that provides support for looking up a NearRT-RIC. Each A1 policy\ + \ is targeted for one Near-RT RIC.

      Health Check

      API used for supervision\ + \ of the PMS component.

      Service Registry and Supervision

      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.

      Spring Boot Actuator

      Provides\ - \ generic functions used to monitor and manage the Spring web application.

      " + \ is a feature that is optional to use.

      Authorization API

      API used\ + \ for access control of A1 Policy access. If configured, an external authorization\ + \ provider is requested to grant access to the A1 Policy type.

      Spring Boot\ + \ Actuator

      Provides generic functions used to monitor and manage the Spring\ + \ web application.

      " license: name: Copyright (C) 2020-2023 Nordix Foundation. Licensed under the Apache License. url: http://www.apache.org/licenses/LICENSE-2.0 title: A1 Policy Management Service - version: 1.1.0 + version: 1.2.0 servers: - url: / tags: @@ -879,7 +882,7 @@ paths: description: OK summary: Callback for Near-RT RIC status tags: - - Callbacks + - Service callbacks /a1-policy/v2/services/{service_id}: delete: operationId: deleteService diff --git a/a1-policy-management/api/pms-api/index.html b/a1-policy-management/api/pms-api/index.html index 8b29a313..c4aa60e7 100644 --- a/a1-policy-management/api/pms-api/index.html +++ b/a1-policy-management/api/pms-api/index.html @@ -1230,10 +1230,6 @@ ul.nav-tabs {
    • performAccessControl
    • - -
    • - serviceCallback -
    • getStatus @@ -1255,6 +1251,10 @@ ul.nav-tabs {
    • getRics
    • + +
    • + serviceCallback +
    • deleteService @@ -1281,10 +1281,10 @@ ul.nav-tabs {
      -
      -

      Callbacks

      -
      -
      +
      +

      HealthCheck

      +
      +
      -

      serviceCallback

      -

      Callback for Near-RT RIC status

      +

      getStatus

      +

      Returns status and statistics of this service

      -

      The URL to this call is registered at Service registration.

      +


      -
      /r-app/near-rt-ric-status
      +
      /a1-policy/v2/status

      Usage and SDK Samples

      -
      -
      curl -X POST \
      +                          
      +
      curl -X GET \
        -H "Accept: application/json" \
      - -H "Content-Type: application/json" \
      - "http://localhost/r-app/near-rt-ric-status" \
      - -d ''
      + "http://localhost/a1-policy/v2/status"
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      -import org.openapitools.client.api.CallbacksApi;
      +import org.openapitools.client.api.HealthCheckApi;
       
       import java.io.File;
       import java.util.*;
       
      -public class CallbacksApiExample {
      +public class HealthCheckApiExample {
           public static void main(String[] args) {
       
               // Create an instance of the API class
      -        CallbacksApi apiInstance = new CallbacksApi();
      -        ServiceCallbackInfoV2 serviceCallbackInfoV2 = ; // ServiceCallbackInfoV2 | 
      +        HealthCheckApi apiInstance = new HealthCheckApi();
       
               try {
      -            Object result = apiInstance.serviceCallback(serviceCallbackInfoV2);
      +            status_info_v2 result = apiInstance.getStatus();
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling CallbacksApi#serviceCallback");
      +            System.err.println("Exception when calling HealthCheckApi#getStatus");
                   e.printStackTrace();
               }
           }
      @@ -9698,38 +9695,36 @@ public class CallbacksApiExample {
       
      -
      -
      import org.openapitools.client.api.CallbacksApi;
      +                          
      +
      import org.openapitools.client.api.HealthCheckApi;
       
      -public class CallbacksApiExample {
      +public class HealthCheckApiExample {
           public static void main(String[] args) {
      -        CallbacksApi apiInstance = new CallbacksApi();
      -        ServiceCallbackInfoV2 serviceCallbackInfoV2 = ; // ServiceCallbackInfoV2 | 
      +        HealthCheckApi apiInstance = new HealthCheckApi();
       
               try {
      -            Object result = apiInstance.serviceCallback(serviceCallbackInfoV2);
      +            status_info_v2 result = apiInstance.getStatus();
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling CallbacksApi#serviceCallback");
      +            System.err.println("Exception when calling HealthCheckApi#getStatus");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
      -CallbacksApi *apiInstance = [[CallbacksApi alloc] init];
      -ServiceCallbackInfoV2 *serviceCallbackInfoV2 = ; // 
      +HealthCheckApi *apiInstance = [[HealthCheckApi alloc] init];
       
      -// Callback for Near-RT RIC status
      -[apiInstance serviceCallbackWith:serviceCallbackInfoV2
      -              completionHandler: ^(Object output, NSError* error) {
      +// Returns status and statistics of this service
      +[apiInstance getStatusWithCompletionHandler: 
      +              ^(status_info_v2 output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -9740,13 +9735,11 @@ ServiceCallbackInfoV2 *serviceCallbackInfoV2 = ; //
       
      -
      +
      var A1PolicyManagementService = require('a1_policy_management_service');
       
       // Create an instance of the API class
      -var api = new A1PolicyManagementService.CallbacksApi()
      -var serviceCallbackInfoV2 = ; // {ServiceCallbackInfoV2} 
      -
      +var api = new A1PolicyManagementService.HealthCheckApi()
       var callback = function(error, data, response) {
         if (error) {
           console.error(error);
      @@ -9754,14 +9747,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.serviceCallback(serviceCallbackInfoV2, callback);
      +api.getStatus(callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -9770,21 +9763,20 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class serviceCallbackExample
      +    public class getStatusExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
      -            var apiInstance = new CallbacksApi();
      -            var serviceCallbackInfoV2 = new ServiceCallbackInfoV2(); // ServiceCallbackInfoV2 | 
      +            var apiInstance = new HealthCheckApi();
       
                   try {
      -                // Callback for Near-RT RIC status
      -                Object result = apiInstance.serviceCallback(serviceCallbackInfoV2);
      +                // Returns status and statistics of this service
      +                status_info_v2 result = apiInstance.getStatus();
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling CallbacksApi.serviceCallback: " + e.Message );
      +                Debug.Print("Exception when calling HealthCheckApi.getStatus: " + e.Message );
                   }
               }
           }
      @@ -9792,42 +9784,40 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
      -$api_instance = new OpenAPITools\Client\Api\CallbacksApi();
      -$serviceCallbackInfoV2 = ; // ServiceCallbackInfoV2 | 
      +$api_instance = new OpenAPITools\Client\Api\HealthCheckApi();
       
       try {
      -    $result = $api_instance->serviceCallback($serviceCallbackInfoV2);
      +    $result = $api_instance->getStatus();
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling CallbacksApi->serviceCallback: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling HealthCheckApi->getStatus: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
      -use WWW::OPenAPIClient::CallbacksApi;
      +use WWW::OPenAPIClient::HealthCheckApi;
       
       # Create an instance of the API class
      -my $api_instance = WWW::OPenAPIClient::CallbacksApi->new();
      -my $serviceCallbackInfoV2 = WWW::OPenAPIClient::Object::ServiceCallbackInfoV2->new(); # ServiceCallbackInfoV2 | 
      +my $api_instance = WWW::OPenAPIClient::HealthCheckApi->new();
       
       eval {
      -    my $result = $api_instance->serviceCallback(serviceCallbackInfoV2 => $serviceCallbackInfoV2);
      +    my $result = $api_instance->getStatus();
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling CallbacksApi->serviceCallback: $@\n";
      +    warn "Exception when calling HealthCheckApi->getStatus: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -9835,25 +9825,23 @@ from openapi_client.rest import ApiException
       from pprint import pprint
       
       # Create an instance of the API class
      -api_instance = openapi_client.CallbacksApi()
      -serviceCallbackInfoV2 =  # ServiceCallbackInfoV2 | 
      +api_instance = openapi_client.HealthCheckApi()
       
       try:
      -    # Callback for Near-RT RIC status
      -    api_response = api_instance.service_callback(serviceCallbackInfoV2)
      +    # Returns status and statistics of this service
      +    api_response = api_instance.get_status()
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling CallbacksApi->serviceCallback: %s\n" % e)
      + print("Exception when calling HealthCheckApi->getStatus: %s\n" % e)
      -
      -
      extern crate CallbacksApi;
      +                            
      +
      extern crate HealthCheckApi;
       
       pub fn main() {
      -    let serviceCallbackInfoV2 = ; // ServiceCallbackInfoV2
       
      -    let mut context = CallbacksApi::Context::default();
      -    let result = client.serviceCallback(serviceCallbackInfoV2, &context).wait();
      +    let mut context = HealthCheckApi::Context::default();
      +    let result = client.getStatus(&context).wait();
       
           println!("{:?}", result);
       }
      @@ -9870,73 +9858,27 @@ pub fn main() {
       
       
       
      -                            
      Body parameters
      - - - - - - - - - -
      NameDescription
      serviceCallbackInfoV2 * -

      - -
      -

      Responses

      -

      -

      +

      +

      -

      -
      -
      -

      HealthCheck

      -
      -
      +
      +
      -

      getStatus

      +

      getStatusV1

      Returns status and statistics of this service

      @@ -10004,33 +9943,33 @@ $(document).ready(function() {


      -
      /a1-policy/v2/status
      +
      /status

      Usage and SDK Samples

      -
      +
      curl -X GET \
      - -H "Accept: application/json" \
      - "http://localhost/a1-policy/v2/status"
      + -H "Accept: */*" \
      + "http://localhost/status"
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      @@ -10046,10 +9985,10 @@ public class HealthCheckApiExample {
               HealthCheckApi apiInstance = new HealthCheckApi();
       
               try {
      -            status_info_v2 result = apiInstance.getStatus();
      +            'String' result = apiInstance.getStatusV1();
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling HealthCheckApi#getStatus");
      +            System.err.println("Exception when calling HealthCheckApi#getStatusV1");
                   e.printStackTrace();
               }
           }
      @@ -10057,7 +9996,7 @@ public class HealthCheckApiExample {
       
      -
      +
      import org.openapitools.client.api.HealthCheckApi;
       
       public class HealthCheckApiExample {
      @@ -10065,28 +10004,28 @@ public class HealthCheckApiExample {
               HealthCheckApi apiInstance = new HealthCheckApi();
       
               try {
      -            status_info_v2 result = apiInstance.getStatus();
      +            'String' result = apiInstance.getStatusV1();
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling HealthCheckApi#getStatus");
      +            System.err.println("Exception when calling HealthCheckApi#getStatusV1");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
       HealthCheckApi *apiInstance = [[HealthCheckApi alloc] init];
       
       // Returns status and statistics of this service
      -[apiInstance getStatusWithCompletionHandler: 
      -              ^(status_info_v2 output, NSError* error) {
      +[apiInstance getStatusV1WithCompletionHandler: 
      +              ^('String' output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -10097,7 +10036,7 @@ HealthCheckApi *apiInstance = [[HealthCheckApi alloc] init];
       
      -
      +
      var A1PolicyManagementService = require('a1_policy_management_service');
       
       // Create an instance of the API class
      @@ -10109,14 +10048,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.getStatus(callback);
      +api.getStatusV1(callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -10125,7 +10064,7 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class getStatusExample
      +    public class getStatusV1Example
           {
               public void main()
               {
      @@ -10135,10 +10074,10 @@ namespace Example
       
                   try {
                       // Returns status and statistics of this service
      -                status_info_v2 result = apiInstance.getStatus();
      +                'String' result = apiInstance.getStatusV1();
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling HealthCheckApi.getStatus: " + e.Message );
      +                Debug.Print("Exception when calling HealthCheckApi.getStatusV1: " + e.Message );
                   }
               }
           }
      @@ -10146,7 +10085,7 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
      @@ -10154,15 +10093,15 @@ require_once(__DIR__ . '/vendor/autoload.php');
       $api_instance = new OpenAPITools\Client\Api\HealthCheckApi();
       
       try {
      -    $result = $api_instance->getStatus();
      +    $result = $api_instance->getStatusV1();
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling HealthCheckApi->getStatus: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling HealthCheckApi->getStatusV1: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
       use WWW::OPenAPIClient::HealthCheckApi;
      @@ -10171,15 +10110,15 @@ use WWW::OPenAPIClient::HealthCheckApi;
       my $api_instance = WWW::OPenAPIClient::HealthCheckApi->new();
       
       eval {
      -    my $result = $api_instance->getStatus();
      +    my $result = $api_instance->getStatusV1();
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling HealthCheckApi->getStatus: $@\n";
      +    warn "Exception when calling HealthCheckApi->getStatusV1: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -10191,19 +10130,19 @@ api_instance = openapi_client.HealthCheckApi()
       
       try:
           # Returns status and statistics of this service
      -    api_response = api_instance.get_status()
      +    api_response = api_instance.get_status_v1()
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling HealthCheckApi->getStatus: %s\n" % e)
      + print("Exception when calling HealthCheckApi->getStatusV1: %s\n" % e)
      -
      +
      extern crate HealthCheckApi;
       
       pub fn main() {
       
           let mut context = HealthCheckApi::Context::default();
      -    let result = client.getStatus(&context).wait();
      +    let result = client.getStatusV1(&context).wait();
       
           println!("{:?}", result);
       }
      @@ -10224,23 +10163,23 @@ pub fn main() {
       
       
                                 

      Responses

      -

      -

      +

      +

      -

      -
      -
      +
      +
      +

      ManagementOfConfiguration

      +
      +
      -

      getStatusV1

      -

      Returns status and statistics of this service

      +

      getConfiguration

      +

      Returns the contents of the application configuration file

      @@ -10305,52 +10247,52 @@ pub fn main() {


      -
      /status
      +
      /a1-policy/v2/configuration

      Usage and SDK Samples

      -
      +
      curl -X GET \
      - -H "Accept: */*" \
      - "http://localhost/status"
      + -H "Accept: application/json" \
      + "http://localhost/a1-policy/v2/configuration"
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      -import org.openapitools.client.api.HealthCheckApi;
      +import org.openapitools.client.api.ManagementOfConfigurationApi;
       
       import java.io.File;
       import java.util.*;
       
      -public class HealthCheckApiExample {
      +public class ManagementOfConfigurationApiExample {
           public static void main(String[] args) {
       
               // Create an instance of the API class
      -        HealthCheckApi apiInstance = new HealthCheckApi();
      +        ManagementOfConfigurationApi apiInstance = new ManagementOfConfigurationApi();
       
               try {
      -            'String' result = apiInstance.getStatusV1();
      +            Object result = apiInstance.getConfiguration();
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling HealthCheckApi#getStatusV1");
      +            System.err.println("Exception when calling ManagementOfConfigurationApi#getConfiguration");
                   e.printStackTrace();
               }
           }
      @@ -10358,36 +10300,36 @@ public class HealthCheckApiExample {
       
      -
      -
      import org.openapitools.client.api.HealthCheckApi;
      +                          
      +
      import org.openapitools.client.api.ManagementOfConfigurationApi;
       
      -public class HealthCheckApiExample {
      +public class ManagementOfConfigurationApiExample {
           public static void main(String[] args) {
      -        HealthCheckApi apiInstance = new HealthCheckApi();
      +        ManagementOfConfigurationApi apiInstance = new ManagementOfConfigurationApi();
       
               try {
      -            'String' result = apiInstance.getStatusV1();
      +            Object result = apiInstance.getConfiguration();
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling HealthCheckApi#getStatusV1");
      +            System.err.println("Exception when calling ManagementOfConfigurationApi#getConfiguration");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
      -HealthCheckApi *apiInstance = [[HealthCheckApi alloc] init];
      +ManagementOfConfigurationApi *apiInstance = [[ManagementOfConfigurationApi alloc] init];
       
      -// Returns status and statistics of this service
      -[apiInstance getStatusV1WithCompletionHandler: 
      -              ^('String' output, NSError* error) {
      +// Returns the contents of the application configuration file
      +[apiInstance getConfigurationWithCompletionHandler: 
      +              ^(Object output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -10398,11 +10340,11 @@ HealthCheckApi *apiInstance = [[HealthCheckApi alloc] init];
       
      -
      +
      var A1PolicyManagementService = require('a1_policy_management_service');
       
       // Create an instance of the API class
      -var api = new A1PolicyManagementService.HealthCheckApi()
      +var api = new A1PolicyManagementService.ManagementOfConfigurationApi()
       var callback = function(error, data, response) {
         if (error) {
           console.error(error);
      @@ -10410,14 +10352,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.getStatusV1(callback);
      +api.getConfiguration(callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -10426,20 +10368,20 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class getStatusV1Example
      +    public class getConfigurationExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
      -            var apiInstance = new HealthCheckApi();
      +            var apiInstance = new ManagementOfConfigurationApi();
       
                   try {
      -                // Returns status and statistics of this service
      -                'String' result = apiInstance.getStatusV1();
      +                // Returns the contents of the application configuration file
      +                Object result = apiInstance.getConfiguration();
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling HealthCheckApi.getStatusV1: " + e.Message );
      +                Debug.Print("Exception when calling ManagementOfConfigurationApi.getConfiguration: " + e.Message );
                   }
               }
           }
      @@ -10447,40 +10389,40 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
      -$api_instance = new OpenAPITools\Client\Api\HealthCheckApi();
      +$api_instance = new OpenAPITools\Client\Api\ManagementOfConfigurationApi();
       
       try {
      -    $result = $api_instance->getStatusV1();
      +    $result = $api_instance->getConfiguration();
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling HealthCheckApi->getStatusV1: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling ManagementOfConfigurationApi->getConfiguration: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
      -use WWW::OPenAPIClient::HealthCheckApi;
      +use WWW::OPenAPIClient::ManagementOfConfigurationApi;
       
       # Create an instance of the API class
      -my $api_instance = WWW::OPenAPIClient::HealthCheckApi->new();
      +my $api_instance = WWW::OPenAPIClient::ManagementOfConfigurationApi->new();
       
       eval {
      -    my $result = $api_instance->getStatusV1();
      +    my $result = $api_instance->getConfiguration();
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling HealthCheckApi->getStatusV1: $@\n";
      +    warn "Exception when calling ManagementOfConfigurationApi->getConfiguration: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -10488,23 +10430,23 @@ from openapi_client.rest import ApiException
       from pprint import pprint
       
       # Create an instance of the API class
      -api_instance = openapi_client.HealthCheckApi()
      +api_instance = openapi_client.ManagementOfConfigurationApi()
       
       try:
      -    # Returns status and statistics of this service
      -    api_response = api_instance.get_status_v1()
      +    # Returns the contents of the application configuration file
      +    api_response = api_instance.get_configuration()
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling HealthCheckApi->getStatusV1: %s\n" % e)
      + print("Exception when calling ManagementOfConfigurationApi->getConfiguration: %s\n" % e)
      -
      -
      extern crate HealthCheckApi;
      +                            
      +
      extern crate ManagementOfConfigurationApi;
       
       pub fn main() {
       
      -    let mut context = HealthCheckApi::Context::default();
      -    let result = client.getStatusV1(&context).wait();
      +    let mut context = ManagementOfConfigurationApi::Context::default();
      +    let result = client.getConfiguration(&context).wait();
       
           println!("{:?}", result);
       }
      @@ -10525,23 +10467,23 @@ pub fn main() {
       
       
                                 

      Responses

      -

      -

      +

      +

      -
      -
      -
      -
      -
      -

      ManagementOfConfiguration

      -
      -
      -
      -

      getConfiguration

      -

      Returns the contents of the application configuration file

      -
      -
      -
      -

      -

      -

      -
      -
      /a1-policy/v2/configuration
      -

      -

      Usage and SDK Samples

      -

      - - -
      -
      -
      curl -X GET \
      - -H "Accept: application/json" \
      - "http://localhost/a1-policy/v2/configuration"
      -
      +

      +

      + + + + + + +
      +
      +
      + +
      + +
      +
      +
      +
      +
      +
      +
      +
      +

      putConfiguration

      +

      Replace the current configuration file with the given configuration

      +
      +
      +
      +

      +

      +

      +
      +
      /a1-policy/v2/configuration
      +

      +

      Usage and SDK Samples

      +

      + + +
      +
      +
      curl -X PUT \
      + -H "Accept: */*" \
      + -H "Content-Type: application/json" \
      + "http://localhost/a1-policy/v2/configuration" \
      + -d ''
      +
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      @@ -10649,12 +10656,13 @@ public class ManagementOfConfigurationApiExample {
       
               // Create an instance of the API class
               ManagementOfConfigurationApi apiInstance = new ManagementOfConfigurationApi();
      +        Object body = Object; // Object | 
       
               try {
      -            Object result = apiInstance.getConfiguration();
      +            Object result = apiInstance.putConfiguration(body);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling ManagementOfConfigurationApi#getConfiguration");
      +            System.err.println("Exception when calling ManagementOfConfigurationApi#putConfiguration");
                   e.printStackTrace();
               }
           }
      @@ -10662,36 +10670,38 @@ public class ManagementOfConfigurationApiExample {
       
      -
      +
      import org.openapitools.client.api.ManagementOfConfigurationApi;
       
       public class ManagementOfConfigurationApiExample {
           public static void main(String[] args) {
               ManagementOfConfigurationApi apiInstance = new ManagementOfConfigurationApi();
      +        Object body = Object; // Object | 
       
               try {
      -            Object result = apiInstance.getConfiguration();
      +            Object result = apiInstance.putConfiguration(body);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling ManagementOfConfigurationApi#getConfiguration");
      +            System.err.println("Exception when calling ManagementOfConfigurationApi#putConfiguration");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
       ManagementOfConfigurationApi *apiInstance = [[ManagementOfConfigurationApi alloc] init];
      +Object *body = Object; // 
       
      -// Returns the contents of the application configuration file
      -[apiInstance getConfigurationWithCompletionHandler: 
      -              ^(Object output, NSError* error) {
      +// Replace the current configuration file with the given configuration
      +[apiInstance putConfigurationWith:body
      +              completionHandler: ^(Object output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -10702,11 +10712,13 @@ ManagementOfConfigurationApi *apiInstance = [[ManagementOfConfigurationApi alloc
       
      -
      +
      var A1PolicyManagementService = require('a1_policy_management_service');
       
       // Create an instance of the API class
       var api = new A1PolicyManagementService.ManagementOfConfigurationApi()
      +var body = Object; // {Object} 
      +
       var callback = function(error, data, response) {
         if (error) {
           console.error(error);
      @@ -10714,14 +10726,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.getConfiguration(callback);
      +api.putConfiguration(body, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -10730,20 +10742,21 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class getConfigurationExample
      +    public class putConfigurationExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
                   var apiInstance = new ManagementOfConfigurationApi();
      +            var body = Object;  // Object | 
       
                   try {
      -                // Returns the contents of the application configuration file
      -                Object result = apiInstance.getConfiguration();
      +                // Replace the current configuration file with the given configuration
      +                Object result = apiInstance.putConfiguration(body);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling ManagementOfConfigurationApi.getConfiguration: " + e.Message );
      +                Debug.Print("Exception when calling ManagementOfConfigurationApi.putConfiguration: " + e.Message );
                   }
               }
           }
      @@ -10751,40 +10764,42 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
       $api_instance = new OpenAPITools\Client\Api\ManagementOfConfigurationApi();
      +$body = Object; // Object | 
       
       try {
      -    $result = $api_instance->getConfiguration();
      +    $result = $api_instance->putConfiguration($body);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling ManagementOfConfigurationApi->getConfiguration: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling ManagementOfConfigurationApi->putConfiguration: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
       use WWW::OPenAPIClient::ManagementOfConfigurationApi;
       
       # Create an instance of the API class
       my $api_instance = WWW::OPenAPIClient::ManagementOfConfigurationApi->new();
      +my $body = WWW::OPenAPIClient::Object::Object->new(); # Object | 
       
       eval {
      -    my $result = $api_instance->getConfiguration();
      +    my $result = $api_instance->putConfiguration(body => $body);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling ManagementOfConfigurationApi->getConfiguration: $@\n";
      +    warn "Exception when calling ManagementOfConfigurationApi->putConfiguration: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -10793,22 +10808,24 @@ from pprint import pprint
       
       # Create an instance of the API class
       api_instance = openapi_client.ManagementOfConfigurationApi()
      +body = Object # Object | 
       
       try:
      -    # Returns the contents of the application configuration file
      -    api_response = api_instance.get_configuration()
      +    # Replace the current configuration file with the given configuration
      +    api_response = api_instance.put_configuration(body)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling ManagementOfConfigurationApi->getConfiguration: %s\n" % e)
      + print("Exception when calling ManagementOfConfigurationApi->putConfiguration: %s\n" % e)
      -
      +
      extern crate ManagementOfConfigurationApi;
       
       pub fn main() {
      +    let body = Object; // Object
       
           let mut context = ManagementOfConfigurationApi::Context::default();
      -    let result = client.getConfiguration(&context).wait();
      +    let result = client.putConfiguration(body, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -10825,27 +10842,73 @@ pub fn main() {
       
       
       
      +                            
      Body parameters
      + + + + + + + + + +
      NameDescription
      body * +

      + +
      +

      Responses

      -

      -

      +

      +

      -

      -
      -
      +
      +
      +

      NearRTRICRepository

      +
      +
      -

      putConfiguration

      -

      Replace the current configuration file with the given configuration

      +

      getRic

      +

      Returns info for one Near-RT RIC

      -

      +

      Either a Near-RT RIC identity or a Managed Element identity can be specified.<br>The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).


      -
      /a1-policy/v2/configuration
      +
      /a1-policy/v2/rics/ric

      Usage and SDK Samples

      -
      -
      curl -X PUT \
      - -H "Accept: */*" \
      - -H "Content-Type: application/json" \
      - "http://localhost/a1-policy/v2/configuration" \
      - -d ''
      +                          
      +
      curl -X GET \
      + -H "Accept: application/json" \
      + "http://localhost/a1-policy/v2/rics/ric?managed_element_id=managedElementId_example&ric_id=ricId_example"
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      -import org.openapitools.client.api.ManagementOfConfigurationApi;
      +import org.openapitools.client.api.NearRTRICRepositoryApi;
       
       import java.io.File;
       import java.util.*;
       
      -public class ManagementOfConfigurationApiExample {
      +public class NearRTRICRepositoryApiExample {
           public static void main(String[] args) {
       
               // Create an instance of the API class
      -        ManagementOfConfigurationApi apiInstance = new ManagementOfConfigurationApi();
      -        Object body = Object; // Object | 
      +        NearRTRICRepositoryApi apiInstance = new NearRTRICRepositoryApi();
      +        String managedElementId = managedElementId_example; // String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      +        String ricId = ricId_example; // String | The identity of a Near-RT RIC to get information for.
       
               try {
      -            Object result = apiInstance.putConfiguration(body);
      +            ric_info_v2 result = apiInstance.getRic(managedElementId, ricId);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling ManagementOfConfigurationApi#putConfiguration");
      +            System.err.println("Exception when calling NearRTRICRepositoryApi#getRic");
                   e.printStackTrace();
               }
           }
      @@ -11032,38 +11163,41 @@ public class ManagementOfConfigurationApiExample {
       
      -
      -
      import org.openapitools.client.api.ManagementOfConfigurationApi;
      +                          
      +
      import org.openapitools.client.api.NearRTRICRepositoryApi;
       
      -public class ManagementOfConfigurationApiExample {
      +public class NearRTRICRepositoryApiExample {
           public static void main(String[] args) {
      -        ManagementOfConfigurationApi apiInstance = new ManagementOfConfigurationApi();
      -        Object body = Object; // Object | 
      +        NearRTRICRepositoryApi apiInstance = new NearRTRICRepositoryApi();
      +        String managedElementId = managedElementId_example; // String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      +        String ricId = ricId_example; // String | The identity of a Near-RT RIC to get information for.
       
               try {
      -            Object result = apiInstance.putConfiguration(body);
      +            ric_info_v2 result = apiInstance.getRic(managedElementId, ricId);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling ManagementOfConfigurationApi#putConfiguration");
      +            System.err.println("Exception when calling NearRTRICRepositoryApi#getRic");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
      -ManagementOfConfigurationApi *apiInstance = [[ManagementOfConfigurationApi alloc] init];
      -Object *body = Object; // 
      +NearRTRICRepositoryApi *apiInstance = [[NearRTRICRepositoryApi alloc] init];
      +String *managedElementId = managedElementId_example; // The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. (optional) (default to null)
      +String *ricId = ricId_example; // The identity of a Near-RT RIC to get information for. (optional) (default to null)
       
      -// Replace the current configuration file with the given configuration
      -[apiInstance putConfigurationWith:body
      -              completionHandler: ^(Object output, NSError* error) {
      +// Returns info for one Near-RT RIC
      +[apiInstance getRicWith:managedElementId
      +    ricId:ricId
      +              completionHandler: ^(ric_info_v2 output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -11074,12 +11208,15 @@ Object *body = Object; //
       
      -
      +
      var A1PolicyManagementService = require('a1_policy_management_service');
       
       // Create an instance of the API class
      -var api = new A1PolicyManagementService.ManagementOfConfigurationApi()
      -var body = Object; // {Object} 
      +var api = new A1PolicyManagementService.NearRTRICRepositoryApi()
      +var opts = {
      +  'managedElementId': managedElementId_example, // {String} The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      +  'ricId': ricId_example // {String} The identity of a Near-RT RIC to get information for.
      +};
       
       var callback = function(error, data, response) {
         if (error) {
      @@ -11088,14 +11225,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.putConfiguration(body, callback);
      +api.getRic(opts, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -11104,21 +11241,22 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class putConfigurationExample
      +    public class getRicExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
      -            var apiInstance = new ManagementOfConfigurationApi();
      -            var body = Object;  // Object | 
      +            var apiInstance = new NearRTRICRepositoryApi();
      +            var managedElementId = managedElementId_example;  // String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. (optional)  (default to null)
      +            var ricId = ricId_example;  // String | The identity of a Near-RT RIC to get information for. (optional)  (default to null)
       
                   try {
      -                // Replace the current configuration file with the given configuration
      -                Object result = apiInstance.putConfiguration(body);
      +                // Returns info for one Near-RT RIC
      +                ric_info_v2 result = apiInstance.getRic(managedElementId, ricId);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling ManagementOfConfigurationApi.putConfiguration: " + e.Message );
      +                Debug.Print("Exception when calling NearRTRICRepositoryApi.getRic: " + e.Message );
                   }
               }
           }
      @@ -11126,42 +11264,44 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
      -$api_instance = new OpenAPITools\Client\Api\ManagementOfConfigurationApi();
      -$body = Object; // Object | 
      +$api_instance = new OpenAPITools\Client\Api\NearRTRICRepositoryApi();
      +$managedElementId = managedElementId_example; // String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      +$ricId = ricId_example; // String | The identity of a Near-RT RIC to get information for.
       
       try {
      -    $result = $api_instance->putConfiguration($body);
      +    $result = $api_instance->getRic($managedElementId, $ricId);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling ManagementOfConfigurationApi->putConfiguration: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling NearRTRICRepositoryApi->getRic: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
      -use WWW::OPenAPIClient::ManagementOfConfigurationApi;
      +use WWW::OPenAPIClient::NearRTRICRepositoryApi;
       
       # Create an instance of the API class
      -my $api_instance = WWW::OPenAPIClient::ManagementOfConfigurationApi->new();
      -my $body = WWW::OPenAPIClient::Object::Object->new(); # Object | 
      +my $api_instance = WWW::OPenAPIClient::NearRTRICRepositoryApi->new();
      +my $managedElementId = managedElementId_example; # String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      +my $ricId = ricId_example; # String | The identity of a Near-RT RIC to get information for.
       
       eval {
      -    my $result = $api_instance->putConfiguration(body => $body);
      +    my $result = $api_instance->getRic(managedElementId => $managedElementId, ricId => $ricId);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling ManagementOfConfigurationApi->putConfiguration: $@\n";
      +    warn "Exception when calling NearRTRICRepositoryApi->getRic: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -11169,25 +11309,27 @@ from openapi_client.rest import ApiException
       from pprint import pprint
       
       # Create an instance of the API class
      -api_instance = openapi_client.ManagementOfConfigurationApi()
      -body = Object # Object | 
      +api_instance = openapi_client.NearRTRICRepositoryApi()
      +managedElementId = managedElementId_example # String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. (optional) (default to null)
      +ricId = ricId_example # String | The identity of a Near-RT RIC to get information for. (optional) (default to null)
       
       try:
      -    # Replace the current configuration file with the given configuration
      -    api_response = api_instance.put_configuration(body)
      +    # Returns info for one Near-RT RIC
      +    api_response = api_instance.get_ric(managedElementId=managedElementId, ricId=ricId)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling ManagementOfConfigurationApi->putConfiguration: %s\n" % e)
      + print("Exception when calling NearRTRICRepositoryApi->getRic: %s\n" % e)
      -
      -
      extern crate ManagementOfConfigurationApi;
      +                            
      +
      extern crate NearRTRICRepositoryApi;
       
       pub fn main() {
      -    let body = Object; // Object
      +    let managedElementId = managedElementId_example; // String
      +    let ricId = ricId_example; // String
       
      -    let mut context = ManagementOfConfigurationApi::Context::default();
      -    let result = client.putConfiguration(body, &context).wait();
      +    let mut context = NearRTRICRepositoryApi::Context::default();
      +    let result = client.getRic(managedElementId, ricId, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -11204,139 +11346,74 @@ pub fn main() {
       
       
       
      -                            
      Body parameters
      + + +
      Query parameters
      - + -
      Name Description
      body *
      managed_element_id -

      - -
      +
      +
      +
      + + String + + +
      +The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. +
      +
      +
      +
      - - - -

      Responses

      -

      -

      - - - - +
      +
      +
      + + String + +
      +The identity of a Near-RT RIC to get information for. +
      +
      +
      +
      + + -
      -
      -
      - -
      - -
      -
      -

      -

      +

      Responses

      +

      +

      -

      -
      -
      -

      NearRTRICRepository

      -
      -
      +
      +
      -

      getRic

      -

      Returns info for one Near-RT RIC

      +

      getRics

      +

      Query Near-RT RIC information

      -

      Either a Near-RT RIC identity or a Managed Element identity can be specified.<br>The intention with Managed Element identity is the ID used in O1 for accessing the traffical element (such as the ID of CU).

      +

      The call returns all Near-RT RICs that supports a given policy type identity


      -
      /a1-policy/v2/rics/ric
      +
      /a1-policy/v2/rics

      Usage and SDK Samples

      -
      +
      curl -X GET \
        -H "Accept: application/json" \
      - "http://localhost/a1-policy/v2/rics/ric?managed_element_id=managedElementId_example&ric_id=ricId_example"
      + "http://localhost/a1-policy/v2/rics?policytype_id=policytypeId_example"
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      @@ -11510,14 +11584,13 @@ public class NearRTRICRepositoryApiExample {
       
               // Create an instance of the API class
               NearRTRICRepositoryApi apiInstance = new NearRTRICRepositoryApi();
      -        String managedElementId = managedElementId_example; // String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      -        String ricId = ricId_example; // String | The identity of a Near-RT RIC to get information for.
      +        String policytypeId = policytypeId_example; // String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
       
               try {
      -            ric_info_v2 result = apiInstance.getRic(managedElementId, ricId);
      +            ric_info_list_v2 result = apiInstance.getRics(policytypeId);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling NearRTRICRepositoryApi#getRic");
      +            System.err.println("Exception when calling NearRTRICRepositoryApi#getRics");
                   e.printStackTrace();
               }
           }
      @@ -11525,41 +11598,38 @@ public class NearRTRICRepositoryApiExample {
       
      -
      +
      import org.openapitools.client.api.NearRTRICRepositoryApi;
       
       public class NearRTRICRepositoryApiExample {
           public static void main(String[] args) {
               NearRTRICRepositoryApi apiInstance = new NearRTRICRepositoryApi();
      -        String managedElementId = managedElementId_example; // String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      -        String ricId = ricId_example; // String | The identity of a Near-RT RIC to get information for.
      +        String policytypeId = policytypeId_example; // String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
       
               try {
      -            ric_info_v2 result = apiInstance.getRic(managedElementId, ricId);
      +            ric_info_list_v2 result = apiInstance.getRics(policytypeId);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling NearRTRICRepositoryApi#getRic");
      +            System.err.println("Exception when calling NearRTRICRepositoryApi#getRics");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
       NearRTRICRepositoryApi *apiInstance = [[NearRTRICRepositoryApi alloc] init];
      -String *managedElementId = managedElementId_example; // The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. (optional) (default to null)
      -String *ricId = ricId_example; // The identity of a Near-RT RIC to get information for. (optional) (default to null)
      +String *policytypeId = policytypeId_example; // The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned (optional) (default to null)
       
      -// Returns info for one Near-RT RIC
      -[apiInstance getRicWith:managedElementId
      -    ricId:ricId
      -              completionHandler: ^(ric_info_v2 output, NSError* error) {
      +// Query Near-RT RIC information
      +[apiInstance getRicsWith:policytypeId
      +              completionHandler: ^(ric_info_list_v2 output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -11570,14 +11640,13 @@ String *ricId = ricId_example; // The identity of a Near-RT RIC to get informati
       
      -
      +
      var A1PolicyManagementService = require('a1_policy_management_service');
       
       // Create an instance of the API class
       var api = new A1PolicyManagementService.NearRTRICRepositoryApi()
       var opts = {
      -  'managedElementId': managedElementId_example, // {String} The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      -  'ricId': ricId_example // {String} The identity of a Near-RT RIC to get information for.
      +  'policytypeId': policytypeId_example // {String} The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
       };
       
       var callback = function(error, data, response) {
      @@ -11587,14 +11656,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.getRic(opts, callback);
      +api.getRics(opts, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -11603,22 +11672,21 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class getRicExample
      +    public class getRicsExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
                   var apiInstance = new NearRTRICRepositoryApi();
      -            var managedElementId = managedElementId_example;  // String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. (optional)  (default to null)
      -            var ricId = ricId_example;  // String | The identity of a Near-RT RIC to get information for. (optional)  (default to null)
      +            var policytypeId = policytypeId_example;  // String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned (optional)  (default to null)
       
                   try {
      -                // Returns info for one Near-RT RIC
      -                ric_info_v2 result = apiInstance.getRic(managedElementId, ricId);
      +                // Query Near-RT RIC information
      +                ric_info_list_v2 result = apiInstance.getRics(policytypeId);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling NearRTRICRepositoryApi.getRic: " + e.Message );
      +                Debug.Print("Exception when calling NearRTRICRepositoryApi.getRics: " + e.Message );
                   }
               }
           }
      @@ -11626,44 +11694,42 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
       $api_instance = new OpenAPITools\Client\Api\NearRTRICRepositoryApi();
      -$managedElementId = managedElementId_example; // String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      -$ricId = ricId_example; // String | The identity of a Near-RT RIC to get information for.
      +$policytypeId = policytypeId_example; // String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
       
       try {
      -    $result = $api_instance->getRic($managedElementId, $ricId);
      +    $result = $api_instance->getRics($policytypeId);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling NearRTRICRepositoryApi->getRic: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling NearRTRICRepositoryApi->getRics: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
       use WWW::OPenAPIClient::NearRTRICRepositoryApi;
       
       # Create an instance of the API class
       my $api_instance = WWW::OPenAPIClient::NearRTRICRepositoryApi->new();
      -my $managedElementId = managedElementId_example; # String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned.
      -my $ricId = ricId_example; # String | The identity of a Near-RT RIC to get information for.
      +my $policytypeId = policytypeId_example; # String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
       
       eval {
      -    my $result = $api_instance->getRic(managedElementId => $managedElementId, ricId => $ricId);
      +    my $result = $api_instance->getRics(policytypeId => $policytypeId);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling NearRTRICRepositoryApi->getRic: $@\n";
      +    warn "Exception when calling NearRTRICRepositoryApi->getRics: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -11672,26 +11738,24 @@ from pprint import pprint
       
       # Create an instance of the API class
       api_instance = openapi_client.NearRTRICRepositoryApi()
      -managedElementId = managedElementId_example # String | The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. (optional) (default to null)
      -ricId = ricId_example # String | The identity of a Near-RT RIC to get information for. (optional) (default to null)
      +policytypeId = policytypeId_example # String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned (optional) (default to null)
       
       try:
      -    # Returns info for one Near-RT RIC
      -    api_response = api_instance.get_ric(managedElementId=managedElementId, ricId=ricId)
      +    # Query Near-RT RIC information
      +    api_response = api_instance.get_rics(policytypeId=policytypeId)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling NearRTRICRepositoryApi->getRic: %s\n" % e)
      + print("Exception when calling NearRTRICRepositoryApi->getRics: %s\n" % e)
      -
      +
      extern crate NearRTRICRepositoryApi;
       
       pub fn main() {
      -    let managedElementId = managedElementId_example; // String
      -    let ricId = ricId_example; // String
      +    let policytypeId = policytypeId_example; // String
       
           let mut context = NearRTRICRepositoryApi::Context::default();
      -    let result = client.getRic(managedElementId, ricId, &context).wait();
      +    let result = client.getRics(policytypeId, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -11716,31 +11780,11 @@ pub fn main() {
                                       Name
                                       Description
                                     
      -                                managed_element_id
      -
      -
      -
      -    
      -
      -
      - - String - - -
      -The identity of a Managed Element. If given, the Near-RT RIC managing the ME is returned. -
      -
      -
      -
      - - - - ric_id + policytype_id -
      +
      @@ -11748,7 +11792,7 @@ The identity of a Managed Element. If given, the Near-RT RIC managing the ME is
      -The identity of a Near-RT RIC to get information for. +The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
      @@ -11759,23 +11803,23 @@ The identity of a Near-RT RIC to get information for.

      Responses

      -

      -

      +

      +

      -

      -
      -
      +
      +
      +

      ServiceCallbacks

      +
      +
      -

      getRics

      -

      Query Near-RT RIC information

      +

      serviceCallback

      +

      Callback for Near-RT RIC status

      -

      The call returns all Near-RT RICs that supports a given policy type identity

      +

      The URL to this call is registered at Service registration.


      -
      /a1-policy/v2/rics
      +
      /r-app/near-rt-ric-status

      Usage and SDK Samples

      -
      -
      curl -X GET \
      +                          
      +
      curl -X POST \
        -H "Accept: application/json" \
      - "http://localhost/a1-policy/v2/rics?policytype_id=policytypeId_example"
      + -H "Content-Type: application/json" \
      + "http://localhost/r-app/near-rt-ric-status" \
      + -d ''
       
      -
      +
      import org.openapitools.client.*;
       import org.openapitools.client.auth.*;
       import org.openapitools.client.model.*;
      -import org.openapitools.client.api.NearRTRICRepositoryApi;
      +import org.openapitools.client.api.ServiceCallbacksApi;
       
       import java.io.File;
       import java.util.*;
       
      -public class NearRTRICRepositoryApiExample {
      +public class ServiceCallbacksApiExample {
           public static void main(String[] args) {
       
               // Create an instance of the API class
      -        NearRTRICRepositoryApi apiInstance = new NearRTRICRepositoryApi();
      -        String policytypeId = policytypeId_example; // String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
      +        ServiceCallbacksApi apiInstance = new ServiceCallbacksApi();
      +        ServiceCallbackInfoV2 serviceCallbackInfoV2 = ; // ServiceCallbackInfoV2 | 
       
               try {
      -            ric_info_list_v2 result = apiInstance.getRics(policytypeId);
      +            Object result = apiInstance.serviceCallback(serviceCallbackInfoV2);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling NearRTRICRepositoryApi#getRics");
      +            System.err.println("Exception when calling ServiceCallbacksApi#serviceCallback");
                   e.printStackTrace();
               }
           }
      @@ -11960,38 +12009,38 @@ public class NearRTRICRepositoryApiExample {
       
      -
      -
      import org.openapitools.client.api.NearRTRICRepositoryApi;
      +                          
      +
      import org.openapitools.client.api.ServiceCallbacksApi;
       
      -public class NearRTRICRepositoryApiExample {
      +public class ServiceCallbacksApiExample {
           public static void main(String[] args) {
      -        NearRTRICRepositoryApi apiInstance = new NearRTRICRepositoryApi();
      -        String policytypeId = policytypeId_example; // String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
      +        ServiceCallbacksApi apiInstance = new ServiceCallbacksApi();
      +        ServiceCallbackInfoV2 serviceCallbackInfoV2 = ; // ServiceCallbackInfoV2 | 
       
               try {
      -            ric_info_list_v2 result = apiInstance.getRics(policytypeId);
      +            Object result = apiInstance.serviceCallback(serviceCallbackInfoV2);
                   System.out.println(result);
               } catch (ApiException e) {
      -            System.err.println("Exception when calling NearRTRICRepositoryApi#getRics");
      +            System.err.println("Exception when calling ServiceCallbacksApi#serviceCallback");
                   e.printStackTrace();
               }
           }
       }
      -
      +
      
       
       // Create an instance of the API class
      -NearRTRICRepositoryApi *apiInstance = [[NearRTRICRepositoryApi alloc] init];
      -String *policytypeId = policytypeId_example; // The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned (optional) (default to null)
      +ServiceCallbacksApi *apiInstance = [[ServiceCallbacksApi alloc] init];
      +ServiceCallbackInfoV2 *serviceCallbackInfoV2 = ; // 
       
      -// Query Near-RT RIC information
      -[apiInstance getRicsWith:policytypeId
      -              completionHandler: ^(ric_info_list_v2 output, NSError* error) {
      +// Callback for Near-RT RIC status
      +[apiInstance serviceCallbackWith:serviceCallbackInfoV2
      +              completionHandler: ^(Object output, NSError* error) {
           if (output) {
               NSLog(@"%@", output);
           }
      @@ -12002,14 +12051,12 @@ String *policytypeId = policytypeId_example; // The identity of a policy type. I
       
      -
      +
      var A1PolicyManagementService = require('a1_policy_management_service');
       
       // Create an instance of the API class
      -var api = new A1PolicyManagementService.NearRTRICRepositoryApi()
      -var opts = {
      -  'policytypeId': policytypeId_example // {String} The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
      -};
      +var api = new A1PolicyManagementService.ServiceCallbacksApi()
      +var serviceCallbackInfoV2 = ; // {ServiceCallbackInfoV2} 
       
       var callback = function(error, data, response) {
         if (error) {
      @@ -12018,14 +12065,14 @@ var callback = function(error, data, response) {
           console.log('API called successfully. Returned data: ' + data);
         }
       };
      -api.getRics(opts, callback);
      +api.serviceCallback(serviceCallbackInfoV2, callback);
       
      - -
      +
      using System;
       using System.Diagnostics;
       using Org.OpenAPITools.Api;
      @@ -12034,21 +12081,21 @@ using Org.OpenAPITools.Model;
       
       namespace Example
       {
      -    public class getRicsExample
      +    public class serviceCallbackExample
           {
               public void main()
               {
       
                   // Create an instance of the API class
      -            var apiInstance = new NearRTRICRepositoryApi();
      -            var policytypeId = policytypeId_example;  // String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned (optional)  (default to null)
      +            var apiInstance = new ServiceCallbacksApi();
      +            var serviceCallbackInfoV2 = new ServiceCallbackInfoV2(); // ServiceCallbackInfoV2 | 
       
                   try {
      -                // Query Near-RT RIC information
      -                ric_info_list_v2 result = apiInstance.getRics(policytypeId);
      +                // Callback for Near-RT RIC status
      +                Object result = apiInstance.serviceCallback(serviceCallbackInfoV2);
                       Debug.WriteLine(result);
                   } catch (Exception e) {
      -                Debug.Print("Exception when calling NearRTRICRepositoryApi.getRics: " + e.Message );
      +                Debug.Print("Exception when calling ServiceCallbacksApi.serviceCallback: " + e.Message );
                   }
               }
           }
      @@ -12056,42 +12103,42 @@ namespace Example
       
      -
      +
      <?php
       require_once(__DIR__ . '/vendor/autoload.php');
       
       // Create an instance of the API class
      -$api_instance = new OpenAPITools\Client\Api\NearRTRICRepositoryApi();
      -$policytypeId = policytypeId_example; // String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
      +$api_instance = new OpenAPITools\Client\Api\ServiceCallbacksApi();
      +$serviceCallbackInfoV2 = ; // ServiceCallbackInfoV2 | 
       
       try {
      -    $result = $api_instance->getRics($policytypeId);
      +    $result = $api_instance->serviceCallback($serviceCallbackInfoV2);
           print_r($result);
       } catch (Exception $e) {
      -    echo 'Exception when calling NearRTRICRepositoryApi->getRics: ', $e->getMessage(), PHP_EOL;
      +    echo 'Exception when calling ServiceCallbacksApi->serviceCallback: ', $e->getMessage(), PHP_EOL;
       }
       ?>
      -
      +
      use Data::Dumper;
       use WWW::OPenAPIClient::Configuration;
      -use WWW::OPenAPIClient::NearRTRICRepositoryApi;
      +use WWW::OPenAPIClient::ServiceCallbacksApi;
       
       # Create an instance of the API class
      -my $api_instance = WWW::OPenAPIClient::NearRTRICRepositoryApi->new();
      -my $policytypeId = policytypeId_example; # String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned
      +my $api_instance = WWW::OPenAPIClient::ServiceCallbacksApi->new();
      +my $serviceCallbackInfoV2 = WWW::OPenAPIClient::Object::ServiceCallbackInfoV2->new(); # ServiceCallbackInfoV2 | 
       
       eval {
      -    my $result = $api_instance->getRics(policytypeId => $policytypeId);
      +    my $result = $api_instance->serviceCallback(serviceCallbackInfoV2 => $serviceCallbackInfoV2);
           print Dumper($result);
       };
       if ($@) {
      -    warn "Exception when calling NearRTRICRepositoryApi->getRics: $@\n";
      +    warn "Exception when calling ServiceCallbacksApi->serviceCallback: $@\n";
       }
      -
      +
      from __future__ import print_statement
       import time
       import openapi_client
      @@ -12099,25 +12146,25 @@ from openapi_client.rest import ApiException
       from pprint import pprint
       
       # Create an instance of the API class
      -api_instance = openapi_client.NearRTRICRepositoryApi()
      -policytypeId = policytypeId_example # String | The identity of a policy type. If given, all Near-RT RICs supporting the policy type are returned (optional) (default to null)
      +api_instance = openapi_client.ServiceCallbacksApi()
      +serviceCallbackInfoV2 =  # ServiceCallbackInfoV2 | 
       
       try:
      -    # Query Near-RT RIC information
      -    api_response = api_instance.get_rics(policytypeId=policytypeId)
      +    # Callback for Near-RT RIC status
      +    api_response = api_instance.service_callback(serviceCallbackInfoV2)
           pprint(api_response)
       except ApiException as e:
      -    print("Exception when calling NearRTRICRepositoryApi->getRics: %s\n" % e)
      + print("Exception when calling ServiceCallbacksApi->serviceCallback: %s\n" % e)
      -
      -
      extern crate NearRTRICRepositoryApi;
      +                            
      +
      extern crate ServiceCallbacksApi;
       
       pub fn main() {
      -    let policytypeId = policytypeId_example; // String
      +    let serviceCallbackInfoV2 = ; // ServiceCallbackInfoV2
       
      -    let mut context = NearRTRICRepositoryApi::Context::default();
      -    let result = client.getRics(policytypeId, &context).wait();
      +    let mut context = ServiceCallbacksApi::Context::default();
      +    let result = client.serviceCallback(serviceCallbackInfoV2, &context).wait();
       
           println!("{:?}", result);
       }
      @@ -12134,120 +12181,73 @@ pub fn main() {
       
       
       
      -
      -
      -                            
      Query parameters
      +
      Body parameters
      - +
      Name Description
      policytype_id
      serviceCallbackInfoV2 * +

      + +
      -

      Responses

      -

      -

      - - - - - - -
      -
      -
      - -
      - -
      -
      -

      -

      +

      Responses

      +

      +

      -
      diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/SwaggerConfig.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/SwaggerConfig.java index b6d3a076..9f4f4420 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/SwaggerConfig.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/SwaggerConfig.java @@ -24,6 +24,7 @@ import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.annotations.info.Info; import io.swagger.v3.oas.annotations.info.License; +import org.onap.ccsdk.oran.a1policymanagementservice.controllers.authorization.AuthorizationConsts; import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.ConfigurationController; import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.Consts; import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.PolicyController; @@ -63,7 +64,7 @@ public class SwaggerConfig { "
    • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.
    • " + // "
    " + // - "

    APIs provided by the service

    " + // + "

    APIs provided or defined by the service

    " + // H3 + PolicyController.API_NAME + H3_END + // "

    This is an API for management of A1 Policies.

    " + // "
      " + // @@ -75,23 +76,36 @@ public class SwaggerConfig { H3 + ConfigurationController.API_NAME + H3_END + // "

      API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.

      " + // + H3 + Consts.V2_API_SERVICE_CALLBACKS_NAME + H3_END + // "

      These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.

      " + // + H3 + RicRepositoryController.API_NAME + H3_END + // "

      This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.

      " - + H3 + StatusController.API_NAME + H3_END + // - "

      API used for supervision of the PMS component.

      " + // + + // + + H3 + StatusController.API_NAME + H3_END + // + "

      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 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." + "

      " + // + + H3 + AuthorizationConsts.API_NAME + H3_END + // + "

      " // + + "API used for access control of A1 Policy access." + + " If configured, an external authorization provider is requested to grant access to the A1 Policy type." + + "

      " + // + H3 + "Spring Boot Actuator" + H3_END + // "

      " // + "Provides generic functions used to monitor and manage the Spring web application." + // "

      "; - public static final String VERSION = "1.1.0"; + public static final String VERSION = "1.2.0"; } diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/authorization/AuthorizationConsts.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/authorization/AuthorizationConsts.java index a905b9d1..cc2d2341 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/authorization/AuthorizationConsts.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/authorization/AuthorizationConsts.java @@ -22,8 +22,8 @@ package org.onap.ccsdk.oran.a1policymanagementservice.controllers.authorization; public class AuthorizationConsts { - public static final String AUTH_API_NAME = "Authorization API"; - public static final String AUTH_API_DESCRIPTION = + public static final String API_NAME = "Authorization API"; + public static final String API_DESCRIPTION = """ API used for authorization of information A1 policy access (this is provided by an authorization producer such as OPA). Note that this API is called by PMS, it is not provided. diff --git a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java index 7f954e90..c554dbd5 100644 --- a/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java +++ b/a1-policy-management/src/main/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/v2/Consts.java @@ -32,7 +32,7 @@ public class Consts { public static final String V2_API_ROOT = "/a1-policy/v2"; - public static final String V2_API_SERVICE_CALLBACKS_NAME = "Callbacks"; + public static final String V2_API_SERVICE_CALLBACKS_NAME = "Service callbacks"; public static final String V2_API_SERVICE_CALLBACKS_DESCRIPTION = ""; private Consts() {} diff --git a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/OpenPolicyAgentSimulatorController.java b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/OpenPolicyAgentSimulatorController.java index 236c31b8..3e63b468 100644 --- a/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/OpenPolicyAgentSimulatorController.java +++ b/a1-policy-management/src/test/java/org/onap/ccsdk/oran/a1policymanagementservice/controllers/OpenPolicyAgentSimulatorController.java @@ -52,7 +52,7 @@ import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RestController; @RestController("OpenPolicyAgentSimulatorController") -@Tag(name = AuthorizationConsts.AUTH_API_NAME, description = AuthorizationConsts.AUTH_API_DESCRIPTION) +@Tag(name = AuthorizationConsts.API_NAME, description = AuthorizationConsts.API_DESCRIPTION) public class OpenPolicyAgentSimulatorController { private static Gson gson = new GsonBuilder().disableHtmlEscaping().create(); diff --git a/docs/architecture/architecture.rst b/docs/architecture/architecture.rst index a9facd53..edb9d346 100755 --- a/docs/architecture/architecture.rst +++ b/docs/architecture/architecture.rst @@ -11,9 +11,9 @@ Introduction ************ -The CCSDK ORAN components add support for handling "A1 Policies" as defined for the O-RAN A1 interface. +The CCSDK ORAN components add support for handling "A1 Policies" as defined for the O-RAN A1-P interface. -The O-RAN A1 interface is defined by the `O-RAN Alliance `_ +The O-RAN A1-P interface is defined by the `O-RAN Alliance `_ ******************* @@ -21,11 +21,21 @@ Architecture Review ******************* This picture provides a overview of ONAP's A1 Controller architecture, -integration with other ONAP components and API resource/operation provided. +integration with other components and API resource/operation provided. .. image:: ../media/ONAP-A1ControllerArchitecture.png :width: 500pt +The A1 Policy Management Service provides an API for accessing of A1 Policies. The PMS +configures these in the traffical elements (NearRT-RICS). It also keeps a backup of these in case of restart of PMS. +On regular basis, it will check that the configured A1 Policices are consistent with the actual ones in the NearRT-RICS (and take action if not). + +The access to the NearRT-RIC may be tunneled through an A1 adapter in the CCSDK/SDNC controller. + +The A1 PMS provides support for fine granied access control, which is implemented by delegating the granting of access of A1 Policies to an external +authorization provider. + +More details can be found in :ref:`developer_guide`. *************** Developer Guide diff --git a/docs/conf.py b/docs/conf.py index 6901c026..f53b9f4d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -69,5 +69,7 @@ def setup(app): app.add_css_file("css/ribbon.css") linkcheck_ignore = [ - r'http://localhost:\d+/' + r'http://localhost:\d+/', + './a1-adapter-api.html', #Generated file that doesn't exist at link check. + './pms-api.html' #Generated file that doesn't exist at link check. ] diff --git a/docs/guide/developer-guide.rst b/docs/guide/developer-guide.rst index d3b1646f..ea726334 100644 --- a/docs/guide/developer-guide.rst +++ b/docs/guide/developer-guide.rst @@ -34,7 +34,7 @@ A1 Policy Management Service provides a REST API for management of policies. It The Policy Management Service can be accessed over the REST API. See :ref:`pms_api` for more information about the API. -The configured A1 policies are stored persistently to survive a service restart. +The configured A1 policies are stored persistently to survive a service restart. This information can be stored in a persistent volume or in an S3 Object Store bucket. Dependencies ------------ @@ -47,7 +47,7 @@ dependency management tool (see *pom.xml* file at root level) : - `Springfox `_ Automated JSON API documentation for APIs built with Spring - `Lombok `_ to generate code, such as getters and setters - `Awaitility `_ to test asynchronous functionality -- `S3 `_ Access of Amazon S3 - Cloud Object Storage + To get a complete list of all dependencies, use command "mvn dependency:tree". diff --git a/docs/media/ONAP-A1ControllerArchitecture.png b/docs/media/ONAP-A1ControllerArchitecture.png index 0d549f51..3440cfc0 100644 Binary files a/docs/media/ONAP-A1ControllerArchitecture.png and b/docs/media/ONAP-A1ControllerArchitecture.png differ diff --git a/docs/media/ONAP-A1ControllerArchitecture.pptx b/docs/media/ONAP-A1ControllerArchitecture.pptx new file mode 100644 index 00000000..2178bd17 Binary files /dev/null and b/docs/media/ONAP-A1ControllerArchitecture.pptx differ diff --git a/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html b/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html index c8f97a81..8b29a313 100644 --- a/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html +++ b/docs/offeredapis/openapitoolgen/offeredapis/pms-api/index.html @@ -846,6 +846,17 @@ ul.nav-tabs { +
      + + + + + + + +

      Responses

      +

      +

      + + + + + + +
      +
      +
      + +
      + +
      +
      + + +
      +

      Callbacks

      diff --git a/docs/offeredapis/swagger/pms-api.json b/docs/offeredapis/swagger/pms-api.json index 9efa7b75..33fa5e18 100644 --- a/docs/offeredapis/swagger/pms-api.json +++ b/docs/offeredapis/swagger/pms-api.json @@ -936,7 +936,7 @@ "description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/void"}}} }}, - "tags": ["Callbacks"] + "tags": ["Service callbacks"] }}, "/a1-policy/v2/services/{service_id}": {"delete": { "summary": "Unregister a service", @@ -999,9 +999,9 @@ "name": "Copyright (C) 2020-2023 Nordix Foundation. Licensed under the Apache License.", "url": "http://www.apache.org/licenses/LICENSE-2.0" }, - "description": "

      General<\/h2>

      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>

      • A1 Policy creation, modification and deletion.<\/li>
      • Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs<\/li>
      • Maintaining a view of supported Near-RT RIC policy types<\/li>
      • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.<\/li><\/ul>

        APIs provided by the service<\/h2>

        A1 Policy Management<\/h3>

        This is an API for management of A1 Policies.<\/p>

        • A1 Policy retrieval, creation, modification and deletion.<\/li>
        • Retrieval of supported A1 Policy types for a Near-RT RIC<\/li>
        • Retrieval of status for existing A1 policies<\/li><\/ul>

          Management of configuration<\/h3>

          API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p>

          Callbacks<\/h3>

          These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p>

          NearRT-RIC Repository<\/h3>

          This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p>

          Health Check<\/h3>

          API used for supervision of the PMS component.<\/p>

          Service Registry and Supervision<\/h3>

          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>

          Spring Boot Actuator<\/h3>

          Provides generic functions used to monitor and manage the Spring web application.<\/p>", + "description": "

          General<\/h2>

          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>

          • A1 Policy creation, modification and deletion.<\/li>
          • Monitoring and maintaining consistency of the SMO view of A1 policies and the Near-RT RICs<\/li>
          • Maintaining a view of supported Near-RT RIC policy types<\/li>
          • Supervision of using services (R-APPs). When a service is unavailable, its policies are removed.<\/li><\/ul>

            APIs provided or defined by the service<\/h2>

            A1 Policy Management<\/h3>

            This is an API for management of A1 Policies.<\/p>

            • A1 Policy retrieval, creation, modification and deletion.<\/li>
            • Retrieval of supported A1 Policy types for a Near-RT RIC<\/li>
            • Retrieval of status for existing A1 policies<\/li><\/ul>

              Management of configuration<\/h3>

              API for updating and retrieval of the component configuration. Note that there other ways to maintain the configuration.<\/p>

              Service callbacks<\/h3>

              These are endpoints that are invoked by this service. The callbacks are registered in this service at service registration.<\/p>

              NearRT-RIC Repository<\/h3>

              This is an API that provides support for looking up a NearRT-RIC. Each A1 policy is targeted for one Near-RT RIC.<\/p>

              Health Check<\/h3>

              API used for supervision of the PMS component.<\/p>

              Service Registry and Supervision<\/h3>

              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>

              Authorization API<\/h3>

              API used for access control of A1 Policy access. If configured, an external authorization provider is requested to grant access to the A1 Policy type.<\/p>

              Spring Boot Actuator<\/h3>

              Provides generic functions used to monitor and manage the Spring web application.<\/p>", "title": "A1 Policy Management Service", - "version": "1.1.0" + "version": "1.2.0" }, "tags": [ { diff --git a/docs/offeredapis/swagger/pms-api.yaml b/docs/offeredapis/swagger/pms-api.yaml index 0cd28d07..a905c40e 100644 --- a/docs/offeredapis/swagger/pms-api.yaml +++ b/docs/offeredapis/swagger/pms-api.yaml @@ -31,6 +31,10 @@ info: servers: - url: / tags: +- description: "API used for authorization of information A1 policy access (this is\ + \ provided by an authorization producer such as OPA).\nNote that this API is called\ + \ by PMS, it is not provided.\n" + name: Authorization API - description: Monitor and interact externalDocs: description: Spring Boot Actuator Web API Documentation @@ -93,6 +97,26 @@ paths: summary: Query for A1 policy instances tags: - A1 Policy Management + /example-authz-check: + post: + description: The authorization function decides if access is granted. + operationId: performAccessControl + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/policy_authorization' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/authorization_result' + description: OK + summary: Request for access authorization. + tags: + - Authorization API /actuator/threaddump: get: operationId: threaddump @@ -957,6 +981,17 @@ components: description: status text type: string type: object + authorization_result: + description: Result of authorization + example: + result: true + properties: + result: + description: "If true, the access is granted" + type: boolean + required: + - result + type: object ric_info_v2: description: Information for a Near-RT RIC example: @@ -1113,6 +1148,35 @@ components: http://json-schema.org/draft-07/schema type: object type: object + input: + description: input + properties: + access_type: + description: Access type + enum: + - READ + - WRITE + - DELETE + type: string + auth_token: + description: Authorization token + type: string + policy_type_id: + description: Policy type identifier + type: string + required: + - access_type + - auth_token + - policy_type_id + type: object + policy_authorization: + description: Authorization request for A1 policy requests + properties: + input: + $ref: '#/components/schemas/input' + required: + - input + type: object policytype_id_list_v2: description: Information about policy types example: diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 2c805dc5..3ba864af 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -7,3 +7,4 @@ sphinxcontrib-spelling sphinxcontrib-plantuml sphinxcontrib-redoc sphinx-tabs + diff --git a/docs/tox.ini b/docs/tox.ini index 0b0d4e61..00ec327c 100644 --- a/docs/tox.ini +++ b/docs/tox.ini @@ -1,6 +1,8 @@ [tox] minversion = 1.6 -envlist = docs, +envlist = + docs, + docs-linkcheck, skipsdist = true [testenv:docs] @@ -12,17 +14,17 @@ deps = commands = sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html echo "Generated docs available in {toxinidir}/_build/html" -whitelist_externals = +allowlist_externals = echo git sh [testenv:docs-linkcheck] basepython = python3.8 -#deps = -r{toxinidir}/requirements-docs.txt -commands = echo "Link Checking not enforced" -#commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./ {toxinidir}/_build/linkcheck -whitelist_externals = echo +deps = -r{toxinidir}/requirements-docs.txt +#commands = echo "Link Checking not enforced" +commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./ {toxinidir}/_build/linkcheck +allowlist_externals = echo [testenv:docs-spellcheck] basepython = python3.8 -- cgit 1.2.3-korg