original_docstring: 
      Add port to namespace of the PTF
  
      Args:
          ptfhost: PTF host object
          name_of_namespace: Name of namespace
          port_name: Port of the PTF
          port_ip: IP address of the port
      
docstring: Add port to namespace of the PTF
docstring_tokens: Add port to namespace of the PTF
code: def add_port_to_namespace(ptfhost, name_of_namespace, port_name, port_ip):
      """
      Add port to namespace of the PTF
  
      Args:
          ptfhost: PTF host object
          name_of_namespace: Name of namespace
          port_name: Port of the PTF
          port_ip: IP address of the port
      """
      if not check_namespace(ptfhost, name_of_namespace):
          ptfhost.shell('ip netns add {}'.format(name_of_namespace))
          ptfhost.shell('ip -n {} link set lo up'.format(name_of_namespace))
  
      ptfhost.shell('ip link set {} netns {}'.format(port_name, name_of_namespace))
      ptfhost.shell('ip -n {} addr add {} dev {}'.format(name_of_namespace, port_ip, port_name))
      ptfhost.shell('ip -n {} link set {} up'.format(name_of_namespace, port_name))
code_tokens: def add_port_to_namespace ( ptfhost , name_of_namespace , port_name , port_ip ) : if not check_namespace ( ptfhost , name_of_namespace ) : ptfhost . shell ( 'ip netns add {}' . format ( name_of_namespace ) ) ptfhost . shell ( 'ip -n {} link set lo up' . format ( name_of_namespace ) ) ptfhost . shell ( 'ip link set {} netns {}' . format ( port_name , name_of_namespace ) ) ptfhost . shell ( 'ip -n {} addr add {} dev {}' . format ( name_of_namespace , port_ip , port_name ) ) ptfhost . shell ( 'ip -n {} link set {} up' . format ( name_of_namespace , port_name ) )
short_docstring: Add port to namespace of the PTF
short_docstring_tokens: Add port to namespace of the PTF
comment: """
      Add port to namespace of the PTF
  
      Args:
          ptfhost: PTF host object
          name_of_namespace: Name of namespace
          port_name: Port of the PTF
          port_ip: IP address of the port
      """