diff options
-rw-r--r-- | doc/source/library_packet_ref.rst | 15 | ||||
-rw-r--r-- | ryu/lib/packet/bgp.py | 14 | ||||
-rw-r--r-- | ryu/services/protocols/bgp/bgpspeaker.py | 22 |
3 files changed, 37 insertions, 14 deletions
diff --git a/doc/source/library_packet_ref.rst b/doc/source/library_packet_ref.rst index 56c09f9f..c48310e6 100644 --- a/doc/source/library_packet_ref.rst +++ b/doc/source/library_packet_ref.rst @@ -128,6 +128,21 @@ Protocol Header classes .. autoclass:: ryu.lib.packet.bgp.BGPNotification :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 :members: diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py index 34025ad8..29c10a46 100644 --- a/ryu/lib/packet/bgp.py +++ b/ryu/lib/packet/bgp.py @@ -1006,6 +1006,20 @@ class LabelledVPNIP6AddrPrefix(_LabelledAddrPrefix, _VPNAddrPrefix, class EvpnEsi(StringifyMixin, TypeDisp, _Value): """ 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 _ESI_LEN = 10 diff --git a/ryu/services/protocols/bgp/bgpspeaker.py b/ryu/services/protocols/bgp/bgpspeaker.py index 76ca135a..6a0025c0 100644 --- a/ryu/services/protocols/bgp/bgpspeaker.py +++ b/ryu/services/protocols/bgp/bgpspeaker.py @@ -559,13 +559,14 @@ class BGPSpeaker(object): ``route_dist`` specifies a route distinguisher value. ``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. + 0 is the default and denotes a single-homed site. + If you want to advertise esi other than 0, + it must be set as dictionary type. + If esi is dictionary type, 'type' key must be set + and specifies ESI type. + For the supported ESI type, see :py:mod:`ryu.lib.packet.bgp.EvpnEsi`. + The remaining arguments are the same as that for + the corresponding class. ``ethernet_tag_id`` specifies the Ethernet Tag ID. @@ -675,13 +676,6 @@ class BGPSpeaker(object): ``route_dist`` specifies a route distinguisher value. ``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. |