| Server IP : 159.223.102.202 / Your IP : 216.73.216.195 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/netplan/netplan_cli/cli/commands/__pycache__/ |
Upload File : |
�
*C�eoT � � � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl m
Z
ddlmZm
Z
ddlmZ ddlmZmZmZ d Zd
Z G d� de
j, � Zy)
znetplan apply command line� N� )�utils� )�
ConfigManager�ConfigurationError)�apply_sriov_config)�OvsDbServerNotRunning�OvsDbServerNotInstalled�apply_ovs_cleanupznetplan-ovs-cleanup.service� c � � � e Zd Z� fd�Zd� Zd
d�Zed� � Zeg fd�� Zede fd�� Z
edd�� Zedd �� Z� xZ
S )�NetplanApplyc �T �� t �| � ddd�� d| _ d| _ d | _ y )N�applyz.Apply current netplan config to running systemT)�
command_id�description�leafF)�super�__init__�
sriov_only�only_ovs_cleanup�state)�self� __class__s ��4/usr/share/netplan/netplan_cli/cli/commands/apply.pyr zNetplanApply.__init__, s5 �� �
���G�%U�"� � $� ��� %�����
� c � � | j j ddd�� | j j ddd�� | j j dd� � | j | _ | j � | j � y )
Nz--sriov-only�
store_truez0Only apply SR-IOV related configuration and exit)�action�helpz--only-ovs-cleanupz1Only clean up old OpenVSwitch interfaces and exitz--statez0Directory containing previous YAML configuration)r )�parser�add_argument�
command_apply�func�
parse_args�run_command)r s r �runzNetplanApply.run4 s� � ���� � ���&X� !� Z���� � �!5�l�&Y� !� [���� � ��&X� !� Z� �&�&�� ��������r c � � t � }|r|| _ | j rt j ||� y | j
rt j
|dd|� y dt j v r{t j d� }|�t d� �t j |ddddd dd
g� }|dk7 r6|rt j |� n|dk( rt! d
� �t d|z � �y d}t# t% j$ d� � } t% j$ d� }
||
v r|
j'