import time
from collections import deque
-import deprecation
from six import moves, iteritems
from vpp_papi import VPP, mac_pton
-
from hook import Hook
from vpp_l2 import L2_PORT_TYPE
-
-# from vnet/vnet/mpls/mpls_types.h
-MPLS_IETF_MAX_LABEL = 0xfffff
-MPLS_LABEL_INVALID = MPLS_IETF_MAX_LABEL + 1
+from vpp_ip_route import MPLS_IETF_MAX_LABEL, MPLS_LABEL_INVALID
class L2_VTR_OP:
'ipsec_tunnel_if_add_del': {'is_add': 1, 'anti_replay': 1, },
'l2_emulation': {'enable': 1, },
'l2fib_add_del': {'is_add': 1, },
+ 'lb_conf': {'sticky_buckets_per_core': 4294967295,
+ 'flow_timeout': 4294967295},
'lisp_add_del_adjacency': {'is_add': 1, },
'lisp_add_del_local_eid': {'is_add': 1, },
'lisp_add_del_locator': {'priority': 1, 'weight': 1, 'is_add': 1, },
self.hook.after_api(api_fn.__name__, api_args)
return reply
- @deprecation.deprecated(
- deprecated_in="19.04", removed_in="19.07",
- details="Use the Corresponding API function instead.")
def cli(self, cli):
""" Execute a CLI, calling the before/after hooks appropriately.
is_ipv6=0,
encap_table_id=0,
vni=0,
+ mode=1,
instance=0xFFFFFFFF):
"""
'mcast_sw_if_index': mcast_sw_if_index,
'encap_table_id': encap_table_id,
'vni': vni,
- 'instance': instance}})
+ 'instance': instance,
+ "mode": mode}})
def vxlan_gbp_tunnel_dump(self, sw_if_index=0xffffffff):
return self.api(self.papi.vxlan_gbp_tunnel_dump,
anti_replay=1, renumber=0, show_instance=0):
return self.api(
self.papi.ipsec_tunnel_if_add_del,
- {'local_ip': local_ip, 'remote_ip': remote_ip,
- 'local_spi': local_spi, 'remote_spi': remote_spi,
- 'crypto_alg': crypto_alg,
- 'local_crypto_key_len': len(local_crypto_key),
- 'local_crypto_key': local_crypto_key,
- 'remote_crypto_key_len': len(remote_crypto_key),
- 'remote_crypto_key': remote_crypto_key, 'integ_alg': integ_alg,
- 'local_integ_key_len': len(local_integ_key),
- 'local_integ_key': local_integ_key,
- 'remote_integ_key_len': len(remote_integ_key),
- 'remote_integ_key': remote_integ_key, 'is_add': is_add,
- 'esn': esn, 'anti_replay': anti_replay, 'renumber': renumber,
- 'show_instance': show_instance
- })
+ {
+ 'local_ip': local_ip,
+ 'remote_ip': remote_ip,
+ 'local_spi': local_spi,
+ 'remote_spi': remote_spi,
+ 'crypto_alg': crypto_alg,
+ 'local_crypto_key_len': len(local_crypto_key),
+ 'local_crypto_key': local_crypto_key,
+ 'remote_crypto_key_len': len(remote_crypto_key),
+ 'remote_crypto_key': remote_crypto_key,
+ 'integ_alg': integ_alg,
+ 'local_integ_key_len': len(local_integ_key),
+ 'local_integ_key': local_integ_key,
+ 'remote_integ_key_len': len(remote_integ_key),
+ 'remote_integ_key': remote_integ_key,
+ 'is_add': is_add,
+ 'esn': esn,
+ 'anti_replay': anti_replay,
+ 'renumber': renumber,
+ 'show_instance': show_instance
+ })
def ipsec_select_backend(self, protocol, index):
return self.api(self.papi.ipsec_select_backend,