Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
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
Show more breadcrumbs
danet
goSDN
Commits
a790b435
Commit
a790b435
authored
4 years ago
by
Manuel Kieweg
Browse files
Options
Downloads
Plain Diff
merge develop into thesis-mk
parents
2bf91409
8bf70e08
No related branches found
No related tags found
2 merge requests
!221
Thesis mk
,
!173
Process response overhaul
Pipeline
#74469
passed with warnings
4 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
go.sum
+0
-2
0 additions, 2 deletions
go.sum
northbound/server/core.go
+18
-3
18 additions, 3 deletions
northbound/server/core.go
with
18 additions
and
5 deletions
go.sum
+
0
−
2
View file @
a790b435
...
@@ -27,8 +27,6 @@ code.fbi.h-da.de/cocsn/api/go v0.0.0-20210609143151-4dabee5ab99a/go.mod h1:2+rnE
...
@@ -27,8 +27,6 @@ code.fbi.h-da.de/cocsn/api/go v0.0.0-20210609143151-4dabee5ab99a/go.mod h1:2+rnE
code.fbi.h-da.de/cocsn/gosdn
v0.0.3-0.20210609130706-9cca50b3d195/go.mod h1:
EK0GUnwNB+qMMjSJxGzLpfDw+KsUHS2LZkdzshldm4Q=
code.fbi.h-da.de/cocsn/gosdn
v0.0.3-0.20210609130706-9cca50b3d195/go.mod h1:
EK0GUnwNB+qMMjSJxGzLpfDw+KsUHS2LZkdzshldm4Q=
code.fbi.h-da.de/cocsn/gosdn/api
v0.0.0-20210610093733-cbc69d7e537d h1:
olcB+ojVhToetF73X1waLRaTG7oZpdFvZ2yUIAKiiI8=
code.fbi.h-da.de/cocsn/gosdn/api
v0.0.0-20210610093733-cbc69d7e537d h1:
olcB+ojVhToetF73X1waLRaTG7oZpdFvZ2yUIAKiiI8=
code.fbi.h-da.de/cocsn/gosdn/api
v0.0.0-20210610093733-cbc69d7e537d/go.mod h1:
rn/FEXBauGQyFOIS2NhGd0EzF29Ibds0xt34Oo5wTgk=
code.fbi.h-da.de/cocsn/gosdn/api
v0.0.0-20210610093733-cbc69d7e537d/go.mod h1:
rn/FEXBauGQyFOIS2NhGd0EzF29Ibds0xt34Oo5wTgk=
code.fbi.h-da.de/cocsn/api/go
v0.0.0-20210609143151-4dabee5ab99a h1:
C2tdh2A4RckZJXUymtF2ec8hE8mTkhn7EQJShv+i/Jk=
code.fbi.h-da.de/cocsn/api/go
v0.0.0-20210609143151-4dabee5ab99a/go.mod h1:
2+rnE92IyXLbiy3/92EM7JrtsY5tXPAKX90QmsT2+m0=
code.fbi.h-da.de/cocsn/yang-models
v0.0.7 h1:
3TOo8J+EdAJKeq4o3aaNWZRhjSwguIS8wciW1U9PkSk=
code.fbi.h-da.de/cocsn/yang-models
v0.0.7 h1:
3TOo8J+EdAJKeq4o3aaNWZRhjSwguIS8wciW1U9PkSk=
code.fbi.h-da.de/cocsn/yang-models
v0.0.7/go.mod h1:
M+2HinfhTT8nA8qvn2cpWNlOtuiizTNDWA3yfy72K/g=
code.fbi.h-da.de/cocsn/yang-models
v0.0.7/go.mod h1:
M+2HinfhTT8nA8qvn2cpWNlOtuiizTNDWA3yfy72K/g=
dmitri.shuralyov.com/gpu/mtl
v0.0.0-20190408044501-666a987793e9/go.mod h1:
H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/gpu/mtl
v0.0.0-20190408044501-666a987793e9/go.mod h1:
H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
...
...
This diff is collapsed.
Click to expand it.
northbound/server/core.go
+
18
−
3
View file @
a790b435
...
@@ -9,6 +9,8 @@ import (
...
@@ -9,6 +9,8 @@ import (
spb
"code.fbi.h-da.de/cocsn/api/go/gosdn/southbound"
spb
"code.fbi.h-da.de/cocsn/api/go/gosdn/southbound"
"code.fbi.h-da.de/cocsn/gosdn/nucleus"
"code.fbi.h-da.de/cocsn/gosdn/nucleus"
"github.com/google/uuid"
"github.com/google/uuid"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
)
type
core
struct
{
type
core
struct
{
...
@@ -24,7 +26,7 @@ func (s core) Get(ctx context.Context, request *pb.GetRequest) (*pb.GetResponse,
...
@@ -24,7 +26,7 @@ func (s core) Get(ctx context.Context, request *pb.GetRequest) (*pb.GetResponse,
var
err
error
var
err
error
pndList
,
err
=
stringToUUID
(
request
.
Pid
)
pndList
,
err
=
stringToUUID
(
request
.
Pid
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
status
.
Errorf
(
codes
.
Aborted
,
"%v"
,
err
)
}
}
}
}
...
@@ -34,10 +36,23 @@ func (s core) Get(ctx context.Context, request *pb.GetRequest) (*pb.GetResponse,
...
@@ -34,10 +36,23 @@ func (s core) Get(ctx context.Context, request *pb.GetRequest) (*pb.GetResponse,
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
ond
,
err
:=
fillOnds
(
pnd
,
true
)
if
err
!=
nil
{
return
nil
,
status
.
Errorf
(
codes
.
Aborted
,
"%v"
,
err
)
}
sbi
,
err
:=
fillSbis
(
pnd
,
true
)
if
err
!=
nil
{
return
nil
,
status
.
Errorf
(
codes
.
Aborted
,
"%v"
,
err
)
}
pnds
[
i
]
=
&
ppb
.
PrincipalNetworkDomain
{
pnds
[
i
]
=
&
ppb
.
PrincipalNetworkDomain
{
Id
:
pnd
.
ID
()
.
String
(),
Id
:
pnd
.
ID
()
.
String
(),
Name
:
pnd
.
GetName
(),
Name
:
pnd
.
GetName
(),
Description
:
pnd
.
GetDescription
(),
Description
:
pnd
.
GetDescription
(),
Ond
:
ond
,
Sbi
:
sbi
,
}
}
}
}
return
&
pb
.
GetResponse
{
return
&
pb
.
GetResponse
{
...
@@ -52,10 +67,10 @@ func (s core) Set(ctx context.Context, request *pb.SetRequest) (*pb.SetResponse,
...
@@ -52,10 +67,10 @@ func (s core) Set(ctx context.Context, request *pb.SetRequest) (*pb.SetResponse,
pnd
,
err
:=
nucleus
.
NewPND
(
r
.
Name
,
r
.
Description
,
uuid
.
New
(),
sbi
,
nil
,
nil
)
pnd
,
err
:=
nucleus
.
NewPND
(
r
.
Name
,
r
.
Description
,
uuid
.
New
(),
sbi
,
nil
,
nil
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
status
.
Errorf
(
codes
.
Aborted
,
"%v"
,
err
)
}
}
if
err
:=
pndc
.
Add
(
pnd
);
err
!=
nil
{
if
err
:=
pndc
.
Add
(
pnd
);
err
!=
nil
{
return
nil
,
err
return
nil
,
status
.
Errorf
(
codes
.
Aborted
,
"%v"
,
err
)
}
}
}
}
return
&
pb
.
SetResponse
{
return
&
pb
.
SetResponse
{
...
...
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