Skip to content

Commit

Permalink
Schema changes for Type-5 EVPN
Browse files Browse the repository at this point in the history
To handle EVPN Type-5 prefixes, all L2 virtual-networks are to be associated
with a single L3VRF virtual-network. This is used to route packets for all
children L2 virtual-networks.

There already exists a link between logical-router and virtual-network. In this
schema change, this link is annotated with attributes so that the relationship
can be futher qualified. This attribute defaults to existing behavior as
ExternalGateway. Additional L2VN and L3VN types are added to this link attribute.

Change-Id: I560596afb5f16e77c48b1ae926e608afd5c8c504
Depends-On: I0aa35f774bab5f756c0d72ab2088c033356de747
Implements: blueprint https://blueprints.launchpad.net/opencontrail/+spec/evpn-type-5
Partial-bug: 1636654
  • Loading branch information
ananth-at-camphor-networks committed Feb 16, 2018
1 parent 22bf47c commit 0f3fbb0
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions src/schema/vnc_cfg.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ targetNamespace="http://www.contrailsystems.com/2012/VNC-CONFIG/0">

<!--Common types-->


<xsd:complexType name="MacAddressesType">
<xsd:element name="mac-address" maxOccurs="unbounded"/>
</xsd:complexType>
Expand Down Expand Up @@ -1619,12 +1618,12 @@ targetNamespace="http://www.contrailsystems.com/2012/VNC-CONFIG/0">
<!--#IFMAP-SEMANTICS-IDL
Link('virtual-network-network-ipam',
'virtual-network', 'network-ipam', ['ref'], 'required', 'CRUD',
'Reference to network-ipam this network is using. It has list of subnets that are being used as property of the reference.') -->
'Reference to network-ipam this network is using. It has list of subnets that are to be used as property of the reference.') -->
<xsd:element name="virtual-router-network-ipam" type="VirtualRouterNetworkIpamType"/>
<!--#IFMAP-SEMANTICS-IDL
Link('virtual-router-network-ipam',
'virtual-router', 'network-ipam', ['ref'], 'optional', 'CRUD',
'Reference to network-ipam this virtual-router is using. It has list of virtual-router specific allocation-pools and cidrs that are being used as property of the reference.') -->
'Reference to network-ipam this virtual-router is using. It has list of virtual-router specific allocation-pools and cidrs that are to be used as property of the reference.') -->

<xsd:element name="network-policy" type="ifmap:IdentityType"/>
<xsd:element name="project-network-policy"/>
Expand Down Expand Up @@ -2952,15 +2951,37 @@ targetNamespace="http://www.contrailsystems.com/2012/VNC-CONFIG/0">
'logical-router', 'route-table', ['ref'], 'optional', 'CRUD',
'Reference to the route table attached to this logical router. By attaching route table, system will create static routes with the route target only of route targets linked to this logical router') -->

<xsd:simpleType name="LogicalRouterVirtualNetworkEnumType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ExternalGateway"
description='Virtual network is used as external gateway for this logical router. This link will cause a SNAT to be spawned between all networks connected to logical router and external network.'/>
<xsd:enumeration value="InternalVirtualNetwork"
description='Virtual-network is used for EVPN Layer3 packets routing. This network is used to route packets from all children EVPN Layer2 networks linked this logical-router'/>
</xsd:restriction>
</xsd:simpleType>

<xsd:complexType name="LogicalRouterVirtualNetworkType">
<xsd:element name="logical-router-virtual-network-type" type="LogicalRouterVirtualNetworkEnumType" required='optional' default='ExternalGateway'/>
</xsd:complexType>

<!--
Link a virtual network used as the external gateway for source NAT support
(aka external gateway in OpenStack Neutron API).
(aka external gateway in OpenStack Neutron API) or as the L3VN for routing in evpn (aka evpn type-5 prefix based routing).
-->
<xsd:element name="logical-router-gateway"/>
<xsd:element name="logical-router-virtual-network" type="LogicalRouterVirtualNetworkType"/>
<!--#IFMAP-SEMANTICS-IDL
Link('logical-router-gateway',
Link('logical-router-virtual-network',
'logical-router', 'virtual-network', ['ref'], 'optional', 'CRUD',
'Reference to virtual network used as external gateway for this logical network. This link will cause a SNAT being spawned between all networks connected to logical router and external network.') -->
'Reference to a virtual network. Please refer to link attribute for additional details') -->

<!--
Link a logical router to a virtual network used for external connectivity.
-->
<xsd:element name="virtual-network-logical-router"/>
<!--#IFMAP-SEMANTICS-IDL
Link('virtual-network-logical-router',
'virtual-network', 'logical-router', ['ref'], 'optional', 'CRUD',
'Reference to a logical-router used for external connectivity') -->

<xsd:element name="logical-router-service-instance"/>
<!--#IFMAP-SEMANTICS-IDL
Expand Down

0 comments on commit 0f3fbb0

Please sign in to comment.