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
1386b857
Commit
1386b857
authored
4 years ago
by
Manuel Kieweg
Browse files
Options
Downloads
Patches
Plain Diff
first nbi draft
parent
bde92183
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cocsn-v0.0.1.yml
+0
-98
0 additions, 98 deletions
cocsn-v0.0.1.yml
proto/nbi/gosdn.proto
+94
-0
94 additions, 0 deletions
proto/nbi/gosdn.proto
with
94 additions
and
98 deletions
cocsn-v0.0.1.yml
deleted
100644 → 0
+
0
−
98
View file @
bde92183
swagger
:
'
2.0'
info
:
version
:
'
0.0.1'
title
:
CoCSN
description
:
Simple RESTCONF API
contact
:
name
:
Your name
basePath
:
/restconf
schemes
:
-
http
consumes
:
-
application/json
produces
:
-
application/json
paths
:
/data/cocsn-interfaces
:
get
:
summary
:
'
Returns
a
list
of
interfaces'
operationId
:
getInterfaces
tags
:
-
interface
produces
:
-
application/json
responses
:
200
:
description
:
OK
schema
:
$ref
:
'
#/definitions/Interfaces'
404
:
description
:
An error occurred.
default
:
description
:
Unexpected error
/data/cocsn-interface/{interface}/ip-addresses
:
get
:
summary
:
'
Returns
IP
addresses
of
an
interface'
operationId
:
getIPAddresses
parameters
:
-
in
:
path
name
:
interface
description
:
interface to fetch
required
:
true
type
:
string
tags
:
-
interface
produces
:
-
application/json
responses
:
200
:
description
:
OK
schema
:
$ref
:
'
#/definitions/LogicalAddresses'
404
:
description
:
An error occurred.
default
:
description
:
Unexpected error
/data/cocsn-interface/{interface}/mac-address
:
get
:
summary
:
'
Returns
MAC
address
of
an
interface'
operationId
:
getMACAddress
parameters
:
-
in
:
path
name
:
interface
description
:
interface to fetch
required
:
true
type
:
string
tags
:
-
interface
produces
:
-
application/json
responses
:
200
:
description
:
OK
schema
:
$ref
:
'
#/definitions/PhysicalAddress'
404
:
description
:
An error occurred.
default
:
description
:
Unexpected error
definitions
:
Interfaces
:
type
:
array
items
:
type
:
string
properties
:
name
:
type
:
string
PhysicalAddress
:
type
:
string
properties
:
name
:
type
:
string
LogicalAddresses
:
type
:
array
items
:
type
:
string
properties
:
name
:
type
:
string
\ No newline at end of file
This diff is collapsed.
Click to expand it.
proto/nbi/gosdn.proto
0 → 100644
+
94
−
0
View file @
1386b857
syntax
=
"proto3"
;
package
gosdn
;
import
"github.com/openconfig/gnmi/proto/gnmi/gnmi.proto"
;
option
(
pnd_service
)
=
"0.0.1"
;
option
go_package
=
"code.fbi.h-da.de/cocsn/api/proto/gosdn"
;
service
pnd
{
rpc
Get
(
GetRequest
)
returns
(
GetResponse
);
rpc
Set
(
SetRequest
)
returns
(
SetResponse
);
}
message
GetRequest
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
enum
get_type
{
PND
=
0
;
OND
=
1
;
ONDS
=
2
;
SBI
=
3
;
SBIS
=
4
;
Changes
=
5
;
}
get_type
type
=
2
;
string
id
=
3
;
}
message
GetResponse
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
oneof
get_oneof
{
PrincipalNetworkingDomain
pnd
=
2
;
OrchestratedNetworkingDevice
ond
=
3
;
OrchestratedNetworkingDevices
onds
=
4
;
SouthboundInterface
sbi
=
5
;
SouthboundInterfaces
sbis
=
6
;
Changes
changes
=
7
;
}
}
message
SetRequest
{}
message
SetResponse
{}
message
PrincipalNetworkingDomain
{
string
id
=
1
;
string
name
=
2
;
string
description
=
3
;
map
<
string
,
OrchestratedNetworkingDevice
>
onds
=
4
;
map
<
string
,
SouthboundInterface
>
sbis
=
5
;
map
<
string
,
Change
>
changes
=
6
;
}
message
SouthboundInterface
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
string
id
=
2
;
string
schema
=
3
;
}
message
OrchestratedNetworkingDevice
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
string
id
=
2
;
string
name
=
3
;
gnmi.Notification
device
=
4
;
}
message
SouthboundInterfaces
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
map
<
string
,
SouthboundInterface
>
sbis
=
2
;
}
message
OrchestratedNetworkingDevices
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
map
<
string
,
OrchestratedNetworkingDevice
>
sbis
=
2
;
}
message
Change
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
string
id
=
2
;
int64
age
=
3
;
enum
state
{
PENDING
=
0
;
COMMITTED
=
1
;
CONFIRMED
=
2
;
}
}
message
Changes
{
int64
timestamp
=
1
;
// Timestamp in nanoseconds since Epoch.
map
<
string
,
Change
>
sbis
=
2
;
}
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