Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ 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 : /lib/python3/dist-packages/cloudinit/cmd/devel/__pycache__/ |
Upload File : |
o x[hJ � @ s� d Z ddlZddlZddlZddlZddlZddlZddlmZm Z ddl mZ ddlm Z mZmZmZmZmZ ddlmZ ddlmZ ddlmZ d Zdd d�Zdd � Zedkree� �� Zeee� dS dS )z(Debug network config format conversions.� N)�distros�safeyaml)�loggers)�eni�netplan�network_manager� network_state�networkd� sysconfig)�DataSourceAzure)� openstack)�guestcust_utilznet-convertc C s� | s t jttd�} | jddtdddd� | jdd g d �ddd� | jd ddddd� | jdddd� tj�� D �dd� | jdddddd� | jdddd� | jd d!g d"�dd#d� | S )$a Build or extend and arg parser for net-convert 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-pz--network-data�PATHTz!The network configuration to read)�type�metavar�required�helpz-kz--kind)r �network_data.json�yaml� azure-imds� vmware-imcz&The format of the given network config)�choicesr r z-dz--directoryzdirectory to place output in)r r r z-Dz--distroc S s g | ] }|D ]}|�qqS � r )�.0�sublist�itemr r �A/usr/lib/python3/dist-packages/cloudinit/cmd/devel/net_convert.py� <listcomp>G s ��zget_parser.<locals>.<listcomp>)r r z-mz--maczname,mac�appendzinterface name to mac mapping)r �actionr z--debug� store_truezenable debug logging to stderr.)r! r z-Oz --output-kind)r r r r �network-managerz!The network config format to emit) �argparse�ArgumentParser�NAME�__doc__�add_argument�openr � OSFAMILIES�values)�parserr r r � get_parser sd �� ������r- c C s� |j �d�s | j d7 _ tj�|j �st�|j � |jr%tjt j d� ntjt jd� |jrDi }|jD ]}|� dd�\}}|||<