summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorShinpei Muraoka <shinpei.muraoka@gmail.com>2017-03-24 17:10:47 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-03-28 10:00:16 +0900
commita486539400f5348f14826dab6b1a3f685d157e53 (patch)
tree76ddf285b72d7ce159f87346b2799497d3bf5150
parent880bd4ab8547c9d3cd3592aad1f81d894823ed3e (diff)
BGPSpeaker/SSH: Supports display of Flow Specification RIB
Signed-off-by: Shinpei Muraoka <shinpei.muraoka@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/services/protocols/bgp/operator/commands/show/neighbor.py2
-rw-r--r--ryu/services/protocols/bgp/operator/commands/show/rib.py11
-rw-r--r--ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py2
-rw-r--r--ryu/services/protocols/bgp/operator/internal_api.py4
4 files changed, 16 insertions, 3 deletions
diff --git a/ryu/services/protocols/bgp/operator/commands/show/neighbor.py b/ryu/services/protocols/bgp/operator/commands/show/neighbor.py
index 8cd4af45..20dcaa63 100644
--- a/ryu/services/protocols/bgp/operator/commands/show/neighbor.py
+++ b/ryu/services/protocols/bgp/operator/commands/show/neighbor.py
@@ -128,7 +128,7 @@ class SentRoutes(Command):
if v.get('timestamp'):
time = strftime("%Y/%m/%d %H:%M:%S", v.get('timestamp'))
ret += cls.fmtstr.format(path_status, time, prefix, labels,
- next_hop, str(med), str(localpref),
+ str(next_hop), str(med), str(localpref),
' '.join(map(str, aspath)))
return ret
diff --git a/ryu/services/protocols/bgp/operator/commands/show/rib.py b/ryu/services/protocols/bgp/operator/commands/show/rib.py
index 022e35cd..33cb2a1c 100644
--- a/ryu/services/protocols/bgp/operator/commands/show/rib.py
+++ b/ryu/services/protocols/bgp/operator/commands/show/rib.py
@@ -11,7 +11,16 @@ from .route_formatter_mixin import RouteFormatterMixin
class RibBase(Command, RouteFormatterMixin):
- supported_families = ['ipv4', 'ipv6', 'vpnv4', 'rtfilter', 'vpnv6', 'evpn']
+ supported_families = [
+ 'ipv4',
+ 'ipv6',
+ 'vpnv4',
+ 'vpnv6',
+ 'rtfilter',
+ 'evpn',
+ 'ipv4fs',
+ 'vpnv4fs',
+ ]
class Rib(RibBase):
diff --git a/ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py b/ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py
index 4e0a9b38..73f422bb 100644
--- a/ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py
+++ b/ryu/services/protocols/bgp/operator/commands/show/route_formatter_mixin.py
@@ -42,7 +42,7 @@ class RouteFormatterMixin(object):
# Append path info to String buffer.
buff.write(cls.fmtstr.format(path_status, prefix, str(labels),
- next_hop, bpr, str(med),
+ str(next_hop), bpr, str(med),
str(localpref),
' '.join(map(str, aspath))))
diff --git a/ryu/services/protocols/bgp/operator/internal_api.py b/ryu/services/protocols/bgp/operator/internal_api.py
index ae18f427..51352fb9 100644
--- a/ryu/services/protocols/bgp/operator/internal_api.py
+++ b/ryu/services/protocols/bgp/operator/internal_api.py
@@ -7,6 +7,8 @@ from ryu.lib.packet.bgp import RF_IPv6_UC
from ryu.lib.packet.bgp import RF_IPv4_VPN
from ryu.lib.packet.bgp import RF_IPv6_VPN
from ryu.lib.packet.bgp import RF_L2_EVPN
+from ryu.lib.packet.bgp import RF_IPv4_FLOWSPEC
+from ryu.lib.packet.bgp import RF_VPNv4_FLOWSPEC
from ryu.lib.packet.bgp import RF_RTC_UC
from ryu.lib.packet.bgp import BGP_ATTR_TYPE_ORIGIN
from ryu.lib.packet.bgp import BGP_ATTR_TYPE_AS_PATH
@@ -84,6 +86,8 @@ class InternalApi(object):
'vpnv4': RF_IPv4_VPN,
'vpnv6': RF_IPv6_VPN,
'evpn': RF_L2_EVPN,
+ 'ipv4fs': RF_IPv4_FLOWSPEC,
+ 'vpnv4fs': RF_VPNv4_FLOWSPEC,
'rtfilter': RF_RTC_UC
}
if addr_family not in rfs: