code: def list_ports(zone, permanent=True):
      '''
      List all ports in a zone.
  
      .. versionadded:: 2015.8.0
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' firewalld.list_ports
      '''
      cmd = '--zone={0} --list-ports'.format(zone)
  
      if permanent:
          cmd += ' --permanent'
  
      return __firewall_cmd(cmd).split(f list_ports(zone, permanent=True):
      '''
      List all ports in a zone.
  
      .. versionadded:: 2015.8.0
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' firewalld.list_ports
      '''
      cmd = '--zone={0} --list-ports'.format(zone)
  
      if permanent:
          cmd += ' --permanent'
  
      return __firewall_cmd(cmd).split()
docs: List all ports in a zone.
  
      .. versionadded:: 2015.8.0
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' firewalld.list_ports