From 63691d3d9377a0cf86923be38202ccbf87872bcd Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Thu, 10 Oct 2019 09:33:12 -0400 Subject: [PATCH] Add a1, appmgr submodules to provide API specs Revise POM files to use the new path for the spec files. Removed cached copies of the A1 mediator and Application Manager API specification YAML files. No functional change - submodules are pinned at commits with the same spec file content as before. Change-Id: I8b72306c83953c90bd03df4903bef0e4937aa9d6 Signed-off-by: Lott, Christopher (cl778h) --- .gitmodules | 6 + a1-med-client/README.md | 3 +- a1-med-client/pom.xml | 5 +- a1-med-client/ric-plt-a1 | 1 + .../src/main/resources/a1_mediator_0.10.3.yaml | 118 ---- anr-xapp-client/pom.xml | 2 +- app-mgr-client/README.md | 5 +- app-mgr-client/pom.xml | 5 +- app-mgr-client/ric-plt-appmgr | 1 + .../main/resources/api_appmgr_rest_api_0.1.7.yaml | 596 --------------------- docs/release-notes.rst | 7 + e2-mgr-client/pom.xml | 2 +- pom.xml | 2 +- webapp-backend/pom.xml | 2 +- webapp-frontend/pom.xml | 2 +- 15 files changed, 31 insertions(+), 726 deletions(-) create mode 100644 .gitmodules create mode 160000 a1-med-client/ric-plt-a1 delete mode 100644 a1-med-client/src/main/resources/a1_mediator_0.10.3.yaml create mode 160000 app-mgr-client/ric-plt-appmgr delete mode 100644 app-mgr-client/src/main/resources/api_appmgr_rest_api_0.1.7.yaml diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..a00e0b6b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "a1-med-client/ric-plt-a1"] + path = a1-med-client/ric-plt-a1 + url = ../../ric-plt/a1 +[submodule "app-mgr-client/ric-plt-appmgr"] + path = app-mgr-client/ric-plt-appmgr + url = ../../ric-plt/appmgr diff --git a/a1-med-client/README.md b/a1-med-client/README.md index d5780ffb..7d538659 100644 --- a/a1-med-client/README.md +++ b/a1-med-client/README.md @@ -1,7 +1,8 @@ # A1 Mediator Client Generator This projects generates a REST client library from the OpenAPI specification -file stored here and packages it in a jar. +file obtained from the ric-plt/a1 project, available here as a git submodule +with a pinned version, and packages it in a jar. ## Eclipse and STS Users diff --git a/a1-med-client/pom.xml b/a1-med-client/pom.xml index 8cfc29d0..1bb59b5b 100644 --- a/a1-med-client/pom.xml +++ b/a1-med-client/pom.xml @@ -25,12 +25,13 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT org.o-ran-sc.ric.plt.a1med.client a1-med-client RIC A1 Mediator client + 0.10.3-SNAPSHOT UTF-8 @@ -102,7 +103,7 @@ limitations under the License. generate - ${project.basedir}/src/main/resources/a1_mediator_0.10.3.yaml + ${project.basedir}/ric-plt-a1/a1/openapi.yaml java ${client.base.package.name} ${client.base.package.name}.model diff --git a/a1-med-client/ric-plt-a1 b/a1-med-client/ric-plt-a1 new file mode 160000 index 00000000..d1cc75a2 --- /dev/null +++ b/a1-med-client/ric-plt-a1 @@ -0,0 +1 @@ +Subproject commit d1cc75a2ca8d41cecb8bd67f9bc934c53035b43b diff --git a/a1-med-client/src/main/resources/a1_mediator_0.10.3.yaml b/a1-med-client/src/main/resources/a1_mediator_0.10.3.yaml deleted file mode 100644 index a49cf799..00000000 --- a/a1-med-client/src/main/resources/a1_mediator_0.10.3.yaml +++ /dev/null @@ -1,118 +0,0 @@ -# ================================================================================== -# Copyright (c) 2019 Nokia -# Copyright (c) 2018-2019 AT&T Intellectual Property. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================== -openapi: 3.0.0 -info: - version: 0.10.3 - title: RIC A1 -paths: - '/a1-p/healthcheck': - get: - description: > - perform a healthcheck on a1 - tags: - - A1 Mediator - operationId: a1.controller.healthcheck_handler - responses: - 200: - description: > - a1 is healthy. Anything other than a 200 should be considered a1 as failing - - '/a1-p/policies/{policyname}': - parameters: - - name: policyname - in: path - description: the name of the policy to retrieve or replace - required: true - schema: - type: string - put: - description: > - Replace the current operation of policyname with the new parameters (replaces the current policy with the new one specified here). - - Until there are standard policy definitions that are defined OUTSIDE of the scope of xapps, this API will be *very underspecified*. - This is a known gap, do not despair. - The PUT body is specified, *currently* in the xapp manifest that implements this policy; the caller should refer to the message_receives_payload_schema field to make this request. - The return content is also specified as above (in the xapp manifest) in the message_sends_payload_schema field. - - Eventually, we need concrete policy defintions that are decoupled from xapp, and then this API description will become more fully specified. - tags: - - A1 Mediator - operationId: a1.controller.put_handler - requestBody: - content: - application/json: - schema: - type: object - - - responses: - '200': - description: > - The downstream component responsible for implementing this policy replied with a good response. Check the manifest for response details. - '400': - description: > - Bad PUT body for this policyname - '404': - description: > - there is no policy with this name - '502': - description: > - The xapp that implements this policy replied, but the reply was a "failure", OR there was no status indicating success or failure. - This returns an object containing the reason, and the return payload. - content: - application/json: - schema: - type: object - properties: - reason: - type: string - enum: [ - "NO STATUS", - "BAD STATUS", - "NOT JSON" - ] - return_payload: - type: object - - '504': - description: > - the downstream component responsible for handling this policy did not respond (in time) - - get: - description: Get the current state/value of policyname - tags: - - A1 Mediator - operationId: a1.controller.get_handler - responses: - '200': - description: > - The downstream component responsible for implementing this policy replied with a good response. Check the manifest for response details. - content: - application/json: - schema: - type: object - '400': - description: > - The downstream component for implementing this policy does not support policy fetching. - '404': - description: > - there is no policy with this name - '504': - description: > - the downstream component responsible for handling this policy did not respond (in time) - - diff --git a/anr-xapp-client/pom.xml b/anr-xapp-client/pom.xml index d7dcaff5..adf70fd8 100644 --- a/anr-xapp-client/pom.xml +++ b/anr-xapp-client/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT org.o-ran-sc.ric.xapp.anr.client diff --git a/app-mgr-client/README.md b/app-mgr-client/README.md index 35d89417..e18d372d 100644 --- a/app-mgr-client/README.md +++ b/app-mgr-client/README.md @@ -1,7 +1,8 @@ # App Manager Client Generator -This projects generates a REST client library from the Swagger specification -file stored in src/main/resources and packages it in a jar. +This projects generates a REST client library from the OpenAPI specification +file obtained from the ric-plt/appmgr project, available here as a git submodule +with a pinned version, and packages it in a jar. ## Eclipse and STS Users diff --git a/app-mgr-client/pom.xml b/app-mgr-client/pom.xml index b6ea408e..16f4c810 100644 --- a/app-mgr-client/pom.xml +++ b/app-mgr-client/pom.xml @@ -25,12 +25,13 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT org.o-ran-sc.ric.plt.appmgr.client app-mgr-client RIC App Manager client + 0.1.7-SNAPSHOT UTF-8 @@ -102,7 +103,7 @@ limitations under the License. generate - ${project.basedir}/src/main/resources/api_appmgr_rest_api_0.1.7.yaml + ${project.basedir}/ric-plt-appmgr/api/appmgr_rest_api.yaml java ${project.groupId} diff --git a/app-mgr-client/ric-plt-appmgr b/app-mgr-client/ric-plt-appmgr new file mode 160000 index 00000000..45df1f32 --- /dev/null +++ b/app-mgr-client/ric-plt-appmgr @@ -0,0 +1 @@ +Subproject commit 45df1f32f8b82c380c5cd25fd6753a6581180d45 diff --git a/app-mgr-client/src/main/resources/api_appmgr_rest_api_0.1.7.yaml b/app-mgr-client/src/main/resources/api_appmgr_rest_api_0.1.7.yaml deleted file mode 100644 index 45569f1d..00000000 --- a/app-mgr-client/src/main/resources/api_appmgr_rest_api_0.1.7.yaml +++ /dev/null @@ -1,596 +0,0 @@ -# ========================LICENSE_START================================= -# O-RAN-SC -# -# Copyright (C) 2019 AT&T Intellectual Property and Nokia -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ========================LICENSE_END=================================== -swagger: '2.0' -info: - description: This is a draft API for RIC appmgr - version: 0.1.7 - title: RIC appmgr - license: - name: Apache 2.0 - url: 'http://www.apache.org/licenses/LICENSE-2.0.html' -host: hostname -basePath: /ric/v1 -schemes: - - http -paths: - /health/alive : - get : - summary : Health check of xApp Manager - Liveness probe - tags : - - health - operationId : getHealthAlive - responses : - '200' : - description : Status of xApp Manager is ok - /health/ready : - get : - summary : Readiness check of xApp Manager - Readiness probe - tags : - - health - operationId : getHealthReady - responses : - '200': - description : xApp Manager is ready for service - '503': - description: xApp Manager is not ready for service - /xapps: - post: - summary: Deploy a xapp - tags: - - xapp - operationId: deployXapp - consumes: - - application/json - produces: - - application/json - parameters: - - name: xAppInfo - in: body - description: xApp information - schema: - type: object - required: - - name - properties: - name: - type: string - description: Name of the xApp. - example: xapp-dummy - configName: - type: string - description: Name of the xApp configmap. Overrides the value given in Helm chart value file. - example: xapp-dummy-configmap - namespace: - type: string - description: Name of the namespace to which xApp is deployed. Overrides the value given in Helm chart value file. - example: ricxapps - serviceName: - type: string - description: Name of the service xApp is providing. Overrides the value given in Helm chart value file. - example: xapp-dummy-service - imageRepo: - type: string - description: Name of the docker repository xApp is located. Overrides the value given in Helm chart value file. - example: xapprepo - hostname: - type: string - description: Hostname for the pod. Used by messaging library. Overrides the value given in Helm chart value file. - example: xapp-dummy - responses: - '201': - description: xApp successfully created - schema: - $ref: '#/definitions/Xapp' - '400': - description: Invalid input - '500': - description: Internal error - get: - summary: Returns the status of all xapps - tags: - - xapp - operationId: getAllXapps - produces: - - application/json - responses: - '200': - description: successful query of xApps - schema: - $ref: '#/definitions/AllDeployedXapps' - '500': - description: Internal error - '/xapps/search': - get: - summary: Returns the list of all deployable xapps - tags: - - xapp - operationId: listAllDeployableXapps - produces: - - application/json - responses: - '200': - description: successful list of deployable xApps - schema: - $ref: '#/definitions/AllDeployableXapps' - '500': - description: Internal error - '/xapps/{xAppName}': - get: - summary: Returns the status of a given xapp - tags: - - xapp - operationId: getXappByName - produces: - - application/json - parameters: - - name: xAppName - in: path - description: Name of xApp - required: true - type: string - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/Xapp' - '400': - description: Invalid ID supplied - '404': - description: Xapp not found - '500': - description: Internal error - delete: - summary: Undeploy an existing xapp - tags: - - xapp - operationId: undeployXapp - parameters: - - name: xAppName - in: path - description: Xapp to be undeployed - required: true - type: string - responses: - '204': - description: Successful deletion of xApp - '400': - description: Invalid xApp name supplied - '500': - description: Internal error - '/xapps/{xAppName}/instances/{xAppInstanceName}': - get: - summary: Returns the status of a given xapp - tags: - - xapp - operationId: getXappInstanceByName - produces: - - application/json - parameters: - - name: xAppName - in: path - description: Name of xApp - required: true - type: string - - name: xAppInstanceName - in: path - description: Name of xApp instance to get information - required: true - type: string - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/XappInstance' - '400': - description: Invalid name supplied - '404': - description: Xapp not found - '500': - description: Internal error - /config: - post: - summary: Create xApp config - tags: - - xapp - operationId: createXappConfig - consumes: - - application/json - produces: - - application/json - parameters: - - name: XAppConfig - in: body - description: xApp config - schema: - $ref: '#/definitions/XAppConfig' - responses: - '201': - description: xApp config successfully created - schema: - $ref: '#/definitions/XAppConfig' - '400': - description: Invalid input - '422': - description: Validation of configuration failed - '500': - description: Internal error - put: - summary: Modify xApp config - tags: - - xapp - operationId: ModifyXappConfig - consumes: - - application/json - produces: - - application/json - parameters: - - name: XAppConfig - in: body - description: xApp config - schema: - $ref: '#/definitions/XAppConfig' - responses: - '200': - description: xApp config successfully modified - schema: - $ref: '#/definitions/XAppConfig' - '400': - description: Invalid input - '422': - description: Validation of configuration failed - '500': - description: Internal error - get: - summary: Returns the configuration of all xapps - tags: - - xapp - operationId: getAllXappConfig - produces: - - application/json - responses: - '200': - description: successful query of xApp config - schema: - $ref: '#/definitions/AllXappConfig' - '500': - description: Internal error - delete: - summary: Delete xApp configuration - tags: - - xapp - operationId: deleteXappConfig - parameters: - - name: ConfigMetadata - in: body - description: xApp configuration information - schema: - $ref: '#/definitions/ConfigMetadata' - responses: - '204': - description: Successful deletion of xApp config - '400': - description: Invalid parameters supplied - '500': - description: Internal error - /subscriptions: - post: - summary: Subscribe event - tags: - - xapp - - subscriptions - operationId: addSubscription - consumes: - - application/json - produces: - - application/json - parameters: - - name: subscriptionRequest - in: body - description: New subscription - required: true - schema: - $ref: '#/definitions/subscriptionRequest' - responses: - '201': - description: Subscription successfully created - schema: - $ref: '#/definitions/subscriptionResponse' - '400': - description: Invalid input - get: - summary: Returns all subscriptions - tags: - - xapp - - subscriptions - operationId: getSubscriptions - produces: - - application/json - responses: - '200': - description: successful query of subscriptions - schema: - $ref: '#/definitions/allSubscriptions' - '/subscriptions/{subscriptionId}': - get: - summary: Returns the information of subscription - tags: - - xapp - - subscriptions - operationId: getSubscriptionById - produces: - - application/json - parameters: - - name: subscriptionId - in: path - description: ID of subscription - required: true - type: string - responses: - '200': - description: successful operation - schema: - $ref: '#/definitions/subscription' - '400': - description: Invalid ID supplied - '404': - description: Subscription not found - put: - summary: Modify event subscription - tags: - - xapp - - subscriptions - operationId: modifySubscription - consumes: - - application/json - produces: - - application/json - parameters: - - name: subscriptionId - in: path - description: ID of subscription - required: true - type: string - - in: body - name: subscriptionRequest - description: Modified subscription - required: true - schema: - $ref: '#/definitions/subscriptionRequest' - responses: - '200': - description: Subscription modification successful - schema: - $ref: '#/definitions/subscriptionResponse' - '400': - description: Invalid input - delete: - summary: Unsubscribe event - tags: - - xapp - - subscriptions - description: '' - operationId: deleteSubscription - parameters: - - name: subscriptionId - in: path - description: ID of subscription - required: true - type: string - responses: - '204': - description: Successful deletion of subscription - '400': - description: Invalid subscription supplied -definitions: - AllDeployableXapps: - type: array - items: - type: string - example: "xapp-dummy" - AllDeployedXapps: - type: array - items: - $ref: '#/definitions/Xapp' - Xapp: - type: object - required: - - name - properties: - name: - type: string - example: xapp-dummy - status: - type: string - description: xapp status in the RIC - enum: - - unknown - - deployed - - deleted - - superseded - - failed - - deleting - version: - type: string - example: 1.2.3 - instances: - type: array - items: - $ref: '#/definitions/XappInstance' - XappInstance: - type: object - required: - - name - properties: - name: - type: string - example: xapp-dummy-6cd577d9-4v255 - status: - type: string - description: xapp instance status - enum: - - pending - - running - - succeeded - - failed - - unknown - - completed - - crashLoopBackOff - ip: - type: string - example: 192.168.0.1 - port: - type: integer - example: 32300 - txMessages: - type: array - items: - type: string - example: ControlIndication - rxMessages: - type: array - items: - type: string - example: LoadIndication - ConfigMetadata: - type: object - required: - - name - - configName - - namespace - properties: - name: - type: string - description: Name of the xApp - example: xapp-dummy - configName: - type: string - description: Name of the config map - example: xapp-dummy-config-map - namespace: - type: string - description: Name of the namespace - example: ricxapp - XAppConfig: - type: object - required: - - metadata - - descriptor - - config - properties: - metadata: - $ref: '#/definitions/ConfigMetadata' - descriptor: - type: object - description: Schema of configuration in JSON format - config: - type: object - description: Configuration in JSON format - AllXappConfig: - type: array - items: - $ref: '#/definitions/XAppConfig' - subscriptionRequest: - type: object - required: - - targetUrl - - eventType - - maxRetries - - retryTimer - properties: - targetUrl: - type: string - example: 'http://localhost:11111/apps/webhook/' - eventType: - type: string - description: Event which is subscribed - enum: - - created - - deleted - - all - maxRetries: - type: integer - description: Maximum number of retries - example: 11 - retryTimer: - type: integer - description: Time in seconds to wait before next retry - example: 22 - subscriptionResponse: - type: object - properties: - id: - type: string - example: 1ILBltYYzEGzWRrVPZKmuUmhwcc - version: - type: integer - example: 2 - eventType: - type: string - description: Event which is subscribed - enum: - - created - - deleted - - updated - - all - allSubscriptions: - type: array - items: - $ref: '#/definitions/subscription' - subscription: - type: object - properties: - id: - type: string - example: 1ILBltYYzEGzWRrVPZKmuUmhwcc - targetUrl: - type: string - example: 'http://localhost:11111/apps/webhook/' - eventType: - type: string - description: Event which is subscribed - enum: - - created - - deleted - - updated - - all - maxRetries: - type: integer - description: Maximum number of retries - example: 11 - retryTimer: - type: integer - description: Time in seconds to wait before next retry - example: 22 - subscriptionNotification: - type: object - properties: - id: - type: string - example: 1ILBltYYzEGzWRrVPZKmuUmhwcc - version: - type: integer - example: 2 - eventType: - type: string - description: Event to be notified - enum: - - created - - deleted - - updated - xApps: - $ref: '#/definitions/AllDeployedXapps' diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 2ab746fa..5e345229 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -19,6 +19,13 @@ RIC Dashboard Release Notes =========================== +Version 1.2.4, 10 Oct 2019 +-------------------------- +* Revise a1-med-client to use API spec in new submodule ric-plt/a1; + removed cached copy +* Revise app manager client to use API spec in new submodule ric-plt/appmgr; + removed cached copy + Version 1.2.3, 4 Oct 2019 ------------------------- * Serve unauthenticated user a login-at-portal page without using redirect diff --git a/e2-mgr-client/pom.xml b/e2-mgr-client/pom.xml index 4d4f8976..b15ed89b 100644 --- a/e2-mgr-client/pom.xml +++ b/e2-mgr-client/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT org.o-ran-sc.ric.plt.e2mgr.client diff --git a/pom.xml b/pom.xml index 8c394b35..296de8cb 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ limitations under the License. ric-dash-parent RIC Dashboard project pom - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT 11 diff --git a/webapp-backend/pom.xml b/webapp-backend/pom.xml index 6976b00e..a1e30f20 100644 --- a/webapp-backend/pom.xml +++ b/webapp-backend/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ric-dash-be RIC Dashboard Webapp backend diff --git a/webapp-frontend/pom.xml b/webapp-frontend/pom.xml index dfd36b03..fc61e19c 100644 --- a/webapp-frontend/pom.xml +++ b/webapp-frontend/pom.xml @@ -25,7 +25,7 @@ limitations under the License. org.o-ran-sc.portal.ric-dashboard ric-dash-parent - 1.2.3-SNAPSHOT + 1.2.4-SNAPSHOT ric-dash-fe RIC Dashboard Webapp frontend -- 2.16.6