Current File : //usr/share/netplan/netplan_cli/cli/commands/__pycache__/info.cpython-312.pyc |
�
Z9
g� � �J � d Z ddlmZ ddlmZ G d� dej � Zy)znetplan info command line� )�utils� )� _featuresc �* � � e Zd Z� fd�Zd� Zd� Z� xZS )�NetplanInfoc �* �� t �| � ddd�� y )N�infozShow available featuresT)�
command_id�description�leaf)�super�__init__)�self� __class__s ��3/usr/share/netplan/netplan_cli/cli/commands/info.pyr zNetplanInfo.__init__ s �� �
���F�%>�"� � $� c � � | j j d�� }|j ddddd�� |j d ddd
d�� | j | _ | j � | j
� y )NF)�requiredz--json�version_format�store_const�jsonz*Output version and features in JSON format)�dest�action�const�helpz--yaml�yamlz*Output version and features in YAML format)�parser�add_mutually_exclusive_group�add_argument�command_info�func�
parse_args�run_command)r �format_groups r �runzNetplanInfo.run s� � ��{�{�?�?��?�O���!�!�(�1A�-�(.�'S� "� U� �!�!�(�1A�-�(.�'S� "� U� �%�%�� ��������r c � � dddii}t j }|d j d|i� | j �d| _ | j dk( r!dd l}t |j
|d� � � y | j dk( rDt d
j |d d � � t j D ] }t d|z � � y y )Nz
netplan.io�websitezhttps://netplan.io/�featuresr r � r )�indentz'netplan.io:
website: "{}"
features:z - )r �NETPLAN_FEATURE_FLAGS�updater r �print�dumps�format)r �netplan_version�flagsr �features r r zNetplanInfo.command_info, s� � �
��0��
�� �/�/����%�,�,�j�%�-@�A� ���&�"(�D�����&�(���$�*�*�_�Q�*�7�8�
�
�
�F�
*�� ��v�o�l�3�I�>�?�
A� %�:�:�
(���f�w�&�'�
(� +r )�__name__�
__module__�__qualname__r r% r �
__classcell__)r s @r r r s �� �$�
�(r r N)�__doc__� r r �NetplanCommandr � r r �<module>r; s"