Skip to content
Snippets Groups Projects
southbound.go 902 B
Newer Older
  • Learn to ignore specific revisions
  • Manuel Kieweg's avatar
    Manuel Kieweg committed
    package nucleus
    
    
    import (
    	"code.fbi.h-da.de/cocsn/gosdn/nucleus/util"
    	"code.fbi.h-da.de/cocsn/yang-models/generated/openconfig"
    	"github.com/openconfig/ygot/ytypes"
    )
    
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    // SouthboundInterface provides an
    // interface for SBI implementations
    type SouthboundInterface interface {
    
    	// Deprecated
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	SbiIdentifier() string
    
    
    	Schema() (*ytypes.Schema, error)
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    }
    
    type Tapi struct {
    }
    
    type OpenConfig struct {
    
    	schema    *ytypes.Schema
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    func (oc *OpenConfig) SbiIdentifier() string {
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	return "openconfig"
    }
    
    
    func (oc *OpenConfig) Schema() (*ytypes.Schema, error) {
    	return openconfig.Schema()
    }
    
    
    func (oc *OpenConfig) OpenconfigInterfaces(device Device) {
    	resp, err := oc.transport.Get(nil, nil...)
    	if err != nil {
    
    	}
    	device.Add(resp)
    
    
    func (oc *OpenConfig) GetFullDeviceInfo(device Device) error {
    	paths := util.NewPaths()
    	paths.ParseSchema(oc.schema, "device")
    
    	return nil
    }