Current File : //usr/lib/python2.7/site-packages/cloudinit/net/cmdline.pyc |
�
oB�]c @ s& d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m
Z
d d l m Z d Z e j
e j � d e f d � � Y� Z d e f d
� � YZ e g Z d d � Z d � Z d d d
� Z d � Z e d � Z d d � Z d d � Z d S( i����N( t utili ( t get_devicelist( t read_sys_net_safes# /run/initramfs/open-iscsi.interfacet InitramfsNetworkConfigSourcec B s2 e Z d Z e j d � � Z e j d � � Z RS( sB ABC for net config sources that read config written by initramfsesc C s d S( sA Is this initramfs config source applicable to the current system?N( ( t self( ( s9 /usr/lib/python2.7/site-packages/cloudinit/net/cmdline.pyt
is_applicable s c C s d S( s; Render a v1 network config from the initramfs configurationN( ( R ( ( s9 /usr/lib/python2.7/site-packages/cloudinit/net/cmdline.pyt
render_config# s ( t __name__t
__module__t __doc__t abct abstractmethodR R ( ( ( s9 /usr/lib/python2.7/site-packages/cloudinit/net/cmdline.pyR s t KlibcNetworkConfigSourcec B s2 e Z d Z d d d d � Z d � Z d � Z RS( s� 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.)
c C s� | | _ | | _ | | _ | j d k r9 t � | _ n | j d k rZ t j � | _ n | j d k r� i | _ x9 t � D]+ } t | d � } | r| | | j | <q| q| Wn d S( Nt address( t _filest
_mac_addrst _cmdlinet Nonet _get_klibc_net_cfg_filesR t get_cmdlineR R ( R R R R t kt mac_addr( ( s9 /usr/lib/python2.7/site-packages/cloudinit/net/cmdline.pyt __init__2 s c C sH | j rD d | j k s'