Skip to content

Commit

Permalink
Merge "Add documentation for bgp_schema and loadbalancer schema files…
Browse files Browse the repository at this point in the history
…." into R3.1
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Aug 10, 2016
2 parents c165886 + 6957b81 commit 3f212eb
Show file tree
Hide file tree
Showing 2 changed files with 216 additions and 117 deletions.
149 changes: 93 additions & 56 deletions src/schema/bgp_schema.xsd
Expand Up @@ -22,7 +22,8 @@
Link('instance-target', 'routing-instance', 'route-target', ['ref']) -->
<xsd:element name="bgpaas-bgp-router"/>
<!--#IFMAP-SEMANTICS-IDL
Link('bgpaas-bgp-router', 'bgp-as-a-service', 'bgp-router', ['ref']) -->
Link('bgpaas-bgp-router', 'bgp-as-a-service', 'bgp-router', ['ref'], 'system-only', 'CRUD',
'Reference to internal BGP peer object automatically generated by the system.') -->

<xsd:element name="route-aggregate" type="ifmap:IdentityType"/>

Expand All @@ -32,16 +33,19 @@

<xsd:element name='aggregate-route-entries' type='RouteListType'/>
<!--#IFMAP-SEMANTICS-IDL
Property('aggregate-route-entries', 'route-aggregate') -->
Property('aggregate-route-entries', 'route-aggregate', 'required', 'CRUD',
'List of ip prefix (aggregate route prefix) for which aggregate route will be advertised. This aggregate route is advertised if a matching(longest prefix match) prefix is found.') -->

<xsd:element name='aggregate-route-nexthop' type='xsd:string'/>
<!--#IFMAP-SEMANTICS-IDL
Property('aggregate-route-nexthop', 'route-aggregate') -->
Property('aggregate-route-nexthop', 'route-aggregate', 'required', 'CRUD',
'Next for aggregate route that will be advertised.') -->

<xsd:element name="route-aggregate-routing-instance"/>
<!--#IFMAP-SEMANTICS-IDL
Link('route-aggregate-routing-instance',
'route-aggregate', 'routing-instance', ['ref']) -->
'route-aggregate', 'routing-instance', ['ref'], 'system-only', 'CRUD',
'Reference to internal routing instance object automatically generated by system.') -->

<xsd:simpleType name="SequenceNumberType">
<xsd:annotation>
Expand All @@ -65,7 +69,8 @@
<xsd:element name="routing-policy-routing-instance" type="RoutingPolicyType"/>
<!--#IFMAP-SEMANTICS-IDL
Link('routing-policy-routing-instance',
'routing-policy', 'routing-instance', ['ref']) -->
'routing-policy', 'routing-instance', ['ref'],
'Reference to internal routing instance object automatically generated by system. Reference has property of sequence number which is order of in which routing policies are applied to given routing instance.') -->

<!--#IFMAP-SEMANTICS-IDL
Property('default-ce-protocol', 'routing-instance') -->
Expand All @@ -79,7 +84,8 @@
<xsd:element name='bgp-router' type='IdentityType'/>
<xsd:element name='bgp-router-parameters' type='BgpRouterParams'/>
<!-- #IFMAP-SEMANTICS-IDL
Property('bgp-router-parameters', 'bgp-router') -->
Property('bgp-router-parameters', 'bgp-router', 'required', 'CRUD',
'BGP router configuration parameters like ip address, AS number, hold time etc.') -->

<xsd:simpleType name='BgpHoldTime'>
<xsd:annotation>
Expand All @@ -106,57 +112,65 @@
</xsd:simpleType>

