Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goSDN Northbound
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
danet
goSDN Northbound
Commits
e7d5fcef
Commit
e7d5fcef
authored
3 years ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
removed 'oneof' within proto/core and proto/pnd
Created new RPCs for each 'oneof'.
parent
5b2ddd70
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-1
1 addition, 1 deletion
.gitignore
README.md
+3
-2
3 additions, 2 deletions
README.md
proto/gosdn/core/core.proto
+14
-6
14 additions, 6 deletions
proto/gosdn/core/core.proto
proto/gosdn/pnd/pnd.proto
+81
-30
81 additions, 30 deletions
proto/gosdn/pnd/pnd.proto
with
99 additions
and
39 deletions
.gitignore
+
1
−
1
View file @
e7d5fcef
.idea/
buf.lock
This diff is collapsed.
Click to expand it.
README.md
+
3
−
2
View file @
e7d5fcef
# CoCSN API
Protocol buffer definitions for goSDN gRPC API. To generate
run the following command inside the repo root.
Protocol buffer definitions for goSDN gRPC API. To generate
you need
[
buf
](
https://buf.build/
)
and the following commands:
```
sh
protoc
--proto_path
=
./proto
--proto_path
=
./deps
--go_out
=
./go
--go-grpc_out
=
./go
--go-grpc_opt
=
paths
=
source_relative
--go_opt
=
paths
=
source_relative
$(
find proto |
grep
.proto
)
buf mod update
#from within the proto dictionary
buf generate
```
This diff is collapsed.
Click to expand it.
proto/gosdn/core/core.proto
+
14
−
6
View file @
e7d5fcef
...
...
@@ -7,20 +7,28 @@ import "gosdn/pnd/pnd.proto";
option
go_package
=
"code.fbi.h-da.de/danet/api/go/gosdn/core"
;
service
core
{
rpc
Get
(
GetRequest
)
returns
(
GetResponse
);
rpc
Set
(
SetRequest
)
returns
(
SetResponse
);
rpc
GetPnd
(
GetPndRequest
)
returns
(
GetPndResponse
);
rpc
GetPndList
(
GetPndListRequest
)
returns
(
GetPndResponse
);
rpc
SetPnd
(
SetPndRequest
)
returns
(
SetPndResponse
);
}
message
GetRequest
{
message
GetPndListRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
}
message
GetPndRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
bool
all
=
2
;
repeated
string
pid
=
3
;
}
message
GetResponse
{
message
GetPndResponse
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
repeated
.
gosdn.pnd.PrincipalNetworkDomain
pnd
=
2
;
}
message
SetRequest
{
message
SetPndRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
repeated
setPnd
pnd
=
2
;
}
...
...
@@ -31,7 +39,7 @@ message setPnd {
string
sbi
=
3
;
}
message
SetResponse
{
message
Set
Pnd
Response
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
enum
status
{
OK
=
0
;
...
...
This diff is collapsed.
Click to expand it.
proto/gosdn/pnd/pnd.proto
+
81
−
30
View file @
e7d5fcef
...
...
@@ -10,60 +10,111 @@ import "gosdn/southbound/southbound.proto";
option
go_package
=
"code.fbi.h-da.de/danet/api/go/gosdn/pnd"
;
service
pnd
{
rpc
Get
(
GetRequest
)
returns
(
GetResponse
);
// Allows to request Orchestrated Networking Devices which are managed by a
// specific Principal Network Domain.
rpc
GetOnd
(
GetOndRequest
)
returns
(
GetOndResponse
);
rpc
GetOndList
(
GetOndListRequest
)
returns
(
GetOndResponse
);
// Allows to request the Southbound Interfaces a specific Principal Network
// Domain supports.
rpc
GetSbi
(
GetSbiRequest
)
returns
(
GetSbiResponse
);
rpc
GetSbiList
(
GetSbiListRequest
)
returns
(
GetSbiResponse
);
// Allows to request Changes registered for a specific Principal Network Domain.
rpc
GetChange
(
GetChangeRequest
)
returns
(
GetChangeResponse
);
rpc
GetChangeList
(
GetSbiListRequest
)
returns
(
GetChangeResponse
);
// Allows to request a specific Path of a Orchestrated Networking Device,
// managed by a specific Principal Network Domain.
rpc
GetPath
(
GetPathRequest
)
returns
(
GetPathResponse
);
rpc
Set
(
SetRequest
)
returns
(
SetResponse
);
rpc
Delete
(
DeleteRequest
)
returns
(
DeleteResponse
);
}
message
GetRequest
{
message
Get
OndList
Request
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
oneof
request
{
getPnd
pnd
=
2
;
getOnd
ond
=
3
;
getSbi
sbi
=
4
;
getChange
change
=
5
;
getPath
path
=
7
;
}
string
pid
=
6
;
string
pid
=
4
;
}
message
getPnd
{}
message
GetOndRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
bool
all
=
2
;
repeated
string
did
=
3
;
string
pid
=
4
;
}
message
getOnd
{
bool
all
=
1
;
repeated
string
d
id
=
2
;
message
GetSbiListRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
string
p
id
=
4
;
}
message
getSbi
{
bool
all
=
1
;
repeated
string
sid
=
2
;
message
GetSbiRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
bool
all
=
2
;
repeated
string
sid
=
3
;
string
pid
=
4
;
}
message
g
etChange
{
bool
all
=
1
;
repeated
string
cu
id
=
2
;
message
G
etChange
ListRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
string
p
id
=
4
;
}
message
getPath
{
string
did
=
1
;
string
path
=
2
;
message
GetChangeRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
bool
all
=
2
;
repeated
string
cuid
=
3
;
string
pid
=
4
;
}
message
GetPathRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
string
did
=
2
;
string
path
=
3
;
string
pid
=
4
;
}
message
GetOndResponse
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain
pnd
=
2
;
repeated
OrchestratedNetworkingDevice
ond
=
3
;
}
message
GetResponse
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
PrincipalNetworkDomain
pnd
=
2
;
repeated
OrchestratedNetworkingDevice
ond
=
3
;
repeated
.
gosdn.southbound.SouthboundInterface
sbi
=
5
;
repeated
Change
change
=
7
;
PrincipalNetworkDomain
pnd
=
2
;
repeated
OrchestratedNetworkingDevice
ond
=
3
;
repeated
.
gosdn.southbound.SouthboundInterface
sbi
=
5
;
repeated
Change
change
=
7
;
}
message
GetSbiResponse
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain
pnd
=
2
;
repeated
.
gosdn.southbound.SouthboundInterface
sbi
=
3
;
}
message
GetPathResponse
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain
pnd
=
2
;
Change
change
=
3
;
}
message
GetChangeResponse
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
// TODO: Check if this is really needed. Perhaps a reference to the PND's ID
// is also sufficient.
PrincipalNetworkDomain
pnd
=
2
;
repeated
Change
change
=
3
;
}
message
PrincipalNetworkDomain
{
string
id
=
1
;
string
name
=
2
;
string
description
=
3
;
repeated
OrchestratedNetworkingDevice
ond
=
4
;
repeated
.
gosdn.southbound.SouthboundInterface
sbi
=
5
;
repeated
Change
change
=
6
;
}
message
OrchestratedNetworkingDevice
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment