with PapiSocketExecutor(node) as papi_exec:
for i in xrange(n_tunnels):
args1['address'] = getattr(laddr + i * addr_incr, 'packed')
with PapiSocketExecutor(node) as papi_exec:
for i in xrange(n_tunnels):
args1['address'] = getattr(laddr + i * addr_incr, 'packed')
- args2['route']['prefix']['address']['un'] = \
- IPUtil.union_addr(taddr + i)
- args2['route']['paths'][0]['nh']['address'] = \
- IPUtil.union_addr(raddr + i * addr_incr)
+ args2['route'] = IPUtil.compose_vpp_route_structure(
+ node,
+ taddr + i,
+ prefix_len=128 if taddr.version == 6 else 32,
+ interface=interface,
+ gateway=raddr + i * addr_incr
+ )
history = False if 1 < i < n_tunnels - 1 else True
papi_exec.add(cmd1, history=history, **args1).\
add(cmd2, history=history, **args2)
history = False if 1 < i < n_tunnels - 1 else True
papi_exec.add(cmd1, history=history, **args1).\
add(cmd2, history=history, **args2)
:param if2_ip_addr: VPP node 2 interface IPv4/IPv6 address.
:param if1_key: VPP node 1 interface key from topology file.
:param if2_key: VPP node 2 interface key from topology file.
:param if2_ip_addr: VPP node 2 interface IPv4/IPv6 address.
:param if1_key: VPP node 1 interface key from topology file.
:param if2_key: VPP node 2 interface key from topology file.
:param crypto_alg: The encryption algorithm name.
:param integ_alg: The integrity algorithm name.
:param raddr_ip1: Policy selector remote IPv4/IPv6 start address for the
:param crypto_alg: The encryption algorithm name.
:param integ_alg: The integrity algorithm name.
:param raddr_ip1: Policy selector remote IPv4/IPv6 start address for the
- route = IPUtil.compose_vpp_route_structure(
- nodes['DUT1'], raddr_ip2.compressed,
- prefix_len=128 if raddr_ip2.version == 6 else 32,
- interface=0
- )
)
err_msg = 'Failed to add IP routes on host {host}'.format(
host=nodes['DUT1']['host'])
for i in xrange(n_tunnels):
args1['unnumbered_sw_if_index'] = ipsec_tunnels[i]
args2['sw_if_index'] = ipsec_tunnels[i]
)
err_msg = 'Failed to add IP routes on host {host}'.format(
host=nodes['DUT1']['host'])
for i in xrange(n_tunnels):
args1['unnumbered_sw_if_index'] = ipsec_tunnels[i]
args2['sw_if_index'] = ipsec_tunnels[i]
- args3['route']['prefix']['address']['un'] = \
- IPUtil.union_addr(raddr_ip2 + i)
- args3['route']['paths'][0]['sw_if_index'] = \
- ipsec_tunnels[i]
+ args3['route'] = IPUtil.compose_vpp_route_structure(
+ nodes['DUT1'],
+ (raddr_ip2 + i).compressed,
+ prefix_len=128 if raddr_ip2.version == 6 else 32,
+ interface=ipsec_tunnels[i]
+ )
history = False if 1 < i < n_tunnels - 1 else True
papi_exec.add(cmd1, history=history, **args1).\
add(cmd2, history=history, **args2).\
history = False if 1 < i < n_tunnels - 1 else True
papi_exec.add(cmd1, history=history, **args1).\
add(cmd2, history=history, **args2).\
- route = IPUtil.compose_vpp_route_structure(
- nodes['DUT2'], raddr_ip1.compressed,
- prefix_len=128 if raddr_ip1.version == 6 else 32,
- interface=0
- )
)
err_msg = 'Failed to add IP routes on host {host}'.format(
host=nodes['DUT2']['host'])
for i in xrange(n_tunnels):
args1['unnumbered_sw_if_index'] = ipsec_tunnels[i]
args2['sw_if_index'] = ipsec_tunnels[i]
)
err_msg = 'Failed to add IP routes on host {host}'.format(
host=nodes['DUT2']['host'])
for i in xrange(n_tunnels):
args1['unnumbered_sw_if_index'] = ipsec_tunnels[i]
args2['sw_if_index'] = ipsec_tunnels[i]
- args3['route']['prefix']['address']['un'] = \
- IPUtil.union_addr(raddr_ip1 + i)
- args3['route']['paths'][0]['sw_if_index'] = \
- ipsec_tunnels[i]
+ args3['route'] = IPUtil.compose_vpp_route_structure(
+ nodes['DUT1'],
+ (raddr_ip1 + i).compressed,
+ prefix_len=128 if raddr_ip1.version == 6 else 32,
+ interface=ipsec_tunnels[i]
+ )
history = False if 1 < i < n_tunnels - 1 else True
papi_exec.add(cmd1, history=history, **args1). \
add(cmd2, history=history, **args2). \
history = False if 1 < i < n_tunnels - 1 else True
papi_exec.add(cmd1, history=history, **args1). \
add(cmd2, history=history, **args2). \