summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2016-08-22 17:21:36 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-08-25 13:33:44 +0900
commitd8b0ea97ccdd20c2191cfd29bf62ba9d1ad58d3a (patch)
treebfc70dc1566d5051d5754cbd473a0e8f067424a2
parent6d5a3022a10c8cb06df59f9f124aed72598413b1 (diff)
BGPSpeaker: Resolve unused argumet 'multi_exit_disc'
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/services/protocols/bgp/bgpspeaker.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ryu/services/protocols/bgp/bgpspeaker.py b/ryu/services/protocols/bgp/bgpspeaker.py
index 4608524a..b6128ec7 100644
--- a/ryu/services/protocols/bgp/bgpspeaker.py
+++ b/ryu/services/protocols/bgp/bgpspeaker.py
@@ -76,7 +76,7 @@ from ryu.services.protocols.bgp.info_base.vpnv4 import Vpnv4Path
from ryu.services.protocols.bgp.info_base.vpnv6 import Vpnv6Path
-NEIGHBOR_CONF_MED = 'multi_exit_disc'
+NEIGHBOR_CONF_MED = MULTI_EXIT_DISC # for backward compatibility
RF_VPN_V4 = vrfs.VRF_RF_IPV4
RF_VPN_V6 = vrfs.VRF_RF_IPV6
RF_L2_EVPN = vrfs.VRF_RF_L2_EVPN
@@ -393,18 +393,18 @@ class BGPSpeaker(object):
""" This method changes the neighbor configuration.
``conf_type`` specifies configuration type which you want to change.
- Currently ryu.services.protocols.bgp.bgpspeaker.NEIGHBOR_CONF_MED
+ Currently ryu.services.protocols.bgp.bgpspeaker.MULTI_EXIT_DISC
can be specified.
``conf_value`` specifies value for the configuration type.
"""
- assert conf_type == NEIGHBOR_CONF_MED or conf_type == CONNECT_MODE
+ assert conf_type == MULTI_EXIT_DISC or conf_type == CONNECT_MODE
func_name = 'neighbor.update'
attribute_param = {}
- if conf_type == NEIGHBOR_CONF_MED:
+ if conf_type == MULTI_EXIT_DISC:
attribute_param = {neighbors.MULTI_EXIT_DISC: conf_value}
elif conf_type == CONNECT_MODE:
attribute_param = {neighbors.CONNECT_MODE: conf_value}
@@ -610,6 +610,7 @@ class BGPSpeaker(object):
vrfs.EXPORT_RTS: export_rts,
vrfs.SITE_OF_ORIGINS: site_of_origins,
vrfs.VRF_RF: route_family,
+ vrfs.MULTI_EXIT_DISC: multi_exit_disc,
}
call('vrf.create', **vrf)