Skip to content

Commit

Permalink
enable fetch-depth
Browse files Browse the repository at this point in the history
  • Loading branch information
woojoong88 committed Nov 19, 2024
1 parent fcf66d2 commit 3ff1a58
Show file tree
Hide file tree
Showing 416 changed files with 30,970 additions and 0 deletions.
29 changes: 29 additions & 0 deletions onos-a1t/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
SPDX-FileCopyrightText: 2019-present Open Networking Foundation <[email protected]>
SPDX-License-Identifier: Apache-2.0
-->

# onos-a1t
A1 AP Termination module for ONOS SD-RAN (µONOS Architecture)

## Overview
The `onos-a1t` is the A1 termination node in the near-RT RIC for A1 interface to communicate the near-RT RIC with the non-RT RIC.
It is the proxy that forwards incoming A1 messages from the non-RT RIC to appropriate xApps or outgoing A1 messages from xApps to the non-RT RIC.
As per the O-RAN Working Group 2 specification, `onos-a1t` should support A1 messages for (i) the policy management, (ii) the enrichment information, and (iii) the machine learning model management.
As of today, since the O-RAN A1 specification only defines the policy management data model, `onos-a1t` only supports the policy management service.

Regarding O-RAN specifications, `onos-a1t` supports A1 Application Protocol v03.01 and A1 Type Definitions v02.00.

## Interaction
The `onos-a1t` interacts with at least three nodes: (i) `onos-topo`, (ii) `A1-enabled xApps` and (iii) `non-RT RIC`.
To begin with, `onos-a1t` keeps listening the `onos-topo` to check if there is new `A1-enabled xApps` deployed and if there are `A1-enabled xApps` already running.
Basically, the A1-enabled `xApps` initially stores its A1 interface information, such as supported A1 services (i.e., the policy management, the enrichment information, and the machine learning model management) and A1 interface endpoint (i.e., IP address and port number).
Listening `onos-topo`, `onos-a1t` scrapes the A1 interface information and store it into the `onos-a1t` local store.
With the A1 interface information, `onos-a1t` starts creating the gRPC session with appropriate xApps to communicate with each other.
A gRPC server is the `A1-enabled xApp`, whereas `onos-a1t` acts as the gRPC client (Note that this design is able to support the high availability and reliability by using the replicas for the near future).
In order to communicate with the non-RT RIC, `onos-a1t` has both an HTTP server and an HTTP client.
And of course, the non-RT RIC has to have both the HTTP server and the HTTP client for the bi-directional communication over HTTP.
The HTTP server in `onos-a1t` receives the JSON formatted A1 interface message from the non-RT RIC.
The HTTP client in `onos-a1t` is the client that sends the JSON formatted outgoing A1 interface messages to the non-RT RIC.
The HTTP client and server implementations are auto generated from the OpenAPI definitions provided by the A1 Application Protocol specifications.
49 changes: 49 additions & 0 deletions onos-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
SPDX-FileCopyrightText: 2020-present Open Networking Foundation <[email protected]>
SPDX-License-Identifier: Apache-2.0
-->

# onos-api
gRPC API definitions for the µONOS platform

## Overview
This repository houses not only the `.proto` files, but also a number of automatically generated artifacts, e.g. `.pb.go`, `.py` files and similarly for other languages that may be added in the future.

The source tree structure is paritioned into `proto`, which contains the canonical protobuf definitions and a top-level directory for each of the supported languages. The structure within each of the language-specific directories reflects the idoms and conventions appropriate to each language.

## Proto
The top-level package for the protobuf definitions is `onos` and the next level subpackage is the name of the particular platform subsystem, such as `config`, `topo`, etc. This directory tree should contain exclusively the `.proto` files and not be tainted by any other artifacts, especially any language-specific ones.

The proto files are compiled and processed via `build/bin/compile-protos.sh` script, which is invoked by the `Makefile`. All protofiles here should follow the established guidelines and must pass the protobuf lint checker enforcing these conventions.

## Golang
The `go` source tree holds the automatically-generated `.pb.go` artifacts and also any manually authored `.go` source files written in support of the Golang bindings. To minimize the churn and to exercise tighter control over versioning, the generated files are also versioned and maintained in the SCM repo.

The root package of the module is `github.com/onosproject/onos-api/go/onos`, with subpackages being named after each of the platform subsystems, mirroring the structure of the `proto` packages. Golang projects that wish to import µONOS API packages should include the following in the requirements section of their `go.mod` file:

```go
require (
...
github.com/onosproject/onos-api/go v0.6.1
...
)

```

Additionally, Go bindings are generated with mocks for testing with [gomock]. Mocks of Protobuf interfaces can be constructed via the same package as the interfaces they mock:

```go
import topoapi "github.com/onosproject/onos-api/go/onos/topo"
...
mockClient := topoapi.NewMockTopoClient(ctrl)
```

## Python

The `python` source tree holds gRPC bindings are generated for [Python]. Pyhton bindings are generated with the [python-betterproto] protoc plugin and support Python3's `asyncio` framework.

