-
Notifications
You must be signed in to change notification settings - Fork 390
/
prouter.sandesh
249 lines (225 loc) · 6.23 KB
/
prouter.sandesh
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*/
/**
* Definitions of structures added by contrail-snmp-collector that go into
* Physical Router UVE.
*/
namespace cpp prouter
/**
* stores ARP information collected from physical router
*/
struct ArpTable {
1: i32 localIfIndex
2: string mac
3: string ip
}
/**
* stores interface statistics information
*/
struct IfStats {
1: u64 ifInPkts
2: u64 ifOutPkts
3: u64 ifInOctets
4: u64 ifOutOctets
5: u64 ifInDiscards
6: u64 ifInErrors
7: u64 ifOutDiscards
8: u64 ifOutErrors
9: u64 ifIndex
10: string ifName
}
/**
* stores interface statistics information collected from physical router
*/
struct IfXTable {
1: string ifAlias
2: i32 ifConnectorPresent
3: i32 ifCounterDiscontinuityTime
4: u64 ifHCInBroadcastPkts
5: u64 ifHCInMulticastPkts
6: u64 ifHCInOctets
7: u64 ifHCInUcastPkts
8: u64 ifHCOutBroadcastPkts
9: u64 ifHCOutMulticastPkts
10: u64 ifHCOutOctets
11: u64 ifHCOutUcastPkts
12: i32 ifHighSpeed
13: u64 ifInBroadcastPkts
14: u64 ifInMulticastPkts
15: i32 ifLinkUpDownTrapEnable
16: string ifName
17: u64 ifOutBroadcastPkts
18: u64 ifOutMulticastPkts
19: i32 ifPromiscuousMode
20: i32 ifIndex
}
/**
* stores interface statistics information collected from physical router
*/
struct IfTable {
1: i32 ifAdminStatus
2: string ifDescr
3: u64 ifInDiscards
4: u64 ifInErrors
5: u64 ifInNUcastPkts
6: u64 ifInOctets
7: u64 ifInUcastPkts
8: u64 ifInUnknownProtos
9: u32 ifIndex
10: i32 ifLastChange
11: u32 ifMtu
12: i32 ifOperStatus
13: u64 ifOutDiscards
14: u64 ifOutErrors
15: u64 ifOutNUcastPkts
16: u64 ifOutOctets
17: u64 ifOutQLen
18: u64 ifOutUcastPkts
19: string ifPhysAddress
20: string ifSpecific
21: i32 ifSpeed
22: i32 ifType
}
struct IpMib {
1: u32 ifIndex
2: string ipAdEntIfIndex
}
enum LldpSystemCapabilitiesMap {
Other = 0
Repeater = 1
Bridge = 2
WlanAccessPoint = 3
Router = 4
Telephone = 5
DocsisCableDevice = 6
StationOnly = 7
}
const map<LldpSystemCapabilitiesMap, string> LldpSystemCapabilitiesMapNames = {
LldpSystemCapabilitiesMap.Other :"Other",
LldpSystemCapabilitiesMap.Repeater :"Repeater",
LldpSystemCapabilitiesMap.Bridge :"Bridge",
LldpSystemCapabilitiesMap.WlanAccessPoint :"WlanAccessPoint",
LldpSystemCapabilitiesMap.Router :"Router",
LldpSystemCapabilitiesMap.Telephone :"Telephone",
LldpSystemCapabilitiesMap.DocsisCableDevice :"DocsisCableDevice",
LldpSystemCapabilitiesMap.StationOnly :"StationOnly"
}
struct LldpLocManAddrEntry {
1: string lldpLocManAddr
2: string lldpLocManAddrOID
3: i32 lldpLocManAddrSubtype
4: i32 lldpLocManAddrOIDLen
5: optional i32 lldpLocManAddrIfId
}
struct LldpLocPortEntry {
1: i32 lldpLocPortNum
2: i32 lldpLocPortIdSubtype
3: string lldpLocPortId
4: string lldpLocPortDesc
}
struct LldpLocalSystemData {
1: string lldpLocChassisId
2: i32 lldpLocChassisIdSubtype
3: string lldpLocSysName
4: string lldpLocSysDesc
5: list <LldpSystemCapabilitiesMap> lldpLocSysCapEnabled
6: list <LldpSystemCapabilitiesMap> lldpLocSysCapSupported
7: LldpLocManAddrEntry lldpLocManAddrEntry
8: list<LldpLocPortEntry> lldpLocPortTable
}
struct LldpRemOrgDefInfoTable {
1: string lldpRemOrgDefInfo
2: i32 lldpRemOrgDefInfoIndex
}
struct LldpRemOrgDefInfoEntry {
1: string lldpRemOrgDefInfoOUI
2: i32 lldpRemOrgDefInfoSubtype
3: optional list<LldpRemOrgDefInfoTable> lldpRemOrgDefInfoTable
}
struct LldpRemManAddrEntry {
1: string lldpRemManAddr
2: string lldpRemManAddrOID
3: i32 lldpRemManAddrIfId
4: i32 lldpRemManAddrIfSubtype
5: i32 lldpRemManAddrOIDLen
6: i32 lldpRemManAddrSubtype
7: i32 lldpRemTimeMark
}
struct LldpRemoteSystemsData {
1: string lldpRemChassisId
2: i32 lldpRemChassisIdSubtype
3: i32 lldpRemIndex
4: i32 lldpRemLocalPortNum
5: string lldpRemPortDesc
6: string lldpRemPortId
7: i32 lldpRemPortIdSubtype
8: list <LldpSystemCapabilitiesMap> lldpRemSysCapEnabled
9: list <LldpSystemCapabilitiesMap> lldpRemSysCapSupported
10: string lldpRemSysName
11: string lldpRemSysDesc
12: i32 lldpRemTimeMark
13: optional LldpRemOrgDefInfoEntry lldpRemOrgDefInfoEntry
14: optional LldpRemManAddrEntry lldpRemManAddrEntry
}
/**
* stores LLDP information collected from physical router
*/
struct LldpTable {
1: LldpLocalSystemData lldpLocalSystemData
2: optional list<LldpRemoteSystemsData> lldpRemoteSystemsData
}
struct dot1qTpFdbPortTable {
1: string mac
2: i32 dot1dBasePortIfIndex
}
struct dot1dBasePortIfIndexTable {
1: i32 dot1dBasePortIfIndex
2: i32 snmpIfIndex
}
/**
* stores interface status information collected from physical router
*/
struct IfIndexOperStatusTable {
1: u32 ifIndex
2: u32 ifOperStatus
}
/**
* Physical Router UVE data provided by contrail-snmp-collector.
* This includes the raw SNMP tables polled from the physical router.
*/
struct PRouterEntry {
1: string name (key="ObjectPRouter")
2: optional bool deleted
3: optional LldpTable lldpTable
4: optional list<ArpTable> arpTable
5: optional list<IfTable> ifTable
6: optional list<IfXTable> ifXTable
/** @display_name:Physical Router Interface Statistics*/
7: optional list<IfStats> ifStats (tags="name:.ifIndex,name:.ifName")
8: optional list<IpMib> ipMib
9: optional list<dot1qTpFdbPortTable> fdbPortTable
10: optional list<dot1dBasePortIfIndexTable> fdbPortIfIndexTable
11: optional list<IfIndexOperStatusTable> ifIndexOperStatusTable
}
/**
* @description: stores information collected from physical router by
* contrail-snmp-collector which is later used by contrail-topology
* @object: prouter
*/
uve sandesh PRouterUVE {
1: PRouterEntry data
}
struct PRouterFlowEntry {
1: string name (key="ObjectPRouter")
2: optional bool deleted
3: optional string flow_export_source_ip
}
/**
* @description: stores flow export ip info collected from physical router by
* contrail-snmp-collector
* @object: prouter
*/
uve sandesh PRouterFlowUVE {
1: PRouterFlowEntry data
}