/
bgp_schema.xsd
174 lines (151 loc) · 6.32 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
<!--
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'/>
<!-- 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']) -->
<!--#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:restriction base='xsd:integer'>
<xsd:minInclusive value='1'/>
<xsd:maxInclusive value='65535'/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name='BgpRouterParams'>
<xsd:sequence>
<xsd:element name='vendor' type='xsd:string'/>
<xsd:element name='vnc-managed' type='xsd:boolean'/>
<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='hold-time' type='BgpHoldTime' default='90'/>
<xsd:element name='address-families' type='AddressFamilies'/>
<xsd:element name='auth-key-chain' type='AuthenticationKeyChain'/>
</xsd:sequence>
</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:sequence>
<xsd:element name='session' type='BgpSession' maxOccurs='unbounded'/>
</xsd:sequence>
</xsd:complexType>
<!--
When multiple sessions are present, each session must have an unique id.
-->
<xsd:complexType name='BgpSession'>
<xsd:sequence>
<xsd:element name='uuid' type='xsd:string'/>
<xsd:element name='attributes' type='BgpSessionAttributes'
maxOccurs='3'/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name='BgpSessionAttributes'>
<xsd:sequence>
<!-- 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.
-->
<xsd:element name='bgp-router' type='xsd:string'/>
<xsd:element name='address-families' type='AddressFamilies'/>
<xsd:element name='auth-key-chain' type='AuthenticationKeyChain'/>
<!-- Configuration items such as import and export policy -->
</xsd:sequence>
</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:sequence>
<xsd:element name='family' type='AddressFamily' maxOccurs='unbounded'/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="KeyType">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value="md5"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="AuthenticationKeyItem">
<xsd:element name="key-id" type="xsd:string"/>
<xsd:element name="key-type" type="KeyType"/>
<xsd:element name="key" type="xsd:string"/>
<xsd:element name="start-time" type="xsd:dateTime"/>
</xsd:complexType>
<xsd:complexType name='AuthenticationKeyChain'>
<xsd:sequence>
<xsd:element name='auth-key-items' type='AuthenticationKeyItem'
maxOccurs='unbounded'/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name='service-chain-information' type='ServiceChainInfo'/>
<!-- #IFMAP-SEMANTICS-IDL
Property('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: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>