Retrieve ipv4 address of interface and ipv4 address for corresponding neighbor
def test_fun(duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
ip_intfs = duthost.show_ip_interface()
namespace
- if multi-asic, namespace to run the commmand- Required:
False
- Type:
String
- Required:
Provides a dictionary with information on the interfaces. The dictionary hierarchy is described below, with each indentation describing a sub-dictionary:
ansible_facts
ip_interfaces
- Dictionary mapping interface name to information on the interface{INTERFACE_NAME}
- Dictionary with info in interfacebgp_neighbor
- Name of BGP neighbor for interfaceipv4
- interface configured ipv4 addresspeer_ipv4
- BGP neighbor ipv4 addressadmin
- admin stateoper_state
- operator stateprefix_len
- interface prefix length