<xsd:complexType name='BgpRouterParams'>
<xsd:annotation>
<xsd:documentation>
The gateway-address and ipv6-gateway-addreess fields are used only
for router-type bgpaas-client. They hold the ipv4 and ipv6 gateway
address for the ipv4 and ipv6 subnets from which the client has IP
addresses. The values are used as nexthops when advertising routes
to the client via bgp.
Note that the ipv6-gateway-address can be a regular ipv6 address or
a ipv4-mapped-ipv6 adddress.
</xsd:documentation>
</xsd:annotation>
<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='0'/>
<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:element name='gateway-address' type='smi:IpAddress'/>
<xsd:element name='ipv6-gateway-address' type='smi:IpAddress'/>
<xsd:element name="admin-down" type="xsd:boolean" default="false" required='optional' operations='CRUD'
description='Administratively up or down.'/>
<xsd:element name='vendor' type='xsd:string' required='optional' operations='CRUD'
description='Vendor name for this BGP router, contrail, juniper or cisco etc.'/>
<xsd:element name='autonomous-system' type='xsd:integer' required='true' operations='CUR'
description='Autonomus System number for this BGP router. Currently only 16 bit AS number is supported. For contrail control nodes this has to be equal to global AS number.'/>
<xsd:element name='identifier' type='smi:IpAddress' required='true' operations='CUR'
description='Router ID for this BGP router. Dotted ip notation. For contrail control-nodes System will automatically assign value of address field.'/>
<xsd:element name='address' type='smi:IpAddress' required='true' operations='CR'
description='Ip addres used to reach this BGP router by the system.'/>
<xsd:element name='port' type='xsd:integer' required='optional' operations='CUR'
description='TCP port number on which BGP protocol connections are accepted. default is based on standareds.'/>
<xsd:element name='source-port' type='xsd:integer' required='system-only' operations='CUR'
description='For system internal use in BGPaaS service.'/>
<xsd:element name='hold-time' type='BgpHoldTime' default='0' required='optional' operations='CRUD'
description='BGP hold time in seconds [0-65535], Max time to detect liveliness to peer. Value 0 will result in default value of 90 seconds'/>
<xsd:element name='address-families' type='AddressFamilies' required='optional' operations='CRUD'
description='BGP address families supported by BGP router' />
<xsd:element name='auth-data' type='AuthenticationData' required='optional' operations='CRUD'
description='Authentication related configuration like type, keys etc.'/>
<xsd:element name='local-autonomous-system' type='xsd:integer' required='optional' operations='CRUD'
description='Only for contrail control nodes, Autonomus System number if different then global AS number. Used when clusters of control nodes in same contrail system are in differnt locations. Currently only 16 bit AS number is supported.'/>
<xsd:element name='router-type' type='BgpRouterType' required='optional' operations='CRUD'
description='BGP router type.'/>
<xsd:element name='gateway-address' type='smi:IpAddress' required='optional' operations='CRUD'
description='gateway-address field is used only for router-type bgpaas-client. It holds the ipv4 gateway address for the ipv4 subnet from which the client has IP address. The value is used as nexthop when advertising routes to the client via bgp.' />
<xsd:element name='ipv6-gateway-address' type='smi:IpAddress' required='optional' operations='CRUD'
description='The ipv6-gateway-addreess field is used only for router-type bgpaas-client. It holds ipv6 gateway address for ipv6 subnet from which the client has IP address. The value is used as nexthop when advertising routes to the client via bgp. Note that the ipv6-gateway-address can be a regular ipv6 address or a ipv4-mapped-ipv6 adddress.'/>
</xsd:complexType>

<xsd:element name='instance-bgp-router'/>
<!-- #IFMAP-SEMANTICS-IDL
Link('instance-bgp-router', 'routing-instance',
'bgp-router', ['has']) -->
'bgp-router', ['has'], 'optional' 'CRUD',
'BGP router object represent configuration of BGP peers. All the BGP peers involved in contrail system are under default routing instance of the default virtual network.') -->

<xsd:element name='bgp-peering' type='BgpPeeringAttributes'/>
<!-- #IFMAP-SEMANTICS-IDL
Link('bgp-peering',
'bgp-router', 'bgp-router', ['ref']) -->
'bgp-router', 'bgp-router', ['ref'], 'optional', 'CRUD',
'References to peer BGP router, property of the reference has BGP peering attributes.') -->

<!--
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:element name='session' type='BgpSession' maxOccurs='unbounded' required='true' operations='CRUD'
description='List of BGP sessions parameters. There can be multiple BGP sessions between two BGP routers. Currently ony 1 session is supported.'/>
</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:element name='uuid' type='xsd:string' required='true' operations='CRUD'
description='When multiple sessions are present, each session must have an unique id.'/>
<xsd:element name='attributes' type='BgpSessionAttributes' maxOccurs='3' required='true' operations='CRUD'
description='There can be upto 3 instances BGP session attributes, representing configuration for both ends and common. Currently only 1 instance representing common attributes is supported.'/>
</xsd:complexType>

<xsd:complexType name='BgpSessionAttributes'>
Expand All @@ -171,15 +185,26 @@
speaker AS in the AS Path.
</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="as-override" 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:element name='bgp-router' type='xsd:string' required='optional' operations='CRUD'
description='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="admin-down" type="xsd:boolean" default="false" required='optional' operations='CRUD'
description='Administratively mark this session down.'/>
<xsd:element name="passive" type="xsd:boolean" default="false" required='optional' operations='CRUD'
description='This is passive session. It will not initiated connection. This is not relavent when session attributes represent common part. It is recomended that it should not be set to true in current release.'/>
<xsd:element name="as-override" type="xsd:boolean" default="false" required='optional' operations='CRUD'
description='To Be Added'/>
<xsd:element name='hold-time' type='BgpHoldTime' default='0' required='optional' operations='CRUD'
description='A non-zero hold-time overrides the hold-time inherited from the bgp-router configuration. BGP hold time in seconds [0-65535], Max time to detect liveliness of peer.'/>
<xsd:element name='loop-count' type='BgpAsPathLoopCount' default='0' required='optional' operation='CRUD'
description='For routing loop detection, loop-count is the number of times the local bgp-routers AS is
allowed in the AS_PATH attribute.'/>
<xsd:element name='address-families' type='AddressFamilies' required='optional' operations='CRUD'
description='BGP address families supported on this session.'/>
<xsd:element name='auth-data' type='AuthenticationData' required='optional' operations='CRUD'
description='Authentication related configuration for this session like type, keys etc.'/>
<xsd:element name='family-attributes' type='BgpFamilyAttributes' maxOccurs='unbounded'
required='optional' operations='CRUD'
description='Session attributes over ride per BGP address family. Attributes like address family, loop-count and prefix-limit.'/>
</xsd:complexType>

