tree: 355b309243e043bc7772bdd8dd08522f4e48ac5a [path history] [tgz]
  1. gogeneratorspecs/
  2. internal/
  3. .gitignore
  4. build-capifcore-ubuntu.sh
  5. container-tag.yaml
  6. Dockerfile
  7. generate.sh
  8. go.mod
  9. go.sum
  10. main.go
  11. main_test.go
  12. README.md
capifcore/README.md

O-RAN-SC Non-RealTime CAPIF implementation

This product is a Go implementation of the CAPIF Core function, based on the 3GPP CAPIF interfaces.

Generation of API code

The CAPIF APIs are generated from the OpenAPI specification provided by 3GPP. The generate.sh script downloads the specifications from 3GPP, fixes them and then generates the APIs. It also generates the mocks needed for unit testing.

To fix the specifications there are three tools:

  • commoncollector, collects type definitions from peripheral specifications to keep down the number of dependencies to other specifications. The types to collect are listed in the definitions.txtfile.
  • enumfixer, fixes enumeration definitions so they can be properly generated.
  • specificationfixer, fixes flaws in the specifications so they can be properly generated. All fixes are hard coded.

Build and test

To generate mocks manually, run the following command:

go generate ./...

To build the application, run the following command:

go build

To run the unit tests for the application, run the following command:

go test ./...

The application can also be built as a Docker image, by using the following command:

docker build . -t capifcore

Run

To run the Core Function from the command line, run the following commands from this folder.

./capifcore [-port <port (default 8080)>]