Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ransim api to onos-api #46

Merged
merged 1 commit into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion build/bin/compile-protos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
proto_path="./proto:${GOPATH}/src/github.com/gogo/protobuf/protobuf:${GOPATH}/src/github.com/gogo/protobuf:${GOPATH}/src"

### Documentation generation

# e2sub
protoc --proto_path=$proto_path \
--doc_out=docs/onos/e2sub \
--doc_opt=markdown,endpoint.md \
Expand All @@ -15,6 +17,8 @@ protoc --proto_path=$proto_path \
--doc_out=docs/onos/e2sub \
--doc_opt=markdown,task.md \
proto/onos/e2sub/task/task.proto

# e2t
protoc --proto_path=$proto_path \
--doc_out=docs/onos/e2t \
--doc_opt=markdown,admin.md \
Expand All @@ -23,11 +27,14 @@ protoc --proto_path=$proto_path \
--doc_out=docs/onos/e2t \
--doc_opt=markdown,e2.md \
proto/onos/e2t/e2/e2.proto

# topo
protoc --proto_path=$proto_path \
--doc_out=docs/onos/topo \
--doc_opt=markdown,topo.md \
proto/onos/topo/topo.proto

# config
protoc --proto_path=$proto_path \
--doc_out=docs/onos/config \
--doc_opt=markdown,admin.md \
Expand Down Expand Up @@ -61,11 +68,34 @@ protoc --proto_path=$proto_path \
--doc_opt=markdown,network_snapshot.md \
proto/onos/config/snapshot/network/types.proto

# kpimon
protoc --proto_path=$proto_path \
--doc_out=docs/onos/kpimon \
--doc_opt=markdown,kpimon.md \
proto/onos/kpimon/kpimon.proto

# ransim
protoc --proto_path=$proto_path \
--doc_out=docs/onos/ransim \
--doc_opt=markdown,metrics.md \
proto/onos/ransim/metrics/metrics.proto


protoc --proto_path=$proto_path \
--doc_out=docs/onos/ransim \
--doc_opt=markdown,model.md \
proto/onos/ransim/model/model.proto

protoc --proto_path=$proto_path \
--doc_out=docs/onos/ransim \
--doc_opt=markdown,trafficsim.md \
proto/onos/ransim/trafficsim/trafficsim.proto

protoc --proto_path=$proto_path \
--doc_out=docs/onos/ransim \
--doc_opt=markdown,types.md \
proto/onos/ransim/types/types.proto


### Go Protobuf code generation
go_import_paths="Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types"
Expand All @@ -78,7 +108,8 @@ go_import_paths="${go_import_paths},Monos/config/change/device/types.proto=githu
go_import_paths="${go_import_paths},Monos/config/change/network/types.proto=github.com/onosproject/onos-api/go/onos/config/change/network"
go_import_paths="${go_import_paths},Monos/config/snapshot/types.proto=github.com/onosproject/onos-api/go/onos/config/snapshot"
go_import_paths="${go_import_paths},Monos/config/snapshot/device/types.proto=github.com/onosproject/onos-api/go/onos/config/snapshot/device"

