Repository URL to install this package:
Version:
5.2.8-5.2 ▾
|
python3-dmapi
/
usr
/
lib
/
python3.6
/
site-packages
/
dmapi
/
conf
/
__pycache__
/
opts.cpython-36.opt-1.pyc
|
---|
3 r`eV ã @ sT d Z ddlZddlZddlZddlZdZdd Zdd Zdd Zd d Z dd Z dS ) a This is the single point of entry to generate the sample configuration file for Nova. It collects all the necessary info from the other modules in this package. It is assumed that: * every other module in this package has a 'list_opts' function which return a dict where * the keys are strings which are the group names * the value of each key is a list of config options for that group * the dmapi.conf package doesn't have further packages with config options * this module is only used in the context of sample file generation é NÚ list_optsc C s dd t | j D S )z;Take the dict of options and convert to the 2-tuple format.c S s g | ]\}}||fqS © r )Ú.0ÚkeyÚvalr r ú/usr/lib/python3.6/opts.pyú <listcomp> s z_tupleize.<locals>.<listcomp>)ÚlistÚitems)Zdctr r r Ú _tupleize s r c C s* t jt} t }t|}t|| t| S )N)ÚcollectionsÚdefaultdictr Ú_list_module_namesÚ_import_modulesÚ_append_config_optionsr )ÚoptsÚmodule_namesÚimported_modulesr r r r s c C sT g } t jjt jjt}x6tj|gdD ]$\}}}|dks(|rBq(q(| j| q(W | S )N)Úpathr )Úosr ÚdirnameÚabspathÚ__file__ÚpkgutilZiter_modulesÚappend)r Zpackage_pathÚ_ÚmodnameZispkgr r r r &