Server IP : 209.38.156.173 / Your IP : 216.73.216.128 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/netplan/netplan/cli/commands/__pycache__/ |
Upload File : |
o |hEc� � @ sH d Z ddlZddlm mZ ddlmZmZmZ G dd� dej �Z dS )z"netplan SR-IOV rebind command line� N)� PCIDevice�bind_vfs�_get_pci_slot_namec s, e Zd Z� fdd�Zdd� Zdd� Z� ZS )�NetplanSriovRebindc s t � jdddd� d S )N�rebindzKRebind 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__c C s2 | j jdtdg dd� | j| _| �� | �� d S )N�netdevs�*z*Space separated list of PF interface names)�type�nargs�default�help)�parser�add_argument�str�command_rebind�func� parse_args�run_commandr r r r �run! s �zNetplanSriovRebind.runc C s\ | j D ](}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)r r r �is_pf�logging�warning�formatr �vfs�driver�info�len)r �iface�pci_addr�pcidev� bound_vfsr r r r ) s �z!NetplanSriovRebind.command_rebind)�__name__� __module__�__qualname__r r r � __classcell__r r r r r s r )�__doc__r! �netplan.cli.utils�cli�utils�netplan.cli.sriovr r r �NetplanCommandr r r r r �<module> s