<xsd:complexType name='BgpFamilyAttributes'>
Expand All @@ -193,9 +218,13 @@
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:element name='address-family' type='AddressFamily' required='true' operation='CRUD'
description='Address family for which these parameters are applied.'/>
<xsd:element name='loop-count' type='BgpAsPathLoopCount' default='0' required='optional' operation='CRUD'
description='For routing loop detection, loop-count is the number of times the local bgp-routers AS is
allowed in the AS_PATH attribute.'/>
<xsd:element name='prefix-limit' type='BgpPrefixLimit' required='optional' operation='CRUD'
description='prefix-limit contains the maximum number of prefixes that are allowed to be received on the session for this address family.'/>
</xsd:complexType>

<xsd:simpleType name='BgpAsPathLoopCount'>
Expand Down Expand Up @@ -229,7 +258,8 @@
</xsd:simpleType>

<xsd:complexType name='AddressFamilies'>
<xsd:element name='family' type='AddressFamily' maxOccurs='unbounded'/>
<xsd:element name='family' type='AddressFamily' maxOccurs='unbounded'
description='BGP address families supported by contrail.'/>
</xsd:complexType>

<xsd:simpleType name="AuthenticationKeyType">
Expand All @@ -251,21 +281,26 @@
</xsd:complexType>

<xsd:complexType name='AuthenticationData'>
<xsd:element name="key-type" type="AuthenticationKeyType"/>
<xsd:element name='key-items' type='AuthenticationKeyItem' maxOccurs='2'/>
<xsd:element name="key-type" type="AuthenticationKeyType" required='true' operations='CRUD'
description='Authentication type for this session. Currently only MD5 is supported.'/>
<xsd:element name='key-items' type='AuthenticationKeyItem' maxOccurs='2' required='true' operation='CRUD'
description='Upto two keys can be specified. Currently only one key is supported.'/>
</xsd:complexType>

<xsd:element name='service-chain-information' type='ServiceChainInfo'/>
<!-- #IFMAP-SEMANTICS-IDL
Property('service-chain-information', 'routing-instance') -->
Property('service-chain-information', 'routing-instance', 'system-only', 'CRUD',
'Internal service chaining information, should not be modified.') -->

<xsd:element name='ipv6-service-chain-information' type='ServiceChainInfo'/>
<!-- #IFMAP-SEMANTICS-IDL
Property('ipv6-service-chain-information', 'routing-instance') -->
Property('ipv6-service-chain-information', 'routing-instance', 'system-only', 'CRUD',
'Internal service chaining information, should not be modified.') -->

<xsd:element name="routing-instance-is-default" type="xsd:boolean" default="false"/>
<!--#IFMAP-SEMANTICS-IDL
Property('routing-instance-is-default', 'routing-instance') -->
Property('routing-instance-is-default', 'routing-instance', 'system-only', 'CRUD',
'Internal service chaining information, should not be modified.') -->

<xsd:element name="routing-instance-has-pnf" type="xsd:boolean"
default="false"/>
Expand All @@ -283,7 +318,8 @@
</xsd:documentation>
</xsd:annotation>
<!--#IFMAP-SEMANTICS-IDL
Property('routing-instance-has-pnf', 'routing-instance') -->
Property('routing-instance-has-pnf', 'routing-instance', 'system-only', 'CRUD',
'Internal service chaining information, should not be modified.') -->

<xsd:complexType name="ServiceChainInfo">
<xsd:all>
Expand Down Expand Up @@ -312,6 +348,7 @@

<xsd:element name="static-route-entries" type="StaticRouteEntriesType"/>
<!--#IFMAP-SEMANTICS-IDL
Property('static-route-entries', 'routing-instance') -->
Property('static-route-entries', 'routing-instance', 'system-only', 'CRUD',
'Internal service chaining information, should not be modified.') -->

</xsd:schema>

0 comments on commit 3f212eb

Please sign in to comment.