HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/share/netplan/netplan_cli/cli/commands/__pycache__/sriov_rebind.cpython-310.pyc
o

ϐxe��@sBdZddlZddlmZddlmZmZmZGdd�dej�Z	dS)z"netplan SR-IOV rebind command line�N�)�utils)�	PCIDevice�bind_vfs�_get_pci_slot_namecs,eZdZ�fdd�Zdd�Zdd�Z�ZS)�NetplanSriovRebindcst�jdddd�dS)N�rebindzKRebind SR-IOV virtual functions of given physical functions to their driverT)�
command_id�description�leaf)�super�__init__��self��	__class__��;/usr/share/netplan/netplan_cli/cli/commands/sriov_rebind.pyr
s
�zNetplanSriovRebind.__init__cCs2|jjdtdgdd�|j|_|��|��dS)N�netdevs�*z*Space separated list of PF interface names)�type�nargs�default�help)�parser�add_argument�str�command_rebind�func�
parse_args�run_commandrrrr�run!s�zNetplanSriovRebind.runcCs\|jD](}t|�}t|�}|jst�d�|��qt|j|j	�}t�
d�|t|���qdS)zeBind virtual functions of SR-IOV devices to their corresponding driver after eswitch mode was changedz1{} does not seem to be a SR-IOV physical functionz{}: bound {} VFsN)rrr�is_pf�logging�warning�formatr�vfs�driver�info�len)r�iface�pci_addr�pcidev�	bound_vfsrrrr)s
�z!NetplanSriovRebind.command_rebind)�__name__�
__module__�__qualname__r
r!r�
__classcell__rrrrrsr)
�__doc__r#�r�sriovrrr�NetplanCommandrrrrr�<module>s