code: def _get_host_connections(self, host_id,
                                only_active_switch=False):
          
  
          host_found = False
          host_connections = []
          try:
              host_ifs = nxos_db.get_host_mappings(host_id)
          except excep.NexusHostMappingNotFound:
              host_ifs = []
          for ifs in host_ifs:
              host_found = True
              if (only_active_switch and
                  not self.is_switch_active(ifs.switch_ip)):
                  continue
              intf_type, port = nexus_help.split_interface_name(
                  ifs.if_id, ifs.ch_grp)
              # is_native set to const.NOT_NATIVE for
              # VNIC_TYPE of normal
              host_connections.append((
                  ifs.switch_ip, intf_type, port,
                  const.NOT_NATIVE, ifs.ch_grp))
  
          if not host_found:
              LOG.warning(HOST_NOT_FOUND, host_id)
  
          return host_connections
docs: Get switch IPs and interfaces from config host mapping.
  
          This method is used to extract switch/interface
          information from ini files when VNIC_TYPE is
          normal.  The ini files contain host to interface
          mappings.
  
          :param host_id: Host name from transaction
          :param only_active_switch: Indicator for selecting only
                     connections for switches that are active
          :returns: list of switch_ip, intf_type, port_id, is_native