Current File : //usr/share/netplan/netplan_cli/cli/commands/__pycache__/get.cpython-312.pyc |
�
���g � �J � d Z ddlmZ ddlmZ G d� dej
� Zy)znetplan get command line� )�NetplanConfigState)�utilsc �* � � e Zd Z� fd�Zd� Zd� Z� xZS )�
NetplanGetc �* �� t �| � ddd�� y )N�getzRGet a setting by specifying a nested key like "ethernets.eth0.addresses", or "all"T)�
command_id�description�leaf)�super�__init__)�self� __class__s ��2/usr/share/netplan/netplan_cli/cli/commands/get.pyr
zNetplanGet.__init__ s �� �
���E�%y�"� � $� c �� � | j j dt ddd�� | j j ddd� � | j | _ | j � | j
� y )
N�key�?�allzThe nested key in dotted format)�type�nargs�default�helpz
--root-dir�/z>Read configuration files from this root directory instead of /)r r )�parser�add_argument�str�command_get�func�
parse_args�run_command)r s r �runzNetplanGet.run sd � ���� � ��S��U�Qr� �s���� � ��s�&f� !� h� �$�$�� ��������r c �^ � t | j | j � }t |d�� y )N� )�end)r r �root_dir�print)r �
state_datas r r zNetplanGet.command_get( s � �'����$�-�-�@�
�
�j�b�!r )�__name__�
__module__�__qualname__r
r"