RIC-1059: dms_cli to use flask-restx 51/12851/1 master
authorAbdulwahid W <abdulwahid.w@nokia.com>
Fri, 3 May 2024 13:24:53 +0000 (18:54 +0530)
committerAbdulwahid W <abdulwahid.w@nokia.com>
Fri, 3 May 2024 13:25:30 +0000 (18:55 +0530)
Change-Id: Ifd035922f502a2fad7cdb351fac1426ce6073f93
Signed-off-by: Abdulwahid W <abdulwahid.w@nokia.com>
.github/workflows/gerrit-merge.yaml [new file with mode: 0644]
INFO.yaml
xapp_orchestrater/dev/xapp_onboarder/requirements.txt
xapp_orchestrater/dev/xapp_onboarder/xapp_onboarder/api/api_reference.py
xapp_orchestrater/dev/xapp_onboarder/xapp_onboarder/api/endpoints/charts_ep.py
xapp_orchestrater/dev/xapp_onboarder/xapp_onboarder/api/endpoints/health_check_ep.py
xapp_orchestrater/dev/xapp_onboarder/xapp_onboarder/api/endpoints/onboard_ep.py
xapp_orchestrater/dev/xapp_onboarder/xapp_onboarder/api/models/request_models.py
xapp_orchestrater/dev/xapp_onboarder/xapp_onboarder/api/models/response_models.py

