Current File : //lib/python2.7/site-packages/cloudinit/warnings.pyc
�
oB�]c@s�ddlmZddlmZddlmZddlZddlZej�Zidd6dd6Z	d	�Z
edd
�Z
dded�ZdS(i����(thelpers(tlog(tutilNs+
This system is using the EC2 Metadata Service, but does not appear to
be running on Amazon EC2 or one of cloud-init's known platforms that
provide a EC2 Metadata service. In the future, cloud-init may stop
reading metadata from the EC2 Metadata Service unless the platform can
be identified.

If you are seeing this message, please file a bug against
cloud-init at
   https://bugs.launchpad.net/cloud-init/+filebug?field.tags=dsid
Make sure to include the cloud provider your instance is
running on.

For more information see
  https://bugs.launchpad.net/bugs/1660385

After you have filed a bug, you can disable this warning by
launching your instance with the cloud-config below, or
putting that content into
   /etc/cloud/cloud.cfg.d/99-ec2-datasource.cfg

#cloud-config
datasource:
 Ec2:
  strict_id: falset
non_ec2_mds�
A new feature in cloud-init identified possible datasources for
this system as:
  {dslist}
However, the datasource used was: {source}

In the future, cloud-init will only attempt to use datasources that
are identified or specifically configured.
For more information see
  https://bugs.launchpad.net/bugs/1669675

If you are seeing this message, please file a bug against
cloud-init at
   https://bugs.launchpad.net/cloud-init/+filebug?field.tags=dsid
Make sure to include the cloud provider your instance is
running on.

After you have filed a bug, you can disable this warning by launching
your instance with the cloud-config below, or putting that content
into /etc/cloud/cloud.cfg.d/99-warnings.cfg

#cloud-config
warnings:
  dsid_missing_source: offtdsid_missing_sourcecCs7tjd|jdi�jdi��}|jd�S(Nt	path_cfgstsystem_infotpathstwarnings(RtPathstgett
get_ipath_cur(tcfgR((s6/usr/lib/python2.7/site-packages/cloudinit/warnings.pyt
_get_warn_dirAs	!cCs�||f}|s#t|t�r'|Stj|d|f�}|dkrO|S|ddtfkrntdfS|ddtfkr�tdfS|jd�\}}}|dkr�|S|r�yt|�}Wq�t	k
r�|SXnt|fS(NRtonttruetofftfalset,tsleep(
t
isinstancetdictRtget_cfg_by_pathtNonetTruetFalset	partitiontintt
ValueError(RtnametmodeRtdefaulttncfgt_tcsleep((s6/usr/lib/python2.7/site-packages/cloudinit/warnings.pyt_load_warn_cfgGs&


cKsg|dkri}nt||d|d|�\}}|s@dSt|j|�}d}|d}d|}d|d}	g}
x.|jd�j�D]}|
j||�q�W|	}|r�d|}
|
j|d�d}ntj	t
jjt
|�|�|	dj|
�d|	�tjd	|	dj|
�|�|rctjd
||�tj|�ndS(NRRiFis
# %%-%ds #t*s
s  [sleeping for %d seconds]  s%s%s
%ss$sleeping %d seconds for warning '%s'(RR#tWARNINGStformattstript
splitlinestappendtcenterRt
write_filetostpathtjoinR
tLOGtwarningtdebugttimeR(RRRRtkwargstmsgtmsgwidtht	linewidthtfmtttoplinetfmtlinestlinet	closelinetsleepmsg((s6/usr/lib/python2.7/site-packages/cloudinit/warnings.pytshow_warninggs0	!


(t	cloudinitRRtloggingRR,R2t	getLoggerR/R%R
RRR#R=(((s6/usr/lib/python2.7/site-packages/cloudinit/warnings.pyt<module>s