library_bgp_speaker_ref: Fix unexpected unindent

This patch fixes unexpected unindent that occur when building.
Also, add ESI type to be specified for argument
esi of evpn_prefix_add and evpn_prefix_del.

Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Shinpei Muraoka 2016-12-28 13:14:48 +09:00 committed by FUJITA Tomonori
parent 6ebf0f7e4a
commit 95702135d4
3 changed files with 37 additions and 14 deletions

View File

@ -128,6 +128,21 @@ Protocol Header classes
.. autoclass:: ryu.lib.packet.bgp.BGPNotification .. autoclass:: ryu.lib.packet.bgp.BGPNotification
:members: :members:
.. autoclass:: ryu.lib.packet.bgp.EvpnEsi
:members:
.. autoclass:: ryu.lib.packet.bgp.EvpnArbitraryEsi
:members:
.. autoclass:: ryu.lib.packet.bgp.EvpnLACPEsi
:members:
.. autoclass:: ryu.lib.packet.bgp.EvpnL2BridgeEsi
:members:
.. autoclass:: ryu.lib.packet.bgp.EvpnMacBasedEsi
:members:
.. autoclass:: ryu.lib.packet.bgp.EvpnRouterIDEsi
:members:
.. autoclass:: ryu.lib.packet.bgp.EvpnASBasedEsi
:members:
.. automodule:: ryu.lib.packet.bmp .. automodule:: ryu.lib.packet.bmp
:members: :members:

View File

@ -1006,6 +1006,20 @@ class LabelledVPNIP6AddrPrefix(_LabelledAddrPrefix, _VPNAddrPrefix,
class EvpnEsi(StringifyMixin, TypeDisp, _Value): class EvpnEsi(StringifyMixin, TypeDisp, _Value):
""" """
Ethernet Segment Identifier Ethernet Segment Identifier
The supported ESI Types:
- ``EvpnEsi.ARBITRARY`` indicates EvpnArbitraryEsi.
- ``EvpnEsi.LACP`` indicates EvpnLACPEsi.
- ``EvpnEsi.L2_BRIDGE`` indicates EvpnL2BridgeEsi.
- ``EvpnEsi.MAC_BASED`` indicates EvpnMacBasedEsi.
- ``EvpnEsi.ROUTER_ID`` indicates EvpnRouterIDEsi.
- ``EvpnEsi.AS_BASED`` indicates EvpnASBasedEsi.
""" """
_PACK_STR = "!B" # ESI Type _PACK_STR = "!B" # ESI Type
_ESI_LEN = 10 _ESI_LEN = 10

View File

@ -559,13 +559,14 @@ class BGPSpeaker(object):
``route_dist`` specifies a route distinguisher value. ``route_dist`` specifies a route distinguisher value.
``esi`` is an value to specify the Ethernet Segment Identifier. ``esi`` is an value to specify the Ethernet Segment Identifier.
0 is the default and denotes a single-homed site. 0 is the default and denotes a single-homed site.
If you want to advertise esi other than 0, If you want to advertise esi other than 0,
it must be set as a dictionary type. it must be set as dictionary type.
The following keys and values must be set. If esi is dictionary type, 'type' key must be set
- type: specifies one of the ESI type. and specifies ESI type.
The remaining keys and values are the same as the argument of For the supported ESI type, see :py:mod:`ryu.lib.packet.bgp.EvpnEsi`.
the class corresponding to esi_type. The remaining arguments are the same as that for
the corresponding class.
``ethernet_tag_id`` specifies the Ethernet Tag ID. ``ethernet_tag_id`` specifies the Ethernet Tag ID.
@ -675,13 +676,6 @@ class BGPSpeaker(object):
``route_dist`` specifies a route distinguisher value. ``route_dist`` specifies a route distinguisher value.
``esi`` is an value to specify the Ethernet Segment Identifier. ``esi`` is an value to specify the Ethernet Segment Identifier.
0 is the default and denotes a single-homed site.
If you want to advertise esi other than 0,
it must be set as a dictionary type.
The following keys and values must be set.
- type: specifies one of the ESI type.
The remaining keys and values are the same as the argument of
the class corresponding to esi_type.
``ethernet_tag_id`` specifies the Ethernet Tag ID. ``ethernet_tag_id`` specifies the Ethernet Tag ID.