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
5dfc3e0b
Commit
5dfc3e0b
authored
3 years ago
by
Manuel Kieweg
Browse files
Options
Downloads
Patches
Plain Diff
request works w/oc
parent
9f648afd
No related branches found
No related tags found
2 merge requests
!221
Thesis mk
,
!173
Process response overhaul
Pipeline
#76763
passed with warnings
3 years ago
Stage: test
Stage: .post
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
controller.go
+2
-4
2 additions, 4 deletions
controller.go
nucleus/device.go
+1
-3
1 addition, 3 deletions
nucleus/device.go
nucleus/southbound.go
+1
-1
1 addition, 1 deletion
nucleus/southbound.go
nucleus/store.go
+1
-1
1 addition, 1 deletion
nucleus/store.go
with
5 additions
and
9 deletions
controller.go
+
2
−
4
View file @
5dfc3e0b
...
@@ -7,7 +7,7 @@ import (
...
@@ -7,7 +7,7 @@ import (
"os"
"os"
"os/signal"
"os/signal"
"sync"
"sync"
"
time
"
"
syscall
"
"github.com/google/uuid"
"github.com/google/uuid"
log
"github.com/sirupsen/logrus"
log
"github.com/sirupsen/logrus"
...
@@ -52,7 +52,7 @@ func init() {
...
@@ -52,7 +52,7 @@ func init() {
}
}
// Setting up signal capturing
// Setting up signal capturing
signal
.
Notify
(
c
.
stopChan
,
os
.
Interrupt
)
signal
.
Notify
(
c
.
stopChan
,
os
.
Interrupt
,
syscall
.
SIGTERM
)
}
}
// initialize does start-up housekeeping like reading controller config files
// initialize does start-up housekeeping like reading controller config files
...
@@ -127,8 +127,6 @@ func Run(ctx context.Context) error {
...
@@ -127,8 +127,6 @@ func Run(ctx context.Context) error {
return
shutdown
()
return
shutdown
()
case
<-
ctx
.
Done
()
:
case
<-
ctx
.
Done
()
:
return
shutdown
()
return
shutdown
()
case
<-
time
.
Tick
(
time
.
Minute
)
:
log
.
Debug
(
"up and running"
)
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
nucleus/device.go
+
1
−
3
View file @
5dfc3e0b
package
nucleus
package
nucleus
import
(
import
(
"code.fbi.h-da.de/cocsn/gosdn/nucleus/errors"
tpb
"code.fbi.h-da.de/cocsn/api/go/gosdn/transport"
tpb
"code.fbi.h-da.de/cocsn/api/go/gosdn/transport"
"code.fbi.h-da.de/cocsn/gosdn/interfaces/device"
"code.fbi.h-da.de/cocsn/gosdn/interfaces/device"
"code.fbi.h-da.de/cocsn/gosdn/interfaces/southbound"
"code.fbi.h-da.de/cocsn/gosdn/interfaces/southbound"
...
@@ -134,5 +132,5 @@ func (d *CsbiDevice) SBI() southbound.SouthboundInterface {
...
@@ -134,5 +132,5 @@ func (d *CsbiDevice) SBI() southbound.SouthboundInterface {
}
}
func
(
d
*
CsbiDevice
)
ProcessResponse
(
resp
proto
.
Message
)
error
{
func
(
d
*
CsbiDevice
)
ProcessResponse
(
resp
proto
.
Message
)
error
{
return
&
errors
.
ErrNotYetImplemented
{}
return
d
.
transport
.
ProcessResponse
(
resp
,
d
.
GoStruct
,
d
.
sbi
.
Schema
())
}
}
This diff is collapsed.
Click to expand it.
nucleus/southbound.go
+
1
−
1
View file @
5dfc3e0b
...
@@ -166,7 +166,7 @@ func (csbi *Csbi) SbiIdentifier() string {
...
@@ -166,7 +166,7 @@ func (csbi *Csbi) SbiIdentifier() string {
func
(
csbi
*
Csbi
)
SetNode
()
func
(
schema
*
yang
.
Entry
,
root
interface
{},
path
*
gpb
.
Path
,
val
interface
{},
opts
...
ytypes
.
SetNodeOpt
)
error
{
func
(
csbi
*
Csbi
)
SetNode
()
func
(
schema
*
yang
.
Entry
,
root
interface
{},
path
*
gpb
.
Path
,
val
interface
{},
opts
...
ytypes
.
SetNodeOpt
)
error
{
return
func
(
schema
*
yang
.
Entry
,
root
interface
{},
path
*
gpb
.
Path
,
val
interface
{},
opts
...
ytypes
.
SetNodeOpt
)
error
{
return
func
(
schema
*
yang
.
Entry
,
root
interface
{},
path
*
gpb
.
Path
,
val
interface
{},
opts
...
ytypes
.
SetNodeOpt
)
error
{
return
&
errors
.
ErrNotYetImplemented
{}
return
ytypes
.
SetNode
(
schema
,
root
.
(
*
openconfig
.
Device
),
path
,
val
,
opts
...
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
nucleus/store.go
+
1
−
1
View file @
5dfc3e0b
...
@@ -222,7 +222,7 @@ func (s DeviceStore) GetDevice(id uuid.UUID, parseErrors ...error) (device.Devic
...
@@ -222,7 +222,7 @@ func (s DeviceStore) GetDevice(id uuid.UUID, parseErrors ...error) (device.Devic
}
}
log
.
WithFields
(
log
.
Fields
{
log
.
WithFields
(
log
.
Fields
{
"uuid"
:
id
,
"uuid"
:
id
,
"name"
:
d
.
Name
,
"name"
:
d
.
Name
()
,
})
.
Debug
(
"device was accessed"
)
})
.
Debug
(
"device was accessed"
)
return
d
,
nil
return
d
,
nil
...
...
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