|
|
```plantuml
|
|
|
@startuml gosdn
|
|
|
namespace arista {
|
|
|
class SBI << (S,Aquamarine) >> {
|
|
|
- transport nucleus.Transport
|
|
|
}
|
|
|
}
|
|
|
@startuml
|
|
|
namespace nucleus {
|
|
|
class ClientConfig << (S,Aquamarine) >> {
|
|
|
+ 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) >> {
|
|
|
- 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
|
|
|
- config controllerConfig
|
|
|
|
... | ... | @@ -27,12 +26,34 @@ namespace nucleus { |
|
|
+ Shutdown()
|
|
|
|
|
|
}
|
|
|
class Device {
|
|
|
- device ygot.Device
|
|
|
- Sbi nucleus.SouthboundInterface
|
|
|
- Config nucleus.DeviceConfig
|
|
|
class Device << (S,Aquamarine) >> {
|
|
|
- device ygot.GoStruct
|
|
|
|
|
|
+ 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) >> {
|
|
|
+ CliSocket string
|
|
|
+ DatabaseSocket string
|
... | ... | @@ -42,92 +63,56 @@ namespace nucleus { |
|
|
+ ConfigPath string
|
|
|
|
|
|
}
|
|
|
class pndImplementation << (S,Aquamarine) >> {
|
|
|
- name string
|
|
|
- sbiContainer map[string]nucleus.SouthboundInterface
|
|
|
- devices map[uuid]Device
|
|
|
class logConnection << (S,Aquamarine) >> {
|
|
|
- stream proto.GrpcCli_CreateLogStreamServer
|
|
|
- id string
|
|
|
- active bool
|
|
|
- error <font color=blue>chan</font> error
|
|
|
|
|
|
}
|
|
|
|
|
|
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 nucleus.buf << (T, #FF7700) >> {
|
|
|
}
|
|
|
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 restconf << (S,Aquamarine) >> {
|
|
|
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)
|
|
|
|
|
|
}
|
|
|
class tapi << (S,Aquamarine) >> {
|
|
|
- transport nucleus.Transport
|
|
|
}
|
|
|
"proto.UnimplementedGrpcCliServer" *-- "nucleus.server"
|
|
|
|
|
|
+ GetConnections(Device) ([]byte, error)
|
|
|
+ GetLinks(Device) ([]byte, error)
|
|
|
+ GetNodes(Device) ([]byte, error)
|
|
|
+ GetNodeEdgePoints(Device) ([]byte, error)
|
|
|
}
|
|
|
class openconfig << (S,Aquamarine) >> {
|
|
|
- transport nucleus.Transport
|
|
|
}
|
|
|
|
|
|
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 {
|
|
|
class OpenConfig << (S,Aquamarine) >> {
|
|
|
- name string
|
|
|
- clientContainer []Client
|
|
|
|
|
|
}
|
|
|
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>{}
|
|
|
+ ListClients() <font color=blue>map</font>[int]interfaces.Client
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
"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 |