forked from opsmill/infrahub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprotocols.py
258 lines (190 loc) · 5.51 KB
/
protocols.py
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
250
251
252
253
254
255
256
257
258
#
# Generated by "infrahubctl protocols"
#
from __future__ import annotations
from typing import TYPE_CHECKING
from infrahub_sdk.protocols import (
BuiltinIPAddress,
BuiltinIPPrefix,
CoreArtifactTarget,
CoreNode,
)
if TYPE_CHECKING:
from infrahub_sdk.node import RelatedNode, RelationshipManager
from infrahub_sdk.protocols_base import (
Boolean,
Dropdown,
DropdownOptional,
Integer,
IntegerOptional,
String,
StringOptional,
)
class InfraEndpoint(CoreNode):
connected_endpoint: RelatedNode
class OrganizationGeneric(CoreNode):
name: String
description: StringOptional
tags: RelationshipManager
asn: RelationshipManager
class LocationGeneric(CoreNode):
name: String
description: StringOptional
class InfraInterface(CoreNode):
name: String
description: StringOptional
speed: Integer
mtu: Integer
enabled: Boolean
status: DropdownOptional
role: DropdownOptional
device: RelatedNode
tags: RelationshipManager
class InfraLagInterface(CoreNode):
lacp: String
minimum_links: Integer
max_bundle: IntegerOptional
mlag: RelatedNode
class InfraMlagInterface(CoreNode):
mlag_id: Integer
mlag_domain: RelatedNode
class InfraService(CoreNode):
name: String
class InfraAutonomousSystem(CoreNode):
name: String
asn: Integer
description: StringOptional
organization: RelatedNode
class InfraBGPPeerGroup(CoreNode):
name: String
description: StringOptional
import_policies: StringOptional
export_policies: StringOptional
local_as: RelatedNode
remote_as: RelatedNode
class InfraBGPSession(CoreArtifactTarget):
type: String
description: StringOptional
import_policies: StringOptional
export_policies: StringOptional
status: Dropdown
role: Dropdown
local_as: RelatedNode
remote_as: RelatedNode
local_ip: RelatedNode
remote_ip: RelatedNode
device: RelatedNode
peer_group: RelatedNode
peer_session: RelatedNode
class InfraBackBoneService(InfraService):
circuit_id: String
internal_circuit_id: String
provider: RelatedNode
site_a: RelatedNode
site_b: RelatedNode
class InfraCircuit(CoreNode):
circuit_id: String
description: StringOptional
vendor_id: StringOptional
status: Dropdown
role: Dropdown
provider: RelatedNode
endpoints: RelationshipManager
bgp_sessions: RelationshipManager
class InfraCircuitEndpoint(InfraEndpoint):
description: StringOptional
site: RelatedNode
circuit: RelatedNode
class LocationContinent(LocationGeneric):
pass
class LocationCountry(LocationGeneric):
pass
class InfraDevice(CoreArtifactTarget):
name: String
description: StringOptional
type: String
status: DropdownOptional
role: DropdownOptional
site: RelatedNode
interfaces: RelationshipManager
asn: RelatedNode
tags: RelationshipManager
primary_address: RelatedNode
platform: RelatedNode
mlag_domain: RelatedNode
class IpamIPAddress(BuiltinIPAddress):
interface: RelatedNode
class IpamIPPrefix(BuiltinIPPrefix):
pass
class InfraInterfaceL2(InfraInterface, InfraEndpoint, CoreArtifactTarget):
l2_mode: String
lacp_rate: String
lacp_priority: Integer
lag: RelatedNode
untagged_vlan: RelatedNode
tagged_vlan: RelationshipManager
class InfraInterfaceL3(InfraInterface, InfraEndpoint, CoreArtifactTarget):
lacp_rate: String
lacp_priority: Integer
ip_addresses: RelationshipManager
lag: RelatedNode
class InfraLagInterfaceL2(InfraInterface, InfraLagInterface, CoreArtifactTarget):
l2_mode: String
members: RelationshipManager
untagged_vlan: RelatedNode
tagged_vlan: RelationshipManager
class InfraLagInterfaceL3(InfraInterface, InfraLagInterface, CoreArtifactTarget):
members: RelationshipManager
ip_addresses: RelationshipManager
class OrganizationManufacturer(OrganizationGeneric):
platform: RelationshipManager
class InfraMlagDomain(CoreNode):
name: String
domain_id: Integer
devices: RelationshipManager
peer_interfaces: RelationshipManager
class InfraMlagInterfaceL2(InfraMlagInterface):
members: RelationshipManager
class InfraMlagInterfaceL3(InfraMlagInterface):
members: RelationshipManager
class InfraPlatform(CoreNode):
name: String
description: StringOptional
nornir_platform: StringOptional
napalm_driver: StringOptional
netmiko_device_type: StringOptional
ansible_network_os: StringOptional
devices: RelationshipManager
class OrganizationProvider(OrganizationGeneric):
location: RelationshipManager
circuit: RelationshipManager
class LocationRack(LocationGeneric):
name: String
description: StringOptional
height: String
facility_id: StringOptional
serial_number: StringOptional
asset_tag: StringOptional
status: Dropdown
role: DropdownOptional
site: RelatedNode
tags: RelationshipManager
class LocationSite(LocationGeneric):
city: StringOptional
address: StringOptional
contact: StringOptional
devices: RelationshipManager
vlans: RelationshipManager
circuit_endpoints: RelationshipManager
tags: RelationshipManager
class OrganizationTenant(OrganizationGeneric):
location: RelationshipManager
circuit: RelationshipManager
class InfraVLAN(CoreNode):
name: String
description: StringOptional
vlan_id: Integer
status: Dropdown
role: Dropdown
site: RelatedNode
gateway: RelatedNode