From 5e246e2938e8376e509981b7b2f137909440f045 Mon Sep 17 00:00:00 2001 From: hdamker-bot Date: Wed, 15 Oct 2025 09:19:13 +0000 Subject: [PATCH 1/4] admin: migrate to centralized linting workflows Applied via project-admin workflow Repository: MultiPointVPN Operation: centralize-linting-workflows --- .github/workflows/pr_validation_caller.yml | 49 ++++++++++++++++++++++ .github/workflows/spectral-oas-caller.yml | 42 +++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 .github/workflows/pr_validation_caller.yml create mode 100644 .github/workflows/spectral-oas-caller.yml diff --git a/.github/workflows/pr_validation_caller.yml b/.github/workflows/pr_validation_caller.yml new file mode 100644 index 0000000..d847f6e --- /dev/null +++ b/.github/workflows/pr_validation_caller.yml @@ -0,0 +1,49 @@ +# ========================================================================================= +# CAMARA Project - Pull Request Validation Workflow Caller +# +# This GitHub Actions workflow is responsible for invoking a reusable PR validation workflow +# from the camaraproject/tooling repository. It is intended to ensure consistent validation +# steps for all PRs targeting the main branch in this repository. +# +# CHANGELOG: +# - 2025-08-01: Initial version for v0 +# +# USAGE: +# - Automatically triggers on pull requests targeting main. +# - Can be triggered manually via workflow_dispatch. +# - Calls by default the reusable workflow at +# camaraproject/tooling/.github/workflows/pr_validation.yml@v0 +# +# DOCUMENTATION: +# see https://github.com/camaraproject/tooling/tree/main/linting/docs +# ========================================================================================= + +name: Caller for PR validation workflow + +on: + # Trigger on pull requests to the main branch only + pull_request: + branches: main + # Enable manual trigger via the GitHub UI + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: + # Grant necessary write permissions for PRs, contents, and issues + pull-requests: write + contents: write + issues: write + statuses: write + +jobs: + pr_validation: + # Invoke the reusable PR validation workflow from "v0" tag of camaraproject/tooling + uses: camaraproject/tooling/.github/workflows/pr_validation.yml@v0 + secrets: inherit +# Tools configuration from the tooling repository subfolder of /linting/config/ indicated by `configurations` variable +# If needed, you can specify a configuration from another subfolder of camaraproject/tooling/linting/config/ (uncomment below) +# with: +# configurations: api-name diff --git a/.github/workflows/spectral-oas-caller.yml b/.github/workflows/spectral-oas-caller.yml new file mode 100644 index 0000000..05cde3f --- /dev/null +++ b/.github/workflows/spectral-oas-caller.yml @@ -0,0 +1,42 @@ +# ========================================================================================= +# CAMARA Project - Linting OpenAPI Specification with CAMARA Ruleset Caller +# +# This GitHub Actions workflow is responsible for invoking a reusable "Spectral linting with +# CAMARA ruleset" workflow from the camaraproject/tooling repository. It is intended to +# provide more detailed output from Spectral tool (warnings, hints) +# +# CHANGELOG: +# - 2025-08-01: Initial version for v0 +# +# USAGE: +# - Can be triggered manually via workflow_dispatch. +# - Calls by default the reusable workflow at +# camaraproject/tooling/.github/workflows/spectral-oas.yml@v0 +# +# DOCUMENTATION: +# see https://github.com/camaraproject/tooling/tree/main/linting/docs +# ========================================================================================= + +name: Caller for Spectral linting with CAMARA ruleset + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +permissions: + # Grant necessary write permissions for PRs and issues + pull-requests: write + contents: read + issues: write + +jobs: + spectral: + # Invoke the reusable PR validation workflow from the main branch of camaraproject/tooling + uses: camaraproject/tooling/.github/workflows/spectral-oas.yml@v0 +# Spectral configuration from the tooling repository subfolder of /linting/config/ indicated by `configurations` variable +# If needed, you can specify a configuration from another subfolder of camaraproject/tooling/linting/config/ (uncomment below) +# with: +# configurations: api-name From 59e65579e56f54aff3318b01c10866578d5ee91f Mon Sep 17 00:00:00 2001 From: hemantagogoi-infy Date: Tue, 21 Oct 2025 11:33:21 +0530 Subject: [PATCH 2/4] pr_validation / MegaLinter fix for Yaml with yamllint --- .../MultiPoint_VPN_Camara_API_v0.0.3.yml | 109 ++++++++---------- 1 file changed, 49 insertions(+), 60 deletions(-) diff --git a/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml b/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml index 2274ab0..eb43e95 100644 --- a/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml +++ b/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml @@ -5,37 +5,25 @@ info: ##### Before starting to use the API, the developer needs to know about the below specified details : - * Multipoint VPN service endpoint The URL pointing to the RESTful resource of the - Multipoint VPN API. + * Multipoint VPN service endpoint The URL pointing to the RESTful resource of the Multipoint VPN API. - * Authentication Security access keys such as OAuth 2.0 client credentials - used by client applications to invoke the Multipoint VPN API. + * Authentication Security access keys such as OAuth 2.0 client credentials used by client applications to invoke the Multipoint VPN API. - * Identifier for access point Customer Edge (CE) IPv4 addressand/or IPv6 - address of the Customer Edge Router. + * Identifier for access point Customer Edge (CE) IPv4 addressand/or IPv6 address of the Customer Edge Router. - * Identifier for the endpoint cloud Provider Edge (PE) IPv4 and/or IPv6 - address of the Cloud Provider Edge + * Identifier for the endpoint cloud Provider Edge (PE) IPv4 and/or IPv6 address of the Cloud Provider Edge. - * Identifier for the application server(AS)IPv4 and/or IPv6 address of the - application server (cloud virtual machine) + * Identifier for the application server(AS)IPv4 and/or IPv6 address of the application server (cloud virtual machine). - * App-Flow (between the application client and application server) The - developer wants to have non public network delivery for the precise - application data flow for the application users. + * App-Flow (between the application client and application server). The developer wants to have non public network delivery for the precise application data flow for the application users. - * Duration Duration (in hours) for which the Multipoint VPN session (between CE and - cloud PE) should be created. This parameter is optional. When not specified, - a default session duration (e.g. 6 months) is applied. The user may request - a termination before its expiration. + * Duration Duration (in hours) for which the Multipoint VPN session (between CE and cloud PE) should be created. This parameter is optional. + When not specified, a default session duration (e.g. 6 months) is applied. The user may request a termination before its expiration. * Physical Location Physical location of the Customer Edge Router. - - - - NOTE- The private physical link between CE and cloud PE is default deployed - for one click calling, otherwise it is required to install the physical - link, which is out of the scope of this API. + + NOTE- The private physical link between CE and cloud PE is default deployed for one click calling, + otherwise it is required to install the physical link, which is out of the scope of this API. version: wip license: name: Apache 2.0 @@ -68,7 +56,7 @@ paths: requestBody: required: true content: - application/json: + application/json: schema: $ref: "#/components/schemas/NetworkCreate" examples: @@ -94,7 +82,7 @@ paths: "403": $ref: "#/components/responses/Generic403" "500": - $ref: "#/components/responses/Generic500" + $ref: "#/components/responses/Generic500" /network/{serviceId}: patch: tags: @@ -108,7 +96,7 @@ paths: requestBody: required: true content: - application/json: + application/json: schema: $ref: "#/components/schemas/NetworkUpdate" examples: @@ -134,7 +122,7 @@ paths: "403": $ref: "#/components/responses/Generic403" "500": - $ref: "#/components/responses/Generic500" + $ref: "#/components/responses/Generic500" get: tags: - Network @@ -200,7 +188,7 @@ paths: requestBody: required: true content: - application/json: + application/json: schema: $ref: "#/components/schemas/AssessmentRequest" examples: @@ -226,7 +214,7 @@ paths: "403": $ref: "#/components/responses/Generic403" "500": - $ref: "#/components/responses/Generic500" + $ref: "#/components/responses/Generic500" components: headers: x-correlator: @@ -288,7 +276,7 @@ components: minimum: 1 sla: type: string - enum: + enum: - A - AA - AAA @@ -341,7 +329,7 @@ components: properties: type: description: Multipoint VPN access point type - enum: + enum: - site - cloud primaryIpAddress: @@ -355,15 +343,15 @@ components: type: object properties: addressType: - type: string + type: string required: - - addressType + - addressType discriminator: - propertyName: addressType - mappings: + propertyName: addressType + mappings: - Ipv4Addr: '#/components/schemas/Ipv4Address' - - Ipv6Addr: '#/components/schemas/Ipv6Address' - Ipv4Address: + - Ipv6Addr: '#/components/schemas/Ipv6Address' + Ipv4Address: allOf: - $ref: '#/components/schemas/IpAddress' - type: object @@ -371,8 +359,8 @@ components: - address properties: address: - type: string - format: ipv4 + type: string + format: ipv4 Ipv6Address: allOf: - $ref: '#/components/schemas/IpAddress' @@ -402,7 +390,7 @@ components: $ref: '#/components/schemas/Connection' sla: type: string - enum: + enum: - A - AA - AAA @@ -438,7 +426,7 @@ components: minimum: 1 sla: type: string - enum: + enum: - A - AA - AAA @@ -455,43 +443,43 @@ components: description: Guarantee Bandwidth (Mps) sla: type: string - enum: + enum: - A - AA - AAA examples: siteToCloudVPNFeasibilityAssessmentRequest: - summary: Assesment Sample 1 - description: Feasibility assessment sample + summary: Assesment Sample 1 + description: Feasibility assessment sample value: isProtected: true connections: - - customerEdge: + customerEdge: type: site primaryIP: 84.125.93.10 secondaryIP: 84.125.94.10 location: string - providerEdge: - type: site + providerEdge: + type: site primaryIP: 84.125.93.10 secondaryIP: 84.125.94.10 guaranteeBandwidth: 20 - duration: + duration: value: 6 unit: days siteToCloudVPNFeasibilityAssessmentResponse: - summary: Assesment Sample 1 - description: Feasibility assessment sample + summary: Assesment Sample 1 + description: Feasibility assessment sample value: waitdays: 1 sla: A - rent: + rent: amount: 2000 currency: GBP siteToCloudVPNCreateConnectionRequest: - summary: Create Connection Sample 1 + summary: Create Connection Sample 1 description: Create Connection request sample value: isProtected: true @@ -502,17 +490,17 @@ components: secondaryIP: 84.125.94.10 location: string providerEdge: - type: site + type: site primaryIP: 84.125.93.10 secondaryIP: 84.125.94.10 guaranteeBandwidth: 20 - duration: + duration: value: 6 unit: days - + siteToCloudVPNCreateConnectionResponse: - summary: Create Connection Sampl 1 - description: Create Connection response sample + summary: Create Connection Sampl 1 + description: Create Connection response sample value: serviceId: 111111 connections: @@ -522,13 +510,13 @@ components: secondaryIP: 84.125.94.10 location: string providerEdge: - type: site + type: site primaryIP: 84.125.93.10 secondaryIP: 84.125.94.10 resourceGroupId: 12121 cloudGatewayIP: 1.2.3.4 siteToCloudVPNUpdateConnectionRequest: - summary: Update Connection Sample 1 + summary: Update Connection Sample 1 description: Update Connection request sample value: serviceId: 111111 @@ -643,4 +631,5 @@ components: value: status: 500 code: Internal Server Error - message: Internal server error while processing request. \ No newline at end of file + message: Internal server error while processing request. + From 8d0978c54651a810065a08c20c1927bd2c802dc6 Mon Sep 17 00:00:00 2001 From: hemantagogoi-infy Date: Tue, 21 Oct 2025 11:53:51 +0530 Subject: [PATCH 3/4] Fix for pr_validation / MegaLinter api fixes for spectral --- code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml b/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml index eb43e95..707a454 100644 --- a/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml +++ b/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml @@ -520,7 +520,7 @@ components: description: Update Connection request sample value: serviceId: 111111 - guaranteeBandwidth: 10Mbps + guaranteeBandwidth: 10 sla: A responses: Generic400: @@ -630,6 +630,6 @@ components: description: Internal server error value: status: 500 - code: Internal Server Error + code: INTERNAL_SERVER_ERROR message: Internal server error while processing request. - + From 7a74641049295b4d16810e2d2a42bb829dcc6233 Mon Sep 17 00:00:00 2001 From: hemantagogoi-infy Date: Tue, 21 Oct 2025 12:19:57 +0530 Subject: [PATCH 4/4] pr_validation / MegaLinter fix updated for api and yaml --- .../MultiPoint_VPN_Camara_API_v0.0.3.yml | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml b/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml index 707a454..1e841d8 100644 --- a/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml +++ b/code/API_definitions/MultiPoint_VPN_Camara_API_v0.0.3.yml @@ -21,7 +21,7 @@ info: When not specified, a default session duration (e.g. 6 months) is applied. The user may request a termination before its expiration. * Physical Location Physical location of the Customer Edge Router. - + NOTE- The private physical link between CE and cloud PE is default deployed for one click calling, otherwise it is required to install the physical link, which is out of the scope of this API. version: wip @@ -455,20 +455,20 @@ components: value: isProtected: true connections: - customerEdge: - type: site - primaryIP: 84.125.93.10 - secondaryIP: 84.125.94.10 - location: string - providerEdge: - type: site - primaryIP: 84.125.93.10 - secondaryIP: 84.125.94.10 + - customerEdge: + type: site + primaryIP: 84.125.93.10 + secondaryIP: 84.125.94.10 + location: string + providerEdge: + type: site + primaryIP: 84.125.93.10 + secondaryIP: 84.125.94.10 guaranteeBandwidth: 20 duration: value: 6 unit: days - + siteToCloudVPNFeasibilityAssessmentResponse: summary: Assesment Sample 1 description: Feasibility assessment sample @@ -632,4 +632,3 @@ components: status: 500 code: INTERNAL_SERVER_ERROR message: Internal server error while processing request. -