Current File : //usr/share/netplan/netplan_cli/cli/commands/__pycache__/ip.cpython-312.pyc |
�
Z9
gV � � � d Z ddlZddlZddlZddlZddlmZ ddlmZ ddd�d d
d�d�Z G d� d
ej � Z
G d� dej � Zy)znetplan ip command line� N)�CalledProcessError� )�utilsz#run/systemd/netif/leases/{lease_id}�ifindex)�pattern�methodz<var/lib/NetworkManager/internal-{lease_id}-{interface}.lease�
nm_connection)�networkd�NetworkManagerc �$ � � e Zd Z� fd�Zd� Z� xZS )� NetplanIpc �* �� t �| � ddd�� y )N�ipz'Retrieve IP information from the systemF��
command_id�description�leaf��super�__init__��self� __class__s ��1/usr/share/netplan/netplan_cli/cli/commands/ip.pyr zNetplanIp.__init__* s �� �
���D�%N�#� � %� c � � t � | _ | j j ddd�� }|j | j j
| j �� | j
� | j � y )N�leases�Display IP leasesF)�help�add_help)�func�commandclass)�NetplanIpLeases�command_leases�
subparsers�
add_parser�set_defaults�run�
parse_args�run_command)r �p_ip_leasess r r( z
NetplanIp.run/ sn � �-�/��� �o�o�0�0��6I�:?� 1� A�� � � �d�&9�&9�&=�&=�D�L_�L_� �`��������r )�__name__�
__module__�__qualname__r r( �
__classcell__�r s @r r
r
( s
�� �%�
r r
c �* � � e Zd Z� fd�Zd� Zd� Z� xZS )r# c �* �� t �| � ddd�� y )Nz ip leasesr Tr r r s �r r zNetplanIpLeases.__init__>