Server IP : 23.254.227.96 / Your IP : 216.73.216.7 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.6/site-packages/cloudinit/cmd/devel/__pycache__/ |
Upload File : |
3 ��bH# � @ s, d Z ddlZddlZddlZddlZddlZddlmZmZm Z ddl mZmZ ddl mZmZ ddlmZ ddlmZ ddlmZ dd lmZ dd lmZ eje�ZdZddd �ZG dd� dej�ZG dd� de�Z de ej!fiZ"dd� Z#dd� Z$ed�dd�Z%dd� Z&edk�r(e� j'� Z(e&ee(� dS )z(Handle reconfiguration on hotplug events� N)�log� reporting�stages)� EventScope� EventType)� activators�read_sys_net_safe)�parse_net_config_data)�events)� DataSource)�DataSourceNotFoundException)�Initzhotplug-hookc C s� | st jttd�} t| _| jdddddgd� | jdd d �}d|_|jddd � |jddd �}|jdddddd� |jddddddgd� | S )a Build or extend an arg parser for hotplug-hook utility. @param parser: Optional existing ArgumentParser instance representing the subcommand which will be extended to support the args of this utility. @returns: ArgumentParser with proper argument configuration. )�prog�descriptionz-sz--subsystemTzsubsystem to act on�net)�required�help�choiceszHotplug Action�hotplug_action)�title�dest�queryz/query if hotplug is enabled for given subsystem)r Zhandlezhandle the hotplug eventz-dz --devpath�PATHzsysfs path to hotplugged device)r �metavarr z-uz--udevactionzaction to take�add�remove) �argparse�ArgumentParser�NAME�__doc__r �add_argumentZadd_subparsersr Z add_parser)�parserZ subparsersZ parser_handle� r"