o
    3'Ûf}  ã                   @   sd   d Z ddlZddlZddlmZ dZ	 dZ	 dZ	 dZ	 dZ		 dZ
	 dZ	 deeef fdd	„ZdS )
a?  
Feature flags are used as a way to easily toggle configuration
**at build time**. They are provided to accommodate feature deprecation and
downstream configuration changes.

Currently used upstream values for feature flags are set in
``cloudinit/features.py``. Overrides to these values should be
patched directly (e.g., via quilt patch) by downstreams.

Each flag should include a short comment regarding the reason for
the flag and intended lifetime.

Tests are required for new feature flags, and tests must verify
all valid states of a flag, not just the default state.
é    N)ÚDictTFz22.1Úreturnc                   C   s   dd„ t jd j ¡ D ƒS )z@Return a dict of applicable features/overrides and their values.c                 S   s*   i | ]}t  d |¡r|ttjd |ƒ“qS )z^[_A-Z0-9]+$úcloudinit.features)ÚreÚmatchÚgetattrÚsysÚmodules)Ú.0Úk© r   ú4/usr/lib/python3/dist-packages/cloudinit/features.pyÚ
<dictcomp>   s    
ýÿz get_features.<locals>.<dictcomp>r   )r   r	   Ú__dict__Úkeysr   r   r   r   Úget_features}   s   þr   )Ú__doc__r   r   Útypingr   ÚERROR_ON_USER_DATA_FAILUREÚ+ALLOW_EC2_MIRRORS_ON_NON_AWS_INSTANCE_TYPESÚEXPIRE_APPLIES_TO_HASHED_USERSÚNETPLAN_CONFIG_ROOT_READ_ONLYÚ%NOCLOUD_SEED_URL_APPEND_FORWARD_SLASHÚAPT_DEB822_SOURCE_LIST_FILEÚDEPRECATION_INFO_BOUNDARYÚstrÚboolr   r   r   r   r   Ú<module>   s&   
	"