Skip to content
Snippets Groups Projects
Commit 5dfc3e0b authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

request works w/oc

parent 9f648afd
No related branches found
No related tags found
2 merge requests!221Thesis mk,!173Process response overhaul
Pipeline #76763 passed with warnings
...@@ -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")
} }
} }
} }
......
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())
} }
...@@ -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...)
} }
} }
......
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment