original_docstring: 
      Create bond ports on the PTF
  
      Args:
          ptfhost: PTF host object
          ptf_ports: List of ports on the PTF
  
      Returns:
          Dictonary of bond ports and slave ports on the PTF
      
docstring: Create bond ports on the PTF
docstring_tokens: Create bond ports on the PTF
code: def create_bond_port(ptfhost, ptf_ports):
      """
      Create bond ports on the PTF
  
      Args:
          ptfhost: PTF host object
          ptf_ports: List of ports on the PTF
  
      Returns:
          Dictonary of bond ports and slave ports on the PTF
      """
      bond_port_map = OrderedDict()
      for port_index, port_name in ptf_ports.items():
          bond_port = 'bond{}'.format(port_index)
          ptfhost.shell("ip link add {} type bond".format(bond_port))
          ptfhost.shell("ip link set {} type bond miimon 100 mode 802.3ad".format(bond_port))
          ptfhost.shell("ip link set {} down".format(port_name))
          ptfhost.shell("ip link set {} master {}".format(port_name, bond_port))
          ptfhost.shell("ip link set dev {} up".format(bond_port))
          ptfhost.shell("ifconfig {} mtu 9216 up".format(bond_port))
  
          bond_port_map[bond_port] = port_name
  
      ptfhost.shell("supervisorctl restart ptf_nn_agent")
      time.sleep(5)
  
      return bond_port_map
code_tokens: def create_bond_port ( ptfhost , ptf_ports ) : bond_port_map = OrderedDict ( ) for port_index , port_name in ptf_ports . items ( ) : bond_port = 'bond{}' . format ( port_index ) ptfhost . shell ( "ip link add {} type bond" . format ( bond_port ) ) ptfhost . shell ( "ip link set {} type bond miimon 100 mode 802.3ad" . format ( bond_port ) ) ptfhost . shell ( "ip link set {} down" . format ( port_name ) ) ptfhost . shell ( "ip link set {} master {}" . format ( port_name , bond_port ) ) ptfhost . shell ( "ip link set dev {} up" . format ( bond_port ) ) ptfhost . shell ( "ifconfig {} mtu 9216 up" . format ( bond_port ) ) bond_port_map [ bond_port ] = port_name ptfhost . shell ( "supervisorctl restart ptf_nn_agent" ) time . sleep ( 5 ) return bond_port_map
short_docstring: Create bond ports on the PTF
short_docstring_tokens: Create bond ports on the PTF
comment: """
      Create bond ports on the PTF
  
      Args:
          ptfhost: PTF host object
          ptf_ports: List of ports on the PTF
  
      Returns:
          Dictonary of bond ports and slave ports on the PTF
      """