Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@startuml
namespace nucleus {
class ClientConfig << (S,Aquamarine) >> {
+ Identifier string
+ Endpoint string
+ Username string
+ Password string
+ GjsonDefaultPath string
+ GjsonConnectionsPath string
}
class Core << (S,Aquamarine) >> {
- 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
+ IsRunning <font color=blue>chan</font> bool
- readControllerConfig(configFileController string) error
+ Init(socket string, configFileController string, configFileClient string, IsRunningChannel <font color=blue>chan</font> bool)
+ AttachDatabase()
+ Shutdown()
}
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
+ 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 <font color=blue>map</font>[string]*interfaces.SouthboundInterface
- devices <font color=blue>map</font>[uuid.UUID]Device
+ Destroy() error
+ AddSbi() error
+ RemoveSbi() error
+ AddDevice(device Device) error
+ RemoveDevice(uuid uuid.UUID) 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)
}
}
"proto.UnimplementedGrpcCliServer" *-- "nucleus.server"
namespace sbi {
class OpenConfig << (S,Aquamarine) >> {
- name string
- clientContainer []Client
+ AddClient() error
+ RemoveClient() error
+ CollectHeartbeats() error
+ ListClients() <font color=blue>map</font>[int]interfaces.Client
}
}
"__builtin__.[]byte" #.. "nucleus.buf"
@enduml