2.109. vpp_interface module¶
-
class
vpp_interface.
VppInterface
(test)¶ Bases:
object
Generic VPP interface.
-
add_sub_if
(sub_if)¶ Register a sub-interface with this interface.
- Parameters
sub_if – sub-interface
-
admin_down
()¶ Put interface ADMIN-down.
-
admin_up
()¶ Put interface ADMIN-UP.
-
assert_interface_state
(admin_up_down, link_up_down, expect_event=False)¶
-
config_ip4
()¶ Configure IPv4 address on the VPP interface.
-
config_ip6
()¶ Configure IPv6 address on the VPP interface.
-
configure_ipv4_neighbors
()¶ For every remote host assign neighbor’s MAC to IPv4 addresses.
- Parameters
vrf_id – The FIB table / VRF ID. (Default value = 0)
-
configure_ipv6_neighbors
()¶ For every remote host assign neighbor’s MAC to IPv6 addresses.
- Parameters
vrf_id – The FIB table / VRF ID. (Default value = 0)
-
disable_ipv6_ra
()¶ Configure IPv6 RA suppress on the VPP interface.
-
disable_mpls
()¶ Enable MPLS on the VPP interface.
-
dump
¶ RAW result of sw_interface_dump for this interface.
-
enable_mpls
()¶ Enable MPLS on the VPP interface.
-
generate_remote_hosts
(count=1)¶ Generate and add remote hosts for the interface.
- Parameters
count (int) – Number of generated remote hosts.
-
get_interface_config_from_dump
(dump)¶
-
get_rx_stats
()¶
-
get_tx_stats
()¶
-
host_by_ip4
(ip)¶ - Parameters
ip – IPv4 address to find host by.
- Returns
Host object assigned to interface.
-
host_by_ip6
(ip)¶ - Parameters
ip – IPv6 address to find host by.
- Returns
Host object assigned to interface.
-
host_by_mac
(mac)¶ - Parameters
mac – MAC address to find host by.
- Returns
Host object assigned to interface.
-
ip6_disable
()¶ Put interface ADMIN-DOWN.
-
ip6_enable
()¶ IPv6 Enable interface
-
ip6_ra_config
(no=0, suppress=0, send_unicast=0)¶ Configure IPv6 RA suppress on the VPP interface.
-
ip6_ra_prefix
(address, address_length, is_no=0, off_link=0, no_autoconfig=0, use_default=0)¶ Configure IPv6 RA suppress on the VPP interface.
-
is_interface_config_in_dump
(dump)¶
-
is_ip4_entry_in_fib_dump
(dump)¶
-
link_down
()¶ Put interface link-state-down.
-
link_up
()¶ Put interface link-state-UP.
-
local_addr
¶
-
local_addr_n
¶
-
local_ip4
¶ Local IPv4 address on VPP interface (string).
-
local_ip4n
¶ Local IPv4 address - raw, suitable as API parameter.
-
local_ip6
¶ Local IPv6 address on VPP interface (string).
-
local_ip6_ll
¶ Local IPv6 link-local address on VPP interface (string).
-
local_ip6n
¶ Local IPv6 address - raw, suitable as API parameter.
-
local_ip6n_ll
¶ Local IPv6 link-local address - raw, suitable as API parameter.
-
local_mac
¶ MAC-address of the VPP interface.
-
name
¶ Name of the interface.
-
query_vpp_config
()¶
-
remote_addr
¶
-
remote_addr_n
¶
-
remote_hosts
¶ Remote hosts list
-
remote_ip4
¶ IPv4 address of remote peer “connected” to this interface.
-
remote_ip4n
¶ IPv4 address of remote peer - raw, suitable as API parameter.
-
remote_ip6
¶ IPv6 address of remote peer “connected” to this interface.
-
remote_ip6_ll
¶ Link-local IPv6 address of remote peer “connected” to this interface.
-
remote_ip6n
¶ IPv6 address of remote peer - raw, suitable as API parameter
-
remote_ip6n_ll
¶ Link-local IPv6 address of remote peer - raw, suitable as API parameter
-
remote_mac
¶ MAC-address of the remote interface “connected” to this interface
-
set_mac
(mac)¶
-
set_proxy_arp
(enable=1)¶ Set the interface to enable/disable Proxy ARP
-
set_sw_if_index
(sw_if_index)¶
-
set_table_ip4
(table_id)¶ Set the interface in a IPv4 Table.
Note
Must be called before configuring IP4 addresses.
-
set_table_ip6
(table_id)¶ Set the interface in a IPv6 Table.
Note
Must be called before configuring IP6 addresses.
-
set_unnumbered
(ip_sw_if_index)¶ Set the interface to unnumbered via ip_sw_if_index
-
sw_if_index
¶ Interface index assigned by VPP.
-
test
¶ Test case creating this interface.
-
unconfig
()¶ Unconfigure IPv6 and IPv4 address on the VPP interface.
-
unconfig_ip4
()¶ Remove IPv4 address on the VPP interface.
-
unconfig_ip6
()¶ Remove IPv6 address on the VPP interface.
-
unset_unnumbered
(ip_sw_if_index)¶ Unset the interface to unnumbered via ip_sw_if_index
-