def _get_plugins():
    """
    Get list of available host discovery plugin module names
    """

    plugins = []
    conf_file = os.path.expanduser('~/.smokercli.yaml')

    if not os.path.exists(conf_file):
        conf_file = CONFIG_FILE

    if not os.path.exists(conf_file):
        return plugins

    with open(conf_file) as f:
        config = yaml.safe_load(f)

    if config and 'plugin_paths' in config:
        paths = config['plugin_paths']
    else:
        raise Exception('Invalid config file')


    for path in paths:
        try:
            module = __import__(path)
        except __HOLE__:
            raise Exception('Invalid config file')

        toplevel = os.path.dirname(module.__file__)
        submodule = '/'.join(path.split('.')[1:])
        plugin_dir = os.path.join(toplevel, submodule, '*.py')
        modules = [os.path.basename(name)[:-3] for name in
                   glob.glob(plugin_dir)]
        modules.remove('__init__')
        plugins += ['%s.%s' % (path, name) for name in modules]

    return plugins
dataset/ETHPy150Open gooddata/smoker/smoker/client/cli.py/_get_plugins