HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/netplan/netplan/cli/commands/__pycache__/sriov_rebind.cpython-38.pyc
U

��~f��@sHdZddlZddlmmZddlmZmZmZGdd�dej	�Z
dS)z"netplan SR-IOV rebind command line�N)�	PCIDevice�bind_vfs�_get_pci_slot_namecs,eZdZ�fdd�Zdd�Zdd�Z�ZS)�NetplanSriovRebindcst�jdddd�dS)NZrebindzKRebind SR-IOV virtual functions of given physical functions to their driverT)�
command_id�description�leaf)�super�__init__��self��	__class__��7/usr/share/netplan/netplan/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]P}t|�}t|�}|js2t�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
rr�
__classcell__rrr
rrsr)�__doc__r �netplan.cli.utils�cli�utils�netplan.cli.sriovrrr�NetplanCommandrrrrr�<module>s