Create Bird's View authored by Manuel Kieweg's avatar Manuel Kieweg
```plantuml
@startuml
namespace arista {
class Client << (S,Aquamarine) >> {
- transport interfaces.Transport
+ GetConfig() interfaces.ClientConfig
+ ListPorts() <font color=blue>map</font>[int]interfaces.Port
+ PushReceiver() error
}
}
"interfaces.Client" <|-- "arista.Client"
namespace ciena {
class MCPClient << (S,Aquamarine) >> {
- transport *client.Runtime
- client *client.ServiceTopologyTAPI
- database *database.Database
- buffer *bytes.Buffer
- config *interfaces.ClientConfig
+ GetConfig() interfaces.ClientConfig
+ ListPorts() <font color=blue>map</font>[int]interfaces.Port
+ PushReceiver() error
+ GetConnections() error
+ GetLinks() error
+ GetNodes() error
+ GetNodeEdgePoints() error
}
}
"interfaces.Client" <|-- "ciena.MCPClient"
namespace database {
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 PND << (S,Aquamarine) >> {
- name string
- description string
- interfaces []string
}
}
namespace interfaces {
interface Client {
+ GetConfig() ClientConfig
+ ListPorts() <font color=blue>map</font>[int]Port
+ PushReceiver() error
}
class ClientConfig << (S,Aquamarine) >> {
+ Identifier string
+ Endpoint string
+ Username string
+ Password string
}
interface Port {
}
interface PrincipalNetworkDomain {
+ Destroy() error
+ AddSbi() error
+ RemoveSbi() error
}
interface SouthboundInterface {
+ AddClient() error
+ RemoveClient() error
+ CollectHeartbeats() error
+ ListClients() <font color=blue>map</font>[int]Client
}
interface Transport {
+ SetConfig( <font color=blue>interface</font>{}) error
+ GetConfig() <font color=blue>interface</font>{}
}
}
namespace nucleus {
class Core << (S,Aquamarine) >> {
- clients <font color=blue>map</font>[string]interfaces.Client
- database database.Database
- config controllerConfig
+ IsRunning <font color=blue>chan</font> bool
- readControllerConfig(configFileController string) error
- readClientConfig(configFileClient string) error
+ Init(socket string, configFileController string, configFileClient string, IsRunningChannel <font color=blue>chan</font> bool)
+ AttachDatabase()
+ Shutdown()
}
interface SBIGreeter {
+ SBIHello()
}
class buf << (S,Aquamarine) >> {
+ Write(p []byte) (int, error)
}
class clientConfigs << (S,Aquamarine) >> {
+ Client []interfaces.ClientConfig
}
class controllerConfig << (S,Aquamarine) >> {
+ CliSocket string
+ DatabaseSocket string
+ DatabaseUser string
+ DatabasePassword string
+ DatabaseCrypto bool
+ 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) >> {
- name string
- sbiContainer []interfaces.SouthboundInterface
+ Destroy() error
+ AddSbi() error
+ RemoveSbi() error
}
class server << (S,Aquamarine) >> {
- core *Core
- logConnections []*logConnection
+ SayHello(ctx "context.Context, in *proto.HelloRequest) (*proto.HelloReply, error)
+ 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)
}
}
"interfaces.PrincipalNetworkDomain" <|-- "nucleus.pndImplementation"
namespace restconf {
class southboundInterface << (S,Aquamarine) >> {
- name string
- clientContainer []interfaces.Client
+ AddClient() error
+ RemoveClient() error
+ CollectHeartbeats() error
+ ListClients() <font color=blue>map</font>[int]interfaces.Client
}
}
"interfaces.SouthboundInterface" <|-- "restconf.southboundInterface"
@enduml
```
\ No newline at end of file