| Current Path : /usr/share/netplan/netplan/cli/commands/__pycache__/ |
| Current File : //usr/share/netplan/netplan/cli/commands/__pycache__/set.cpython-38.pyc |
U
�]a! � @ st d Z ddlZddlZddlZddlZddlZddlZddlm m Z ddl
mZ dZddgZ
G dd� de j�ZdS ) znetplan set command line� N)�
ConfigManagerz70-netplan-set�renderer�versionc sZ e Zd Z� fdd�Zdd� Zeefd�dd�Zdd � Zd
d� Z dd
d�Z
ddd�Z� ZS )�
NetplanSetc s t � jdddd� d S )N�setzTAdd new setting by specifying a dotted key=value pair like ethernets.eth0.dhcp4=trueT)�
command_id�description�leaf)�super�__init__��self�� __class__� �./usr/share/netplan/netplan/cli/commands/set.pyr $ s �zNetplanSet.__init__c C sR | j jdtdd� | j jdtdd� | j jdddd � | j| _| �� | �� d S )
N� key_valuezNThe nested key=value pair in dotted format. Value can be NULL to delete a key.)�type�helpz
--origin-hintz�Can be used to help choose a name for the overwrite YAML file. A .yaml suffix will be appended automatically.z
--root-dir�/zAOverwrite configuration files in this root directory instead of /)�defaultr )�parser�add_argument�str�command_set�func�
parse_args�run_commandr r r r �run) s
�
�
�zNetplanSet.run)�returnc s2 |� di �� t� }� D ]�}|tkr$q� � |g �}|d krXdd� t�|| j�D �}|� |<