diff options
author | Shinpei Muraoka <shinpei.muraoka@gmail.com> | 2016-12-28 13:14:48 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-12-29 22:06:52 +0900 |
commit | 95702135d401c99d852f00aad3c6e7b0c0fdfdea (patch) | |
tree | 06e7f9347709502ba6f4f6f9ede091c101feea94 | |
parent | 6ebf0f7e4aee0d911cddddde100ae953621a2ee5 (diff) |
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>
-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. |