�
܍~c6$ � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlm Z d dl
mZmZ dZ
dZ G d� de j �� � Z G d � d
e� � ZegZdd�Zd� Zdd
�Zd� Zd� Zd� Zdd�ZdS )� N)�util)�get_devicelist�read_sys_net_safez#/run/initramfs/open-iscsi.interface�disabledc �^ � e Zd ZdZej defd�� � Zej defd�� � Z dS )�InitramfsNetworkConfigSourcezBABC for net config sources that read config written by initramfses�returnc � � dS )zAIs this initramfs config source applicable to the current system?N� ��selfs �7/usr/lib/python3/dist-packages/cloudinit/net/cmdline.py�
is_applicablez*InitramfsNetworkConfigSource.is_applicable � � � � � c � � dS )z;Render a v1 network config from the initramfs configurationNr r s r �
render_configz*InitramfsNetworkConfigSource.render_config r r N)
�__name__�
__module__�__qualname__�__doc__�abc�abstractmethod�boolr �dictr r r r r r sz � � � � � �L�L���P�t� P� P� P� ��P� ��J�t� J� J� J� ��J� J� Jr r )� metaclassc �2 � e Zd ZdZdd�Zdefd�Zdefd�ZdS )�KlibcNetworkConfigSourcez�InitramfsNetworkConfigSource for klibc initramfs (i.e. Debian/Ubuntu)
Has three parameters, but they are intended to make testing simpler, _not_
for use in production code. (This is indicated by the prepended
underscores.)
Nc � � || _ || _ || _ | j �t � � | _ | j �t j � � | _ | j �4i | _ t
� � D ] }t |d� � }|r
|| j |< |