Skip to content
Snippets Groups Projects
pnd.go 1.56 KiB
Newer Older
  • Learn to ignore specific revisions
  • package networkdomain
    
    import (
    
    	ppb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/pnd"
    	tpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/transport"
    	"code.fbi.h-da.de/danet/gosdn/controller/interfaces/change"
    	"code.fbi.h-da.de/danet/gosdn/controller/interfaces/device"
    	"code.fbi.h-da.de/danet/gosdn/controller/interfaces/southbound"
    
    	"github.com/google/uuid"
    
    	"google.golang.org/protobuf/proto"
    
    )
    
    // NetworkDomain provides an interface for network domain implementations
    // like principal network domain or logical network domain.
    type NetworkDomain interface {
    	Destroy() error
    	AddSbi(s southbound.SouthboundInterface) error
    	RemoveSbi(uuid.UUID) error
    
    	AddDevice(name string, opts *tpb.TransportOption, sid uuid.UUID) (uuid.UUID, error)
    
    	GetDevice(identifier string) (device.Device, error)
    	RemoveDevice(uuid.UUID) error
    
    	UpdateDevice(device.Device, string) error
    
    	Devices() []device.Device
    	FlattenedDevices() []device.LoadedDevice
    
    	ChangeOND(uuid uuid.UUID, operation ppb.ApiOperation, path string, value ...string) (uuid.UUID, error)
    	Request(uuid.UUID, string) (proto.Message, error)
    
    	RequestAll(string) error
    	GetName() string
    	GetDescription() string
    	MarshalDevice(string) (string, error)
    
    	GetSBIs() ([]southbound.SouthboundInterface, error)
    	GetSBI(uuid.UUID) (southbound.SouthboundInterface, error)
    
    	ID() uuid.UUID
    	PendingChanges() []uuid.UUID
    	CommittedChanges() []uuid.UUID
    
    Manuel Kieweg's avatar
    Manuel Kieweg committed
    	GetChange(uuid.UUID) (change.Change, error)
    
    	Commit(uuid.UUID) error
    	Confirm(uuid.UUID) error
    
    	SubscribePath(uuid.UUID, *ppb.SubscriptionList) error
    	UpdateDeviceAfterSubscribeResponse(device.Device) error