[gomock]: https://github.com/golang/mock
[Go]: https://golang.org/
[Protobuf]: https://developers.google.com/protocol-buffers
[Python]: https://www.python.org
[python-betterproto]: https://github.com/danielgtaylor/python-betterproto
201 changes: 201 additions & 0 deletions onos-api/docs/onos/a1t/a1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# Protocol Documentation
<a name="top"></a>

## Table of Contents

- [onos/a1t/admin/admin.proto](#onos_a1t_admin_admin-proto)
- [GetPolicyObjectRequest](#onos-a1t-admin-GetPolicyObjectRequest)
- [GetPolicyObjectResponse](#onos-a1t-admin-GetPolicyObjectResponse)
- [GetPolicyObjectStatusRequest](#onos-a1t-admin-GetPolicyObjectStatusRequest)
- [GetPolicyObjectStatusResponse](#onos-a1t-admin-GetPolicyObjectStatusResponse)
- [GetPolicyTypeObjectRequest](#onos-a1t-admin-GetPolicyTypeObjectRequest)
- [GetPolicyTypeObjectResponse](#onos-a1t-admin-GetPolicyTypeObjectResponse)
- [GetXAppConnectionResponse](#onos-a1t-admin-GetXAppConnectionResponse)
- [GetXAppConnectionsRequest](#onos-a1t-admin-GetXAppConnectionsRequest)

- [A1TAdminService](#onos-a1t-admin-A1TAdminService)

- [Scalar Value Types](#scalar-value-types)



<a name="onos_a1t_admin_admin-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## onos/a1t/admin/admin.proto



<a name="onos-a1t-admin-GetPolicyObjectRequest"></a>

### GetPolicyObjectRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| policy_type_id | [string](#string) | | |
| policy_object_id | [string](#string) | | |






<a name="onos-a1t-admin-GetPolicyObjectResponse"></a>

### GetPolicyObjectResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| policy_type_id | [string](#string) | | |
| policy_object_id | [string](#string) | | |
| policy_object | [string](#string) | | |






<a name="onos-a1t-admin-GetPolicyObjectStatusRequest"></a>

### GetPolicyObjectStatusRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| policy_type_id | [string](#string) | | |
| policy_object_id | [string](#string) | | |






<a name="onos-a1t-admin-GetPolicyObjectStatusResponse"></a>

### GetPolicyObjectStatusResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| policy_type_id | [string](#string) | | |
| policy_object_id | [string](#string) | | |
| policy_object_status | [string](#string) | | |






<a name="onos-a1t-admin-GetPolicyTypeObjectRequest"></a>

### GetPolicyTypeObjectRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| policy_type_id | [string](#string) | | |






<a name="onos-a1t-admin-GetPolicyTypeObjectResponse"></a>

### GetPolicyTypeObjectResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| policy_type_id | [string](#string) | | |
| policy_ids | [string](#string) | repeated | |
| policy_type_object | [string](#string) | | |






<a name="onos-a1t-admin-GetXAppConnectionResponse"></a>

### GetXAppConnectionResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| xapp_id | [string](#string) | | |
| supported_a1_service | [string](#string) | | |
| supported_a1_service_type_id | [string](#string) | | |
| xapp_a1_endpoint | [string](#string) | | |






<a name="onos-a1t-admin-GetXAppConnectionsRequest"></a>

### GetXAppConnectionsRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| xapp_id | [string](#string) | | |












<a name="onos-a1t-admin-A1TAdminService"></a>

### A1TAdminService


| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| GetXAppConnections | [GetXAppConnectionsRequest](#onos-a1t-admin-GetXAppConnectionsRequest) | [GetXAppConnectionResponse](#onos-a1t-admin-GetXAppConnectionResponse) stream | GetXAppConnections |
| GetPolicyTypeObject | [GetPolicyTypeObjectRequest](#onos-a1t-admin-GetPolicyTypeObjectRequest) | [GetPolicyTypeObjectResponse](#onos-a1t-admin-GetPolicyTypeObjectResponse) stream | GetPolicyTypeObject |
| GetPolicyObject | [GetPolicyObjectRequest](#onos-a1t-admin-GetPolicyObjectRequest) | [GetPolicyObjectResponse](#onos-a1t-admin-GetPolicyObjectResponse) stream | GetPolicyObject |
| GetPolicyObjectStatus | [GetPolicyObjectStatusRequest](#onos-a1t-admin-GetPolicyObjectStatusRequest) | [GetPolicyObjectStatusResponse](#onos-a1t-admin-GetPolicyObjectStatusResponse) stream | GetPolicyObjectStatus |





## Scalar Value Types

| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
| <a name="double" /> double | | double | double | float | float64 | double | float | Float |
| <a name="float" /> float | | float | float | float | float32 | float | float | Float |
| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| <a name="bool" /> bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |

Loading

0 comments on commit 3ff1a58

Please sign in to comment.