Use constants imported from API base
Backport of https://github.com/faucetsdn/ryu/commit/a09cae5a Story: #2009283 Task: #43620 Change-Id: I5c59a12678e407fd922608e5ee382dfb87209a67
This commit is contained in:
parent
7a5513c806
commit
21f18b5061
@ -43,6 +43,8 @@ from os_ken.services.protocols.bgp.api.base import ROUTE_FAMILY
|
||||
from os_ken.services.protocols.bgp.api.base import EVPN_VNI
|
||||
from os_ken.services.protocols.bgp.api.base import TUNNEL_TYPE
|
||||
from os_ken.services.protocols.bgp.api.base import PMSI_TUNNEL_TYPE
|
||||
from os_ken.services.protocols.bgp.api.base import MAC_MOBILITY
|
||||
from os_ken.services.protocols.bgp.api.base import TUNNEL_ENDPOINT_IP
|
||||
from os_ken.services.protocols.bgp.api.prefix import EVPN_MAX_ET
|
||||
from os_ken.services.protocols.bgp.api.prefix import ESI_TYPE_LACP
|
||||
from os_ken.services.protocols.bgp.api.prefix import ESI_TYPE_L2_BRIDGE
|
||||
@ -811,7 +813,7 @@ class BGPSpeaker(object):
|
||||
|
||||
# Pass on mac_mobility, must be integer value
|
||||
if mac_mobility is not None:
|
||||
kwargs['mac_mobility'] = int(mac_mobility)
|
||||
kwargs[MAC_MOBILITY] = int(mac_mobility)
|
||||
elif route_type == EVPN_MULTICAST_ETAG_ROUTE:
|
||||
kwargs.update({
|
||||
EVPN_ETHERNET_TAG_ID: ethernet_tag_id,
|
||||
@ -830,7 +832,7 @@ class BGPSpeaker(object):
|
||||
pmsi_tunnel_type)
|
||||
# Set non-default tunnel endpoint IP, if provided
|
||||
if tunnel_endpoint_ip is not None:
|
||||
kwargs['tunnel_endpoint_ip'] = tunnel_endpoint_ip
|
||||
kwargs[TUNNEL_ENDPOINT_IP] = tunnel_endpoint_ip
|
||||
elif route_type == EVPN_ETH_SEGMENT:
|
||||
kwargs.update({
|
||||
EVPN_ESI: esi,
|
||||
@ -849,7 +851,7 @@ class BGPSpeaker(object):
|
||||
|
||||
# Add mac_mobility
|
||||
if mac_mobility is not None:
|
||||
kwargs['mac_mobility'] = int(mac_mobility)
|
||||
kwargs[MAC_MOBILITY] = int(mac_mobility)
|
||||
else:
|
||||
raise ValueError('Unsupported EVPN route type: %s' % route_type)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user