Update home authored by Manuel Max Kieweg's avatar Manuel Max Kieweg
```plantuml ```plantuml
@startuml @startuml gosdn
namespace nucleus { namespace arista {
class ClientConfig << (S,Aquamarine) >> { class SBI << (S,Aquamarine) >> {
+ Identifier string - transport nucleus.Transport
+ Endpoint string }
+ Username string }
+ Password string
+ GjsonDefaultPath string
+ GjsonConnectionsPath string
namespace ciena {
class SBI << (S,Aquamarine) >> {
- transport nucleus.Transport
}
} }
namespace nucleus {
class Core << (S,Aquamarine) >> { class Core << (S,Aquamarine) >> {
- devices <font color=blue>map</font>[string]Device - clients <font color=blue>map</font>[string]nucleus.Client
- southboundInterfaces <font color=blue>map</font>[string]interfaces.SouthboundInterface
- prinipalNetworkDomains <font color=blue>map</font>[uuid.UUID]interfaces.PrincipalNetworkDomain
- database database.Database - database database.Database
- config controllerConfig - config controllerConfig
...@@ -26,34 +27,12 @@ namespace nucleus { ...@@ -26,34 +27,12 @@ namespace nucleus {
+ Shutdown() + Shutdown()
} }
class Device << (S,Aquamarine) >> { class Device {
- device ygot.GoStruct - device ygot.Device
- Sbi nucleus.SouthboundInterface
+ SBI interfaces.SouthboundInterface - Config nucleus.DeviceConfig
+ Config DeviceConfig
} }
class DeviceConfig << (S,Aquamarine) >> {
+ Identifier uuid.UUID
+ Endpoint string
+ Username string
+ Password string
}
interface PrincipalNetworkDomain {
+ Destroy() error
+ AddSbi() error
+ RemoveSbi() error
+ AddDevice( interfaces.Device) error
+ RemoveDevice(uuid uuid.UUID) error
}
interface SouthboundInterface {
}
class buf << (S,Aquamarine) >> {
+ Write(p []byte) (int, error)
}
class controllerConfig << (S,Aquamarine) >> { class controllerConfig << (S,Aquamarine) >> {
+ CliSocket string + CliSocket string
+ DatabaseSocket string + DatabaseSocket string
...@@ -62,57 +41,92 @@ namespace nucleus { ...@@ -62,57 +41,92 @@ namespace nucleus {
+ DatabaseCrypto bool + DatabaseCrypto bool
+ ConfigPath string + ConfigPath string
}
class logConnection << (S,Aquamarine) >> {
- stream proto.GrpcCli_CreateLogStreamServer
- id string
- active bool
- error <font color=blue>chan</font> error
}
class nucleus.buf << (T, #FF7700) >> {
} }
class pndImplementation << (S,Aquamarine) >> { class pndImplementation << (S,Aquamarine) >> {
- name string - name string
- sbiContainer <font color=blue>map</font>[string]*interfaces.SouthboundInterface - sbiContainer map[string]nucleus.SouthboundInterface
- devices <font color=blue>map</font>[uuid.UUID]Device - devices map[uuid]Device
+ Destroy() error }
+ AddSbi() error
+ RemoveSbi() error class Database << (S,Aquamarine) >> {
+ AddDevice(device Device) error - driver neo4j.Driver
+ RemoveDevice(uuid uuid.UUID) error
+ StorePND(pnd *PND) neo4j.Node
+ RemovePND(id string)
+ GetPNDByID(id string)
+ GetNodesByLabel(label string)
+ GetNodeByID(id string)
+ StoreNodes(json string) []neo4j.Node
+ RemoveNodes(json string)
+ RemoveSingleNode(id string)
+ StoreLinks(json string) []neo4j.Relationship
+ StoreNodeEdgePoints(json string)
+ StoreConnections(json string)
+ Shutdown() error
} }
class server << (S,Aquamarine) >> {
- core *Core
- logConnections []*logConnection
+ SayHello(ctx context.Context, in *proto.HelloRequest) (*proto.HelloReply, error) class gnmi << (S,Aquamarine) >> {
+ CreateLogStream(req *emptypb.Empty, stream proto.GrpcCli_CreateLogStreamServer) error
+ BroadcastLog(log *proto.LogReply)
+ Shutdown(ctx context.Context, in *proto.ShutdownRequest) (*proto.ShutdownReply, error)
+ TAPIGetEdge(ctx context.Context, in *proto.TAPIRequest) (*proto.TAPIReply, error)
+ TAPIGetEdgeNode(ctx context.Context, in *proto.TAPIRequest) (*proto.TAPIReply, error)
+ TAPIGetLink(ctx context.Context, in *proto.TAPIRequest) (*proto.TAPIReply, error)
} }
class restconf << (S,Aquamarine) >> {
} }
"proto.UnimplementedGrpcCliServer" *-- "nucleus.server" class tapi << (S,Aquamarine) >> {
- transport nucleus.Transport
+ GetConnections(Device) ([]byte, error)
+ GetLinks(Device) ([]byte, error)
+ GetNodes(Device) ([]byte, error)
+ GetNodeEdgePoints(Device) ([]byte, error)
}
class openconfig << (S,Aquamarine) >> {
- transport nucleus.Transport
}
namespace sbi { class DeviceConfig << (S,Aquamarine) >> {
class OpenConfig << (S,Aquamarine) >> { + Identifier uuid
- name string + Endpoint string
- clientContainer []Client + Username string
+ Password string
}
interface PrincipalNetworkDomain {
+ Destroy() error
+ AddSbi() error
+ RemoveSbi() error
+ AddDevice() error
+ RemoveDevice() error
}
interface SouthboundInterface {
+ AddClient() error + AddClient() error
+ RemoveClient() error + RemoveClient() error
+ CollectHeartbeats() error + CollectHeartbeats() error
+ ListClients() <font color=blue>map</font>[int]interfaces.Client + ListClients() <font color=blue>map</font>[int]Client
}
interface Transport {
+ SetConfig( <font color=blue>interface</font>{}) error
+ GetConfig() <font color=blue>interface</font>{}
} }
} }
@enduml
"nucleus.PrincipalNetworkDomain" <|-- "nucleus.pndImplementation"
"nucleus.PrincipalNetworkDomain" "1" *-- "many" "nucleus.Device"
"nucleus.PrincipalNetworkDomain" "1" *-- "many" "nucleus.SouthboundInterface"
"nucleus.Transport" <|-- "nucleus.gnmi"
"nucleus.Transport" <|-- "nucleus.restconf"
"nucleus.Device" <|-- "nucleus.DeviceConfig"
"nucleus.SouthboundInterface" <|-- "nucleus.Transport"
"nucleus.SouthboundInterface" <|-- "nucleus.tapi"
"nucleus.SouthboundInterface" <|-- "nucleus.openconfig"
"nucleus.SouthboundInterface" <|-- "arista.SBI"
"nucleus.SouthboundInterface" <|-- "ciena.SBI"
"nucleus.Core" <|-- "nucleus.controllerConfig"
"nucleus.Core" <|-- "nucleus.Database"
"nucleus.Core" "1" *-- "many" "nucleus.PrincipalNetworkDomain"
@enduml
``` ```
\ No newline at end of file