go_import_paths="${go_import_paths},Monos/ransim/types/types.proto=github.com/onosproject/onos-api/go/onos/ransim/types"
# e2sub
protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/e2sub/endpoint,plugins=grpc:./go \
proto/onos/e2sub/endpoint/*.proto
Expand All @@ -88,6 +119,8 @@ protoc --proto_path=$proto_path \
protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/e2sub/task,plugins=grpc:./go \
proto/onos/e2sub/task/*.proto

# e2t
protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/e2t/admin,plugins=grpc:./go \
proto/onos/e2t/admin/*.proto
Expand All @@ -98,6 +131,7 @@ protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/topo,plugins=grpc:./go \
proto/onos/topo/*.proto

# config
protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/config/change,plugins=grpc:./go \
proto/onos/config/change/*.proto
Expand Down Expand Up @@ -125,11 +159,28 @@ protoc --proto_path=$proto_path \
--gogo_out=$go_import_paths,import_path=onos/config/admin,plugins=grpc:./go \
proto/onos/config/admin/*.proto


# kpimon
protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/kpimon,plugins=grpc:./go \
proto/onos/kpimon/*.proto

# ransim
protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/ransim/metrics,plugins=grpc:./go \
proto/onos/ransim/metrics/*.proto

protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/ransim/model,plugins=grpc:./go \
proto/onos/ransim/model/*.proto

protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/ransim/trafficsim,plugins=grpc:./go \
proto/onos/ransim/trafficsim/*.proto

protoc --proto_path=$proto_path \
--gogofaster_out=$go_import_paths,import_path=onos/ransim/types,plugins=grpc:./go \
proto/onos/ransim/types/*.proto


### Python Protobuf code generation
Expand Down
274 changes: 274 additions & 0 deletions docs/onos/ransim/metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
# Protocol Documentation
<a name="top"></a>

## Table of Contents

- [onos/ransim/metrics/metrics.proto](#onos/ransim/metrics/metrics.proto)
- [DeleteAllRequest](#onos.ransim.metrics.DeleteAllRequest)
- [DeleteAllResponse](#onos.ransim.metrics.DeleteAllResponse)
- [DeleteRequest](#onos.ransim.metrics.DeleteRequest)
- [DeleteResponse](#onos.ransim.metrics.DeleteResponse)
- [GetRequest](#onos.ransim.metrics.GetRequest)
- [GetResponse](#onos.ransim.metrics.GetResponse)
- [ListRequest](#onos.ransim.metrics.ListRequest)
- [ListResponse](#onos.ransim.metrics.ListResponse)
- [Metric](#onos.ransim.metrics.Metric)
- [SetRequest](#onos.ransim.metrics.SetRequest)
- [SetResponse](#onos.ransim.metrics.SetResponse)
- [WatchRequest](#onos.ransim.metrics.WatchRequest)
- [WatchResponse](#onos.ransim.metrics.WatchResponse)

- [EventType](#onos.ransim.metrics.EventType)

- [MetricsService](#onos.ransim.metrics.MetricsService)

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



<a name="onos/ransim/metrics/metrics.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## onos/ransim/metrics/metrics.proto



<a name="onos.ransim.metrics.DeleteAllRequest"></a>

### DeleteAllRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entityid | [uint64](#uint64) | | |






<a name="onos.ransim.metrics.DeleteAllResponse"></a>

### DeleteAllResponse







<a name="onos.ransim.metrics.DeleteRequest"></a>

### DeleteRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entityid | [uint64](#uint64) | | |
| name | [string](#string) | | |






<a name="onos.ransim.metrics.DeleteResponse"></a>

### DeleteResponse







<a name="onos.ransim.metrics.GetRequest"></a>

### GetRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entityid | [uint64](#uint64) | | |
| name | [string](#string) | | |






<a name="onos.ransim.metrics.GetResponse"></a>

### GetResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| metric | [Metric](#onos.ransim.metrics.Metric) | | |






<a name="onos.ransim.metrics.ListRequest"></a>

### ListRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entityid | [uint64](#uint64) | | |






<a name="onos.ransim.metrics.ListResponse"></a>

### ListResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entityid | [uint64](#uint64) | | |
| metrics | [Metric](#onos.ransim.metrics.Metric) | repeated | |






<a name="onos.ransim.metrics.Metric"></a>

### Metric



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entityid | [uint64](#uint64) | | |
| key | [string](#string) | | |
| value | [string](#string) | | |
| type | [string](#string) | | intX, uintX, floatX, string; X := {8|16|32|64} |






<a name="onos.ransim.metrics.SetRequest"></a>

### SetRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| metric | [Metric](#onos.ransim.metrics.Metric) | | |






<a name="onos.ransim.metrics.SetResponse"></a>

### SetResponse







<a name="onos.ransim.metrics.WatchRequest"></a>

### WatchRequest







<a name="onos.ransim.metrics.WatchResponse"></a>

### WatchResponse



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| metric | [Metric](#onos.ransim.metrics.Metric) | | |
| type | [EventType](#onos.ransim.metrics.EventType) | | |








<a name="onos.ransim.metrics.EventType"></a>

### EventType
Change event type

| Name | Number | Description |
| ---- | ------ | ----------- |
| NONE | 0 | NONE indicates unknown event type |
| UPDATED | 1 | UPDATED indicates a metric value was set (updated) |
| DELETED | 2 | DELETED indicates a metric was deleted |







<a name="onos.ransim.metrics.MetricsService"></a>

### MetricsService
Model provides means to create, delete and read RAN simulation model.

| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| List | [ListRequest](#onos.ransim.metrics.ListRequest) | [ListResponse](#onos.ransim.metrics.ListResponse) | List returns an array of all metrics for the specified entity (Node, Cell or UE) |
| Set | [SetRequest](#onos.ransim.metrics.SetRequest) | [SetResponse](#onos.ransim.metrics.SetResponse) | Set sets value of the named metric for the specified entity |
| Get | [GetRequest](#onos.ransim.metrics.GetRequest) | [GetResponse](#onos.ransim.metrics.GetResponse) | Get retrieves the named metric for the specified entity |
| Delete | [DeleteRequest](#onos.ransim.metrics.DeleteRequest) | [DeleteResponse](#onos.ransim.metrics.DeleteResponse) | Delete deletes the the named metric for the specified entity |
| DeleteAll | [DeleteAllRequest](#onos.ransim.metrics.DeleteAllRequest) | [DeleteAllResponse](#onos.ransim.metrics.DeleteAllResponse) | DeleteAll deletes all metrics for the specified entity |
| Watch | [WatchRequest](#onos.ransim.metrics.WatchRequest) | [WatchResponse](#onos.ransim.metrics.WatchResponse) stream | Watch returns a stream of ongoing changes to the metrics |





## 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