diff --git a/.github/workflows/gerrit-merge.yaml b/.github/workflows/gerrit-merge.yaml
new file mode 100644 (file)
index 0000000..fc4bde6
--- /dev/null
@@ -0,0 +1,120 @@
+---
+name: Gerrit Merge
+
+# yamllint disable-line rule:truthy
+on:
+  workflow_dispatch:
+    inputs:
+      GERRIT_BRANCH:
+        description: "Branch that change is against"
+        required: true
+        type: string
+      GERRIT_CHANGE_ID:
+        description: "The ID for the change"
+        required: true
+        type: string
+      GERRIT_CHANGE_NUMBER:
+        description: "The Gerrit number"
+        required: true
+        type: string
+      GERRIT_CHANGE_URL:
+        description: "URL to the change"
+        required: true
+        type: string
+      GERRIT_EVENT_TYPE:
+        description: "Type of Gerrit event"
+        required: true
+        type: string
+      GERRIT_PATCHSET_NUMBER:
+        description: "The patch number for the change"
+        required: true
+        type: string
+      GERRIT_PATCHSET_REVISION:
+        description: "The revision sha"
+        required: true
+        type: string
+      GERRIT_PROJECT:
+        description: "Project in Gerrit"
+        required: true
+        type: string
+      GERRIT_REFSPEC:
+        description: "Gerrit refspec of change"
+        required: true
+        type: string
+    secrets:
+      SONAR_TOKEN:
+        description: "Sonar Cloud access token"
+        required: true
+
+concurrency:
+  # yamllint disable-line rule:line-length
+  group: gerrit-merge-${{ github.workflow }}-${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
+  cancel-in-progress: true
+
+jobs:
+  notify:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Notify job start
+        # yamllint disable-line rule:line-length
+        uses: lfit/gerrit-review-action@9627b9a144f2a2cad70707ddfae87c87dce60729  # v0.8
+        with:
+          host: ${{ vars.GERRIT_SERVER }}
+          username: ${{ vars.GERRIT_SSH_USER }}
+          key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
+          known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
+          gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
+          gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
+          vote-type: clear
+      - name: Allow replication
+        run: sleep 10s
+
+  call-prescan-sonarcloud:
+    needs: notify
+    # yamllint disable-line rule:line-length
+    uses: lfit/releng-reusable-workflows/.github/workflows/composed-prescan-sonar-cloud.yaml@main
+    with:
+      GERRIT_BRANCH: ${{ inputs.GERRIT_BRANCH }}
+      GERRIT_CHANGE_ID: ${{ inputs.GERRIT_CHANGE_ID }}
+      GERRIT_CHANGE_NUMBER: ${{ inputs.GERRIT_CHANGE_NUMBER }}
+      GERRIT_CHANGE_URL: ${{ inputs.GERRIT_CHANGE_URL }}
+      GERRIT_EVENT_TYPE: ${{ inputs.GERRIT_EVENT_TYPE }}
+      GERRIT_PATCHSET_NUMBER: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
+      GERRIT_PATCHSET_REVISION: ${{ inputs.GERRIT_PATCHSET_REVISION }}
+      GERRIT_PROJECT: ${{ inputs.GERRIT_PROJECT }}
+      GERRIT_REFSPEC: ${{ inputs.GERRIT_REFSPEC }}
+      JDK_VERSION: "17"
+      # yamllint disable-line rule:line-length
+      PRE_BUILD_SCRIPT_URL: "https://raw.githubusercontent.com/o-ran-sc/ci-management/master/jjb/ric-plt-appmgr/prescan-ric-plt-appmgr-ubuntu.sh"
+      SONAR_ARGS: >
+        -Dsonar.organization=o-ran-sc
+        -Dsonar.projectKey=o-ran-sc_ric-plt-appmgr
+        -Dsonar.projectName=ric-plt-appmgr
+        -Dsonar.build.sourceEncoding=UTF-8
+        -Dsonar.language=go
+        -Dsonar.sources=.
+        -Dsonar.go.coverage.reportPaths=**/cover.out
+        -Dsonar.inclusions=**/**.go
+        -Dsonar.exclusions=**/*_test.go
+        -Dsonar.verbose=true
+    secrets:
+      SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+
+  report-status:
+    if: ${{ always() }}
+    needs: [notify, call-prescan-sonarcloud]
+    runs-on: ubuntu-latest
+    steps:
+      - name: Get workflow conclusion
+        uses: technote-space/workflow-conclusion-action@v3
+      - name: Report workflow conclusion
+        # yamllint disable-line rule:line-length
+        uses: lfit/gerrit-review-action@9627b9a144f2a2cad70707ddfae87c87dce60729  # v0.8
+        with:
+          host: ${{ vars.GERRIT_SERVER }}
+          username: ${{ vars.GERRIT_SSH_USER }}
+          key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
+          known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
+          gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
+          gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
+          vote-type: ${{ env.WORKFLOW_CONCLUSION }}
index 0dc50a0..cfcd5b4 100644 (file)
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -4,11 +4,11 @@ project_creation_date: '2019-11-08'
 project_category: ''
 lifecycle_state: 'Incubation'
 project_lead: &oran_ric_plt_appmgr_ptl
-    name: 'Thoralf Czichy'
-    email: 'thoralf.czichy@nokia.com'
-    id: 'czichy'
+    name: 'Abdul Wahid W'
+    email: 'abdulwahid.w@nokia.com'
+    id: 'wahidw'
     company: 'Nokia'
-    timezone: 'America/New_York'
+    timezone: 'Asia/Kolkata'
 primary_contact: *oran_ric_plt_appmgr_ptl
 issue_tracking:
     type: 'jira'
index bd8c85a..e23537b 100644 (file)
@@ -5,7 +5,7 @@ chardet==3.0.4
 Click==7.0
 fire==0.2.1
 Flask==1.1.1
-flask-restplus==0.13.0
+flask-restx==1.1.0
 idna==2.9
 importlib-metadata==1.5.0
 itsdangerous==1.1.0
@@ -15,9 +15,9 @@ MarkupSafe==1.1.1
 pyrsistent==0.15.7
 pytz==2019.3
 PyYAML==5.3
-requests==2.23.0
-six==1.14.0
+requests==2.31.0
+six==1.16.0
 termcolor==1.1.0
 urllib3==1.25.8
 Werkzeug==0.16.1
-zipp==3.0.0
+zipp==3.1.0
index 1f288e0..9e6cf32 100644 (file)
@@ -16,7 +16,7 @@
 
 import logging
 
-from flask_restplus import Api
+from flask_restx import Api
 from xapp_onboarder.server import settings
 
 log = logging.getLogger(__name__)
index 16fbec7..dd2eb3b 100644 (file)
@@ -16,7 +16,7 @@
 
 import logging
 from flask import make_response
-from flask_restplus import Resource
+from flask_restx import Resource
 from xapp_onboarder.api.api_reference import api
 from xapp_onboarder.api.charts import get_charts_list, download_chart_package, download_values_yaml
 from xapp_onboarder.api.models.response_models import error_message_model
index 23e8b5c..1a51e37 100644 (file)
@@ -16,7 +16,7 @@
 
 import logging
 
-from flask_restplus import Resource
+from flask_restx import Resource
 from xapp_onboarder.api.api_reference import api
 from xapp_onboarder.api.models.response_models import status_message_model, error_message_model, response
 from xapp_onboarder.repo_manager.repo_manager import repo_manager
index 6806bbf..bfcff31 100644 (file)
@@ -16,7 +16,7 @@
 
 import logging
 from flask import request
-from flask_restplus import Resource
+from flask_restx import Resource
 from xapp_onboarder.api.models import request_models
 from xapp_onboarder.api.api_reference import api
 from xapp_onboarder.api.models.response_models import status_message_model, error_message_model
index a7865a8..69ed631 100644 (file)
@@ -14,7 +14,7 @@
 #   limitations under the License.                                             #
 ################################################################################
 
-from flask_restplus import fields
+from flask_restx import fields
 from xapp_onboarder.api.api_reference import api
 
 xapp_descriptor_post = api.model('descriptor', {
index 156b120..7d67e0f 100644 (file)
@@ -14,7 +14,7 @@
 #   limitations under the License.                                             #
 ################################################################################
 
-from flask_restplus import fields, marshal
+from flask_restx import fields, marshal
 from xapp_onboarder.api.api_reference import api
 
 error_message_model = api.model('error_message', {
@@ -38,4 +38,4 @@ class response():
         self.error_message = error_message
 
     def get_return(self):
-        return marshal(self, self.model), self.status_code
\ No newline at end of file
+        return marshal(self, self.model), self.status_code