
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
\¼me  ã               @   s\   d dl Z d dlZd dlZd dlmZmZ e jeƒZdddœZ	dd„ Z
dd	d
„Zddd„ZdS )é    N)ÚhelpersÚutila'  
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://github.com/canonical/cloud-init/issues
Make sure to include the cloud provider your instance is
running on.

For more information see
  https://github.com/canonical/cloud-init/issues/2795

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: falseaã  
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://github.com/canonical/cloud-init/issues
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: off)Z
non_ec2_mdZdsid_missing_sourcec             C   s&   t j| jdi ƒjdi ƒd�}|jdƒS )NZsystem_infoÚpaths)Z	path_cfgsÚwarnings)r   ÚPathsÚgetZget_ipath_cur)Úcfgr   © r	   ú/usr/lib/python3.6/warnings.pyÚ_get_warn_dir?   s    r   Tc             C   sœ   ||f}|  st | tƒ r|S tj| d|fƒ}|d kr:|S |d
krFdS |dkrRdS |jdƒ\}}}|d	krn|S |r”yt|ƒ}W n tk
r’   |S X d|fS )Nr   ÚonÚtrueTÚoffÚfalseFú,Úsleep)r   r   T)TN)r   r   F)FN)Ú
isinstanceÚdictr   Zget_cfg_by_pathÚ	partitionÚintÚ
ValueError)r   ÚnameÚmoder   ÚdefaultZncfgÚ_Zcsleepr	   r	   r
   Ú_load_warn_cfgF   s&    r   c             K   s  |d kri }t || ||d�\}}|s(d S t|  jf |Ž}d}|d }d| }d| d }	g }
x$|jdƒjƒ D ]}|
j|| ƒ qlW |	}|r¢d| }|j|dƒd }tjt	j
jt|ƒ| ƒ|	dj|
ƒ d |	 ƒ tjd|	dj|
ƒ|ƒ |�rtjd	|| ƒ tj|ƒ d S )
N)r   r   éF   é   z
# %%-%ds #Ú*Ú
z  [sleeping for %d seconds]  z%s%s
%sz$sleeping %d seconds for warning '%s')r   ÚWARNINGSÚformatÚstripÚ
splitlinesÚappendÚcenterr   Z
write_fileÚosÚpathÚjoinr   ÚLOGZwarningÚdebugÚtimer   )r   r   r   r   ÚkwargsÚmsgZmsgwidthZ	linewidthZfmtZtoplineZfmtlinesÚlineZ	closelineZsleepmsgr	   r	   r
   Úshow_warningf   s0    r/   )TN)NNT)Zloggingr&   r+   Z	cloudinitr   r   Z	getLoggerÚ__name__r)   r    r   r   r/   r	   r	   r	   r
   Ú<module>   s   

 