code: def _get_switch_interfaces(self, requested_switch_ip, cfg_only=False):
          
  
          switch_ifs = []
  
          try:
              port_info = nxos_db.get_switch_host_mappings(
                              requested_switch_ip)
          except excep.NexusHostMappingNotFound:
              port_info = []
  
          for binding in port_info:
              if cfg_only and not binding.is_static:
                  continue
              intf_type, port = nexus_help.split_interface_name(
                                    binding.if_id)
              switch_ifs.append(
                  (requested_switch_ip, intf_type, port,
                  const.NOT_NATIVE, binding.ch_grp))
          return switch_ifs
docs: Get switch interfaces from host mapping DB.
  
          For a given switch, this returns all known port
          interfaces for a given switch.  These have been
          learned from received baremetal transactions and
          from configuration file.
  
          :param requested_switch_ip: switch_ip
          :returns: list of switch_ip, intf_type, port_id, is_native