docs: def get_plugins(**kwargs):
      """
          Get all available plugins
      """
      
      plugins = []
      plugin_paths = []
      
      #Look in directory or set of directories for
      #plugins
      
      base_plugin_dir = config.get('plugin', 'default_directory')
      plugin_xsd_path = config.get('plugin', 'plugin_xsd_path')
  
      base_plugin_dir_contents = os.listdir(base_plugin_dir)
      for directory in base_plugin_dir_contents:
          #ignore hidden files
          if directory[0] == '.' or directory == 'xml':
              continue
  
          #Is this a file or a directory? If it's a directory, it's a plugin.
          path = os.path.join(base_plugin_dir, directory)
          if os.path.isdir(path):
              plugin_paths.append(path)
     
  
      #For each plugin, get its details (an XML string)
      
      #Retrieve the xml schema for validating the XML to make sure
      #what is being provided  to the IU is correct.
      xmlschema_doc = etree.parse(plugin_xsd_path)
                      
      xmlschema = etree.XMLSchema(xmlschema_doc)
      
      #Get the xml description file from the plugin directory. If there
      #is no xml file, the plugin in unusable.
      for plugin_dir in plugin_paths:
          full_plugin_path = os.path.join(plugin_dir, 'trunk')
          
          dir_contents = os.listdir(full_plugin_path)
          #look for a plugin.xml file in the plugin directory 
          for file_name in dir_contents:
              file_path = os.path.join(full_plugin_path, file_name)
              if file_name == 'plugin.xml':
                  
                  f = open(file_path, 'r')
                  
                  #validate the xml using the xml schema for defining
                  #plugin details
                  try:
                      y = open(file_path, 'r')
                      
                      xml_tree = etree.parse(y)
  
                      xmlschema.assertValid(xml_tree)
                     
                      plugins.append(etree.tostring(xml_tree))
                  except Exception as e:
                      log.critical("Schema %s did not validate! (error was %s)"%(file_name, e))
  
                  break
          else:
              log.warning("No xml plugin details found for %s. Ignoring", plugin_dir)
  
      return plugins