Update home authored by Manuel Max Kieweg's avatar Manuel Max Kieweg
```plantuml ```plantuml
@startuml gosdn @startuml
namespace arista { namespace nucleus {
class SBI << (S,Aquamarine) >> { class ClientConfig << (S,Aquamarine) >> {
- transport nucleus.Transport + Identifier string
} + 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) >> {
- clients <font color=blue>map</font>[string]nucleus.Client - devices <font color=blue>map</font>[string]Device
- 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
...@@ -27,12 +26,34 @@ namespace nucleus { ...@@ -27,12 +26,34 @@ namespace nucleus {
+ Shutdown() + Shutdown()
} }
class Device { class Device << (S,Aquamarine) >> {
- device ygot.Device - device ygot.GoStruct
- Sbi nucleus.SouthboundInterface
- Config nucleus.DeviceConfig + SBI interfaces.SouthboundInterface
+ 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
...@@ -42,92 +63,56 @@ namespace nucleus { ...@@ -42,92 +63,56 @@ namespace nucleus {
+ ConfigPath string + ConfigPath string
} }
class pndImplementation << (S,Aquamarine) >> { class logConnection << (S,Aquamarine) >> {
- name string - stream proto.GrpcCli_CreateLogStreamServer
- sbiContainer map[string]nucleus.SouthboundInterface - id string
- devices map[uuid]Device - active bool
- error <font color=blue>chan</font> error
} }
class nucleus.buf << (T, #FF7700) >> {
class Database << (S,Aquamarine) >> {
- driver neo4j.Driver
+ 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 pndImplementation << (S,Aquamarine) >> {
- name string
- sbiContainer <font color=blue>map</font>[string]*interfaces.SouthboundInterface
- devices <font color=blue>map</font>[uuid.UUID]Device
class gnmi << (S,Aquamarine) >> { + Destroy() error
+ AddSbi() error
+ RemoveSbi() error
+ AddDevice(device Device) error
+ RemoveDevice(uuid uuid.UUID) error
} }
class server << (S,Aquamarine) >> {
- core *Core
- logConnections []*logConnection
class restconf << (S,Aquamarine) >> { + SayHello(ctx context.Context, in *proto.HelloRequest) (*proto.HelloReply, error)
+ CreateLogStream(req *emptypb.Empty, stream proto.GrpcCli_CreateLogStreamServer) error
} + BroadcastLog(log *proto.LogReply)
class tapi << (S,Aquamarine) >> { + Shutdown(ctx context.Context, in *proto.ShutdownRequest) (*proto.ShutdownReply, error)
- transport nucleus.Transport + 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)
+ GetConnections(Device) ([]byte, error)
+ GetLinks(Device) ([]byte, error)
+ GetNodes(Device) ([]byte, error)
+ GetNodeEdgePoints(Device) ([]byte, error)
} }
class openconfig << (S,Aquamarine) >> {
- transport nucleus.Transport
} }
"proto.UnimplementedGrpcCliServer" *-- "nucleus.server"
class DeviceConfig << (S,Aquamarine) >> {
+ Identifier uuid
+ Endpoint string
+ Username string
+ Password string
}
interface PrincipalNetworkDomain {
+ Destroy() error
+ AddSbi() error
+ RemoveSbi() error
+ AddDevice() error
+ RemoveDevice() error
} namespace sbi {
interface SouthboundInterface { class OpenConfig << (S,Aquamarine) >> {
- name string
- clientContainer []Client
+ AddClient() error + AddClient() error
+ RemoveClient() error + RemoveClient() error
+ CollectHeartbeats() error + CollectHeartbeats() error
+ ListClients() <font color=blue>map</font>[int]Client + ListClients() <font color=blue>map</font>[int]interfaces.Client
}
interface Transport {
+ SetConfig( <font color=blue>interface</font>{}) error
+ GetConfig() <font color=blue>interface</font>{}
} }
} }
"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 @enduml
``` ```
\ No newline at end of file