Skip to content
Snippets Groups Projects

Develop

Merged Ghost User requested to merge develop into master
4 files
+ 28
51
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 4
7
package nucleus
import (
yangPro "code.fbi.h-da.de/cocsn/yang-modules/generated/ciena"
"fmt"
"github.com/openconfig/ygot/ygot"
"net"
yangPro "gosdn/yang-processor"
)
// This is a test function in order to see how to generate JSON encoded openconfig stuff
@@ -17,14 +17,11 @@ func AssembleJSON() {
for _, iface := range interfaces {
fmt.Println(iface.Name)
i, err := d.WaveserverInterfaces.NewLogicalInterface("en0")
i, err := d.NewInterface(iface.Name)
if err != nil {
panic(err)
}
i.State = &yangPro.CienaWaveserverInterfaces_WaveserverInterfaces_LogicalInterface_State{
AdminState: 0,
OperationalState: 0,
}
i.Mtu = ygot.Uint16(234)
//i.Mtu = ygot.Uint16(iface.MTU)
}
@@ -49,4 +46,4 @@ func AssembleJSON() {
panic(fmt.Sprintf("Cannot unmarshal JSON: %v", err))
}
}
}
\ No newline at end of file
Loading