Skip to content
Snippets Groups Projects

Process response overhaul

Merged Ghost User requested to merge process-response-overhaul into develop
2 files
+ 10
3
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 5
3
@@ -9,6 +9,7 @@ import (
spb "code.fbi.h-da.de/cocsn/api/go/gosdn/southbound"
tpb "code.fbi.h-da.de/cocsn/api/go/gosdn/transport"
nbi "code.fbi.h-da.de/cocsn/gosdn/northbound/client"
"github.com/google/uuid"
log "github.com/sirupsen/logrus"
"github.com/spf13/viper"
@@ -41,7 +42,7 @@ func Init(addr string) error {
log.Infof("SBI: %v", sbi)
}
}
return nil
return viper.WriteConfig()
}
// GetIds requests all UUID information from the controller
@@ -184,7 +185,7 @@ func AddDevice(addr, username, password, sbi, pnd, deviceAddress, deviceName str
},
DeviceName: deviceName,
TransportOption: &tpb.TransportOption{
Address: addr,
Address: deviceAddress,
Username: username,
Password: password,
TransportOption: &tpb.TransportOption_GnmiTransportOption{
@@ -196,7 +197,8 @@ func AddDevice(addr, username, password, sbi, pnd, deviceAddress, deviceName str
Pid: pnd,
}
if sbi == "csbi" {
req.Ond[0].Sbi = nil
req.Ond[0].Sbi.Id = uuid.Nil.String()
req.Ond[0].Sbi.Type = spb.Type_CONTAINERISED
req.Ond[0].TransportOption.Csbi = true
}
ctx := context.Background()
Loading