Find port-alias mapping if there is any configured.
def test_fun(duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
hwsku = duthost.facts['hwsku']
port_alias_facts = duthost.port_alias(hwsku=hwsku, include_internal=False)
hwsku
- Type of hardware switch being used- Required:
True
- Type:
String
- Required:
num_asic
- Number of ASICs on a multi-ASIC device.- Required:
False
- Type:
Integer
- Required:
include_internal
- Whether or not to include internal ports- Required:
False
- Type:
Boolean
- Default:
False
- Required:
card
- Type of linecard being used- Required:
False
- Type:
String
- Required:
hostname
- desired hostname- Required:
False
- Type:
String
- Required:
start_switchid
- id for desired switch- Required:
False
- Type:
Integer
- Required:
Returns dictionary with port aliases and port speeds. The dictionary hierarchy is described below, with each indentation describing a sub-dictionary:
ansible_facts
- Dictionary containing port infoport_alias
- list of port aliasesport_speed
- Dictionary that maps aliases to thier speed{PORT_ALIAS}
- speed of specified port