
    g                     J    d Z ddlmZ ddlmZ  G d dej
                        Zy)znetplan get command line   )NetplanConfigState)utilsc                   *     e Zd Z fdZd Zd Z xZS )
NetplanGetc                 *    t         |   ddd       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   zNetplanGet.__init__   s    E%y" 	 	$    c                     | j                   j                  dt        ddd       | j                   j                  ddd	       | j                  | _        | j                          | j                          y )
Nkey?allzThe 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   runzNetplanGet.run   sd      SUQr s  s&f 	! 	h $$	r   c                 ^    t        | j                  | j                        }t        |d       y )N )end)r   r   root_dirprint)r   
state_datas     r   r   zNetplanGet.command_get(   s     '$--@
jb!r   )__name__
__module____qualname__r   r"   r   __classcell__)r   s   @r   r   r      s    $
"r   r   N)__doc__stater   r$   r   NetplanCommandr    r   r   <module>r1      s"   $  & "%% "r   