/
bgp_schema.xsd
287 lines (250 loc) · 11.2 KB
/
bgp_schema.xsd
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!--
Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
-->
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bgp="http://www.contrailsystems.com/2012/BGP-CONFIG/0"
xmlns:smi="urn:ietf:params:xml:ns:opsawg:smi:base:1.0">
<xsd:include schemaLocation='ietf-l3vpn-schema.xsd'/>
<xsd:include schemaLocation='smi-base.xsd'/>
<xsd:include schemaLocation='routing_policy.xsd'/>
<!-- routing-instance: group of customer attachment points with the same
connectivity policies -->
<!-- Route Target extended community:"bgp:route-target" -->
<!-- VPN attachment interface on Customer Edge:"customer-attachment" -->
<!-- VPN attachment interface on Provider Edge:"provider-attachment" -->
<!--#IFMAP-SEMANTICS-IDL
Link('connection', 'routing-instance', 'routing-instance', ['ref']) -->
<!--#IFMAP-SEMANTICS-IDL
Link('instance-target', 'routing-instance', 'route-target', ['ref']) -->
<xsd:element name="route-aggregate" type="ifmap:IdentityType"/>
<xsd:complexType name='AggregateRouteType'>
<xsd:element name='prefix' type='xsd:string'/>
<xsd:element name='nexthop' type='xsd:string'/>
</xsd:complexType>
<xsd:element name='aggregate-route' type='AggregateRouteType'/>
<!--#IFMAP-SEMANTICS-IDL
Property('aggregate-route', 'route-aggregate') -->
<xsd:element name="routing-instance-route-aggregate"/>
<!--#IFMAP-SEMANTICS-IDL
Link('routing-instance-route-aggregate',
'routing-instance', 'route-aggregate', ['ref']) -->
<xsd:complexType name="RoutingPolicyType">
<xsd:annotation>
<xsd:documentation>
Sequence defines the position where the routing policy is inserted
into the existing list of policies in the routing-instance
It is string representation of floating number.
e.g. "1.01" or "0.1"
In this above case policy with "0.1" is inserted before "1.01"
</xsd:documentation>
</xsd:annotation>
<xsd:element name="sequence" type="xsd:string"/>
</xsd:complexType>
<xsd:element name="routing-instance-routing-policy" type="RoutingPolicyType"/>
<!--#IFMAP-SEMANTICS-IDL
Link('routing-instance-routing-policy',
'routing-instance', 'routing-policy', ['ref']) -->
<!--#IFMAP-SEMANTICS-IDL
Property('default-ce-protocol', 'routing-instance') -->
<!--#IFMAP-SEMANTICS-IDL
Link('binding', 'customer-attachment', 'routing-instance', []) -->
<!--#IFMAP-SEMANTICS-IDL
Property('attachment-address', 'customer-attachment') -->
<!--#IFMAP-SEMANTICS-IDL
Link('attachment-info', 'customer-attachment', 'provider-attachment', []) -->
<xsd:element name='bgp-router' type='IdentityType'/>
<xsd:element name='bgp-router-parameters' type='BgpRouterParams'/>
<!-- #IFMAP-SEMANTICS-IDL
Property('bgp-router-parameters', 'bgp-router') -->
<xsd:simpleType name='BgpHoldTime'>
<xsd:annotation>
<xsd:documentation>
A value of 0 is treated as unspecified. If the hold time is not
specified in BgpSessionAttributes or BgpRouterParams, the back
end uses a hard coded value of StateMachine::kHoldTime.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base='xsd:integer'>
<xsd:minInclusive value='0'/>
<xsd:maxInclusive value='65535'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name='BgpRouterType'>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="control-node"/>
<xsd:enumeration value="external-control-node"/>
<xsd:enumeration value="router"/>
<xsd:enumeration value="bgpaas-server"/>
<xsd:enumeration value="bgpaas-client"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name='BgpRouterParams'>
<xsd:element name="admin-down" type="xsd:boolean" default="false"/>
<xsd:element name='vendor' type='xsd:string'/>
<xsd:element name='autonomous-system' type='xsd:integer'/>
<xsd:element name='identifier' type='smi:IpAddress'/>
<xsd:element name='address' type='smi:IpAddress'/>
<xsd:element name='port' type='xsd:integer'/>
<xsd:element name='source-port' type='xsd:integer'/>
<xsd:element name='hold-time' type='BgpHoldTime' default='90'/>
<xsd:element name='address-families' type='AddressFamilies'/>
<xsd:element name='auth-data' type='AuthenticationData'/>
<xsd:element name='local-autonomous-system' type='xsd:integer'/>
<xsd:element name='router-type' type='BgpRouterType'/>
</xsd:complexType>
<xsd:element name='instance-bgp-router'/>
<!-- #IFMAP-SEMANTICS-IDL
Link('instance-bgp-router', 'routing-instance',
'bgp-router', ['has']) -->
<xsd:element name='bgp-peering' type='BgpPeeringAttributes'/>
<!-- #IFMAP-SEMANTICS-IDL
Link('bgp-peering',
'bgp-router', 'bgp-router', ['ref']) -->
<!--
The BgpPeering link defines the attributes for 1 (typically) or more
sessions between 2 bgp-routers.
-->
<xsd:complexType name='BgpPeeringAttributes'>
<xsd:element name='session' type='BgpSession' maxOccurs='unbounded'/>
</xsd:complexType>
<!--
When multiple sessions are present, each session must have an unique id.
-->
<xsd:complexType name='BgpSession'>
<xsd:element name='uuid' type='xsd:string'/>
<xsd:element name='attributes' type='BgpSessionAttributes' maxOccurs='3'/>
</xsd:complexType>
<xsd:complexType name='BgpSessionAttributes'>
<xsd:annotation>
<xsd:documentation>
When the parameters are uni-directional the bgp-router element
specifies to which node the configuration applies. If missing
the attributes apply to both ends of the session.
A non-zero hold-time overrides the hold-time inherited from the
bgp-router configuration.
</xsd:documentation>
</xsd:annotation>
<xsd:element name='bgp-router' type='xsd:string'/>
<xsd:element name="admin-down" type="xsd:boolean" default="false"/>
<xsd:element name="passive" type="xsd:boolean" default="false"/>
<xsd:element name='hold-time' type='BgpHoldTime' default='0'/>
<xsd:element name='loop-count' type='BgpAsPathLoopCount' default='0'/>
<xsd:element name='address-families' type='AddressFamilies'/>
<xsd:element name='auth-data' type='AuthenticationData'/>
<xsd:element name='family-attributes' type='BgpFamilyAttributes' maxOccurs='unbounded'/>
</xsd:complexType>
<xsd:complexType name='BgpFamilyAttributes'>
<xsd:annotation>
<xsd:documentation>
This type is used to configure per address-family parameters
for a BgpSession.
* loop-count is the number of times the local bgp-router's AS is
allowed in the AS_PATH attribute.
* prefix-limit contains the maximum number of prefixes that are
allowed to be received on the session.
</xsd:documentation>
</xsd:annotation>
<xsd:element name='address-family' type='AddressFamily'/>
<xsd:element name='loop-count' type='BgpAsPathLoopCount' default='0'/>
<xsd:element name='prefix-limit' type='BgpPrefixLimit'/>
</xsd:complexType>
<xsd:simpleType name='BgpAsPathLoopCount'>
<xsd:restriction base='xsd:integer'>
<xsd:minInclusive value='0'/>
<xsd:maxInclusive value='16'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name='BgpPrefixLimit'>
<xsd:annotation>
<xsd:documentation>
This is used to configure the maximum number of received prefixes.
More fields to control the behavior can be added in future e.g. if
the session should be torn down when the maximum is reached.
</xsd:documentation>
</xsd:annotation>
<xsd:element name='maximum' type='xsd:integer'/>
</xsd:complexType>
<xsd:simpleType name='AddressFamily'>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="inet"/>
<xsd:enumeration value="inet-vpn"/>
<xsd:enumeration value="e-vpn"/>
<xsd:enumeration value="erm-vpn"/>
<xsd:enumeration value="route-target"/>
<xsd:enumeration value="inet6-vpn"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name='AddressFamilies'>
<xsd:element name='family' type='AddressFamily' maxOccurs='unbounded'/>
</xsd:complexType>
<xsd:simpleType name="AuthenticationKeyType">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value="md5"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name='AuthenticationKeyId'>
<xsd:restriction base='xsd:integer'>
<xsd:minInclusive value='0'/>
<xsd:maxInclusive value='63'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="AuthenticationKeyItem">
<xsd:element name="key-id" type="AuthenticationKeyId"/>
<xsd:element name="key" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name='AuthenticationData'>
<xsd:element name="key-type" type="AuthenticationKeyType"/>
<xsd:element name='key-items' type='AuthenticationKeyItem' maxOccurs='2'/>
</xsd:complexType>
<xsd:element name='service-chain-information' type='ServiceChainInfo'/>
<!-- #IFMAP-SEMANTICS-IDL
Property('service-chain-information', 'routing-instance') -->
<xsd:element name='ipv6-service-chain-information' type='ServiceChainInfo'/>
<!-- #IFMAP-SEMANTICS-IDL
Property('ipv6-service-chain-information', 'routing-instance') -->
<xsd:element name="routing-instance-is-default" type="xsd:boolean" default="false"/>
<!--#IFMAP-SEMANTICS-IDL
Property('routing-instance-is-default', 'routing-instance') -->
<xsd:element name="routing-instance-has-pnf" type="xsd:boolean"
default="false"/>
<xsd:annotation>
<xsd:documentation>
This flag is used to indicate that the routing-instance has a
Physical Network Function (PNF) service associated with it. The
flag is set by Schema Transformer and examined by Control Node.
The flag is set if one of the following conditions is met.
* The routing-instance is created as left/right routing-instance
for a PNF service.
* The routing-instance is the default routing-instance of a
virtual-network that has one or more policies that apply a
PNF service.
</xsd:documentation>
</xsd:annotation>
<!--#IFMAP-SEMANTICS-IDL
Property('routing-instance-has-pnf', 'routing-instance') -->
<xsd:complexType name="ServiceChainInfo">
<xsd:all>
<xsd:element name='routing-instance' type='xsd:string'/>
<xsd:element name='prefix' type='xsd:string' maxOccurs='unbounded'/>
<xsd:element name='service-chain-address' type='smi:IpAddress'/>
<xsd:element name='service-instance' type='xsd:string'/>
<xsd:element name='source-routing-instance' type='xsd:string'/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name='StaticRouteType'>
<xsd:all>
<xsd:element name='prefix' type='xsd:string'/>
<xsd:element name='next-hop' type='xsd:string'/>
<xsd:element name='route-target' type='xsd:string' maxOccurs="unbounded"/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name="StaticRouteEntriesType">
<xsd:all>
<xsd:element name="route" type="StaticRouteType" maxOccurs="unbounded"/>
</xsd:all>
</xsd:complexType>
<xsd:element name="static-route-entries" type="StaticRouteEntriesType"/>
<!--#IFMAP-SEMANTICS-IDL
Property('static-route-entries', 'routing-instance') -->
</xsd:schema>