Commit 32e7392f authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'gitlab-logging-feature' into 'main'

Logging feature developed

See merge request !3
parents 16e1a425 0dc8ec91
Loading
Loading
Loading
Loading
+39 −0
Original line number Diff line number Diff line
name: Sync GitHub to GitLab

on:
  push:
    branches:
      - develop  # Se activa cuando hay cambios en la rama develop

jobs:
  create-merge-request:
    runs-on: ubuntu-latest

    steps:
      # 1. Checkout del código desde GitHub
      - name: Checkout GitHub repository
        uses: actions/checkout@v4

      # 2. Crear un Merge Request en GitLab
      - name: Create Merge Request in GitLab
        env:
          GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
        run: |
          # Información del MR
          PROJECT_ID="335" # Reemplaza con el ID del proyecto de GitLab
          SOURCE_BRANCH="develop"
          TARGET_BRANCH="main"

          # Crear el Merge Request usando la API de GitLab
          curl -X POST \
            -H "Content-Type: application/json" \
            -H "Authorization: Bearer $GITLAB_TOKEN" \
            -d '{
              "id": "'"${PROJECT_ID}"'",
              "source_branch": "'"${SOURCE_BRANCH}"'",
              "target_branch": "'"${TARGET_BRANCH}"'",
              "title": "Sync develop to main",
              "remove_source_branch": false,
              "squash": false
            }' \
            https://labs.etsi.org/api/v4/projects/${PROJECT_ID}/merge_requests
+70 −0
Original line number Diff line number Diff line
# This workflow will upload a Python Package to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
  release:
    types: [published]

permissions:
  contents: read

jobs:
  release-build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Build release distributions
        run: |
          # NOTE: put your own distribution build steps here.
          python -m pip install build
          python -m build

      - name: Upload distributions
        uses: actions/upload-artifact@v4
        with:
          name: release-dists
          path: dist/

  pypi-publish:
    runs-on: ubuntu-latest
    needs:
      - release-build
    permissions:
      # IMPORTANT: this permission is mandatory for trusted publishing
      id-token: write

    # Dedicated environments with protections for publishing are strongly recommended.
    # For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
    environment:
      name: pypi
      # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
      
      #
      # ALTERNATIVE: if your GitHub Release name is the PyPI project version string
      # ALTERNATIVE: exactly, uncomment the following line instead:
      url: https://pypi.org/project/opencapif-sdk/${{ github.event.release.name }}

    steps:
      - name: Retrieve release distributions
        uses: actions/download-artifact@v4
        with:
          name: release-dists
          path: dist/

      - name: Publish release distributions to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          packages-dir: dist/
+1 −1
Original line number Diff line number Diff line
@@ -176,6 +176,6 @@ config
*/__pycache__


*.capif_sdk_config_sample_test.json

/test/capif_sdk_config_sample_test.json

MANIFEST.in

0 → 100644
+2 −0
Original line number Diff line number Diff line
include README_pipy.md
include LICENSE
 No newline at end of file
+10 −9
Original line number Diff line number Diff line
@@ -17,18 +17,17 @@ This document serves as the [main bootstrap reference](#networkapp-developer-pat

 1. [Repository structure](#repository-structure) 
 2. [Network App developers](#network-app-developers)
 3. [OpenCAPIF SDK summary](#opencapif-sdk-summary)
 4. [OpenCAPIF SDK requirements](#opencapif-sdk-requirements)
 5. [OpenCAPIF sdk installation](#opencapif-sdk-installation)
 6. [OpenCAPIF SDK data schema](#opencapif-sdk-data-schema)
 7. [OpenCAPIF SDK Configuration](./doc/sdk_configuration.md)
 8. [Network App developer path](#network-app-developer-path)
 3. [OpenCAPIF SDK requirements](#opencapif-sdk-requirements)
 4. [OpenCAPIF sdk installation](#opencapif-sdk-installation)
 5. [OpenCAPIF SDK data schema](#opencapif-sdk-data-schema)
 6. [OpenCAPIF SDK Configuration](./doc/sdk_configuration.md)
 7. [Network App developer path](#network-app-developer-path)
    1. [Provider Network App](#provider-network-app)
        * [Provider Network App sample](#provider-network-app-sample)
    2. [Invoker Network App](#invoker-network-app)
        * [Provider Network App sample](#provider-network-app-sample)
 9. [**OpenCAPIF SDK full documentation**](./doc/sdk_full_documentation.md)
 10. [OpenCAPIF SDK known issues](#opencapif-sdk-known-issues)
 8. [**OpenCAPIF SDK full documentation**](./doc/sdk_full_documentation.md)
 9. [OpenCAPIF SDK known issues](#opencapif-sdk-known-issues)


# Repository structure
@@ -96,6 +95,7 @@ OpenCAPIF SDK brings a set of functions to integrate with the 5G Core's function
| /{apfId}/service-apis/{serviceApiId} (GET)                           | [get_service()](./doc/sdk_full_documentation.md#get-services)                                               | Retrieves the details of a specific service API for a specific `apfId` and `serviceApiId`           |
| /{apfId}/service-apis (GET)            | [get_all_services()](./doc/sdk_full_documentation.md#get-all-services)                                          | Retrieves a list of all available service APIs for a specific `apfId`            |
| /aef-security/v1/check-authentication (POST)            | [check_authentication()](./doc/sdk_full_documentation.md#check_authentication)                                          | This custom operation allows the API invoker to confirm the `supported_features` from the API exposing function(AEF)            |
| /api-invocation-logs/v1/{aefId}/logs (POST)             | [create_logs( aefId, api_invoker_id)](./doc/sdk_full_documentation.md#create_logs) | This operation allows to the Provider to notice to the CCF about the query of an invoker for an especific `aefId`

NOTE: Above mentioned CAPIF APIs are defined in these 3GPP references:
- [CAPIF Invoker API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_API_Invoker_Management_API.yaml)
@@ -104,6 +104,7 @@ NOTE: Above mentioned CAPIF APIs are defined in these 3GPP references:
- [CAPIF Publish API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Publish_Service_API.yaml) 
- [CAPIF Security API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Security_API.yaml)
- [AEF Security API specification](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_AEF_Security_API.yaml)
- [CAPIF Logging API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Logging_API_Invocation_API.yaml)

NOTE: In the [3GPP Technical Specification (TS) 29.222 V18.5.0 Common API Framework for 3GPP Northbound APIs](https://www.etsi.org/deliver/etsi_ts/129200_129299/129222/18.05.00_60/ts_129222v180500p.pdf) the `service` concept is understood as equal as the `API` concept.

@@ -163,6 +164,7 @@ Now, it is described in 4 simple steps how a Provider can be developed in just s

  provider.publish_req['publisher_apf_id'] = APF
  provider.publish_req['publisher_aefs_ids'] = [AEF1, AEF2]
  provider.supported_features ="4"
  provider.publish_services()
```

@@ -315,7 +317,6 @@ There are some features which **are not currently available at latest OpenCAPIF
  - [CAPIF Access control policy management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Access_Control_Policy_API.yaml)
  - [CAPIF Auditing API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Auditing_API.yaml)
  - [CAPIF Events API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Events_API.yaml)
  - [CAPIF Logging API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Logging_API_Invocation_API.yaml)
  - [CAPIF Routing info API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Routing_Info_API.yaml)
  - [CAPIF Security API management](https://github.com/jdegre/5GC_APIs/blob/Rel-18/TS29222_CAPIF_Security_API.yaml)
    - /trustedInvokers/{apiInvokerId}/delete (POST)
Loading