|
|
```plantuml
|
|
|
@startuml
|
|
|
namespace nucleus {
|
|
|
class Change << (S,Aquamarine) >> {
|
|
|
- cuid uuid.UUID
|
|
|
- duid uuid.UUID
|
|
|
- timestamp time.Time
|
|
|
- previousState ygot.GoStruct
|
|
|
- intendedState ygot.GoStruct
|
|
|
- committed bool
|
|
|
- confirmed bool
|
|
|
- inconsistent bool
|
|
|
- callback <font color=blue>func</font>(ygot.GoStruct, ygot.GoStruct) error
|
|
|
- lock sync.RWMutex
|
|
|
- cancelFunc context.CancelFunc
|
|
|
- errChan <font color=blue>chan</font> error
|
|
|
- done <font color=blue>chan</font> int
|
|
|
# Introduction
|
|
|
|
|
|
- rollbackHandler(ctx context.Context)
|
|
|
This is the wiki used to document the high-level views about the goSDN SDN-Controller. goSDN is a SDN controller initially developed as part of research and development cooperation between Deutsche Telekom and the [da/net research group](https://danet.fbi.h-da.de/).
|
|
|
|
|
|
+ ID() uuid.UUID
|
|
|
+ Commit() error
|
|
|
+ Confirm() error
|
|
|
+ Age() time.Duration
|
|
|
+ State() pnd.Change_State
|
|
|
There are already a number of existing SDN-controllers, such as, but not limited to, [ONOS](https://opennetworking.org/onos/), [Opendaylight](https://www.opendaylight.org/), [Ryu](https://ryu-sdn.org/) and [Floodlight](https://github.com/floodlight).
|
|
|
|
|
|
}
|
|
|
class ChangeStore << (S,Aquamarine) >> {
|
|
|
+ GetChange(id uuid.UUID) (*Change, error)
|
|
|
# Overview of this wiki
|
|
|
|
|
|
}
|
|
|
class ClientConfig << (S,Aquamarine) >> {
|
|
|
+ Identifier string
|
|
|
+ Endpoint string
|
|
|
+ Username string
|
|
|
+ Password string
|
|
|
+ GjsonDefaultPath string
|
|
|
+ GjsonConnectionsPath string
|
|
|
|
|
|
}
|
|
|
class CommonDevice << (S,Aquamarine) >> {
|
|
|
- sbi southbound.SouthboundInterface
|
|
|
- transport transport.Transport
|
|
|
- name string
|
|
|
|
|
|
+ UUID uuid.UUID
|
|
|
|
|
|
+ ID() uuid.UUID
|
|
|
+ Model() ygot.GoStruct
|
|
|
+ Transport() transport.Transport
|
|
|
+ Name() string
|
|
|
+ SBI() southbound.SouthboundInterface
|
|
|
+ SetTransport(t transport.Transport)
|
|
|
+ SetName(n string)
|
|
|
+ SetSBI(sbi southbound.SouthboundInterface)
|
|
|
+ ProcessResponse(resp proto.Message) error
|
|
|
|
|
|
}
|
|
|
class DeviceStore << (S,Aquamarine) >> {
|
|
|
- deviceNameToUUIDLookup <font color=blue>map</font>[string]uuid.UUID
|
|
|
|
|
|
+ GetDevice(id uuid.UUID, parseErrors ...error) (device.Device, error)
|
|
|
+ Add(item store.Storable, name string) error
|
|
|
+ Delete(id uuid.UUID) error
|
|
|
|
|
|
}
|
|
|
class Gnmi << (S,Aquamarine) >> {
|
|
|
- client gnmi.GNMIClient
|
|
|
- config *gnmi.Config
|
|
|
|
|
|
+ SetNode <font color=blue>func</font>(*yang.Entry, <font color=blue>interface</font>{}, *gnmi.Path, <font color=blue>interface</font>{}, ...ytypes.SetNodeOpt) error
|
|
|
+ RespChan <font color=blue>chan</font> *gnmi.SubscribeResponse
|
|
|
+ Unmarshal <font color=blue>func</font>([]byte, []string, <font color=blue>interface</font>{}, ...ytypes.UnmarshalOpt) error
|
|
|
+ Options *transport.TransportOption
|
|
|
|
|
|
- applyDiff(ctx context.Context, payload ...<font color=blue>interface</font>{}) error
|
|
|
- get(ctx context.Context, paths [][]string, origin string) (<font color=blue>interface</font>{}, error)
|
|
|
- getWithRequest(ctx context.Context, req *gnmi.GetRequest) (<font color=blue>interface</font>{}, error)
|
|
|
- set(ctx context.Context, setOps []*gnmi.Operation, exts ...*gnmi_ext.Extension) (*gnmi.SetResponse, error)
|
|
|
- subscribe(ctx context.Context) error
|
|
|
|
|
|
+ Get(ctx context.Context, params ...string) (<font color=blue>interface</font>{}, error)
|
|
|
+ Set(ctx context.Context, args ...<font color=blue>interface</font>{}) error
|
|
|
+ Subscribe(ctx context.Context, params ...string) error
|
|
|
+ Type() string
|
|
|
+ ProcessResponse(resp <font color=blue>interface</font>{}, root <font color=blue>interface</font>{}, s *ytypes.Schema) error
|
|
|
+ Capabilities(ctx context.Context) (<font color=blue>interface</font>{}, error)
|
|
|
+ Close() error
|
|
|
+ SetPassthrough(ctx context.Context, req *gnmi.SetRequest) (*gnmi.SetResponse, error)
|
|
|
+ GetPassthrough(ctx context.Context, req *gnmi.GetRequest) (*gnmi.GetResponse, error)
|
|
|
|
|
|
}
|
|
|
class OpenConfig << (S,Aquamarine) >> {
|
|
|
- schema *ytypes.Schema
|
|
|
- id uuid.UUID
|
|
|
|
|
|
+ SbiIdentifier() string
|
|
|
+ Schema() *ytypes.Schema
|
|
|
+ SetNode() <font color=blue>func</font>(*yang.Entry, <font color=blue>interface</font>{}, *gnmi.Path, <font color=blue>interface</font>{}, ...ytypes.SetNodeOpt) error
|
|
|
+ Unmarshal() <font color=blue>func</font>([]byte, []string, <font color=blue>interface</font>{}, ...ytypes.UnmarshalOpt) error
|
|
|
+ ID() uuid.UUID
|
|
|
+ Type() southbound.Type
|
|
|
|
|
|
}
|
|
|
class PndStore << (S,Aquamarine) >> {
|
|
|
+ GetPND(id uuid.UUID) (networkdomain.NetworkDomain, error)
|
|
|
|
|
|
}
|
|
|
class Restconf << (S,Aquamarine) >> {
|
|
|
+ Get(ctx context.Context, params ...string) (<font color=blue>interface</font>{}, error)
|
|
|
+ Set(ctx context.Context, params ...<font color=blue>interface</font>{}) error
|
|
|
+ Subscribe(ctx context.Context, params ...string) error
|
|
|
+ Type() string
|
|
|
+ GetOptions() <font color=blue>interface</font>{}
|
|
|
+ ProcessResponse(resp <font color=blue>interface</font>{}, root <font color=blue>interface</font>{}, models *ytypes.Schema) error
|
|
|
|
|
|
}
|
|
|
class SbiStore << (S,Aquamarine) >> {
|
|
|
+ GetSBI(id uuid.UUID) (southbound.SouthboundInterface, error)
|
|
|
|
|
|
}
|
|
|
class csbiDevice << (S,Aquamarine) >> {
|
|
|
+ ID() uuid.UUID
|
|
|
+ Model() ygot.GoStruct
|
|
|
+ Transport() transport.Transport
|
|
|
+ Name() string
|
|
|
+ SBI() southbound.SouthboundInterface
|
|
|
+ ProcessResponse(resp proto.Message) error
|
|
|
|
|
|
}
|
|
|
class genericStore << (S,Aquamarine) >> {
|
|
|
+ Exists(id uuid.UUID) bool
|
|
|
+ Add(item store.Storable) error
|
|
|
+ Get(id uuid.UUID) (store.Storable, error)
|
|
|
+ Delete(id uuid.UUID) error
|
|
|
+ UUIDs() []uuid.UUID
|
|
|
|
|
|
}
|
|
|
class nucleus.genericStore << (T, #FF7700) >> {
|
|
|
}
|
|
|
class pndImplementation << (S,Aquamarine) >> {
|
|
|
- name string
|
|
|
- description string
|
|
|
- sbic SbiStore
|
|
|
- devices *DeviceStore
|
|
|
- pendingChanges ChangeStore
|
|
|
- committedChanges ChangeStore
|
|
|
- confirmedChanges ChangeStore
|
|
|
- id uuid.UUID
|
|
|
- errChans <font color=blue>map</font>[uuid.UUID]<font color=blue>chan</font> error
|
|
|
|
|
|
- addSbi(sbi southbound.SouthboundInterface) error
|
|
|
- removeSbi(id uuid.UUID) error
|
|
|
- addDevice(device device.Device) error
|
|
|
- removeDevice(id uuid.UUID) error
|
|
|
|
|
|
+ PendingChanges() []uuid.UUID
|
|
|
+ CommittedChanges() []uuid.UUID
|
|
|
+ GetChange(cuid uuid.UUID, i ...int) (change.Change, error)
|
|
|
+ Commit(u uuid.UUID) error
|
|
|
+ Confirm(u uuid.UUID) error
|
|
|
+ ID() uuid.UUID
|
|
|
+ Devices() []uuid.UUID
|
|
|
+ GetName() string
|
|
|
+ ContainsDevice(id uuid.UUID) bool
|
|
|
+ GetDescription() string
|
|
|
+ GetSBIs() store.Store
|
|
|
+ Destroy() error
|
|
|
+ AddSbi(s southbound.SouthboundInterface) error
|
|
|
+ RemoveSbi(id uuid.UUID) error
|
|
|
+ AddDevice(name string, opt *transport.TransportOption, sid uuid.UUID) error
|
|
|
+ GetDevice(identifier string) (device.Device, error)
|
|
|
+ RemoveDevice(uuid uuid.UUID) error
|
|
|
+ MarshalDevice(identifier string) (string, error)
|
|
|
+ Request(uuid uuid.UUID, path string) error
|
|
|
+ RequestAll(path string) error
|
|
|
+ ChangeOND(uuid uuid.UUID, operation pnd.ApiOperation, path string, value ...string) error
|
|
|
|
|
|
}
|
|
|
class "<font color=blue>map</font>[uuid.UUID]store.Storable" as fontcolorbluemapfontuuidUUIDstoreStorable {
|
|
|
'This class was created so that we can correctly have an alias pointing to this name. Since it contains dots that can break namespaces
|
|
|
}
|
|
|
}
|
|
|
"nucleus.genericStore" *-- "nucleus.ChangeStore"
|
|
|
"ygot.GoStruct" *-- "nucleus.CommonDevice"
|
|
|
"nucleus.genericStore" *-- "nucleus.DeviceStore"
|
|
|
"nucleus.genericStore" *-- "nucleus.PndStore"
|
|
|
"nucleus.genericStore" *-- "nucleus.SbiStore"
|
|
|
"nucleus.CommonDevice" *-- "nucleus.csbiDevice"
|
|
|
|
|
|
|
|
|
"nucleus.fontcolorbluemapfontuuidUUIDstoreStorable" #.. "nucleus.genericStore"
|
|
|
@enduml
|
|
|
``` |
|
|
*tbd* |
|
|
\ No newline at end of file |