
    x[h                     t    S SK r S SKrS SKrS SKJrJr  \ R                  " \5      rSSS.r	S r
S	S jrS
S jrg)    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)
non_ec2_mddsid_missing_sourcec                     [         R                  " U R                  S0 5      R                  S0 5      S9nUR                  S5      $ )Nsystem_infopaths)	path_cfgswarnings)r   Pathsgetget_ipath_cur)cfgr	   s     4/usr/lib/python3/dist-packages/cloudinit/warnings.py_get_warn_dirr   ?   s>    MM''-,00"=E z**    c                 .   X#4nU (       a  [        U [        5      (       d  U$ [        R                  " U SU45      nUc  U$ US;   a  gUS;   a  gUR	                  S5      u  p&nUS:w  a  U$ U(       a   [        U5      nSU4$ SU4$ ! [         a    Us $ f = f)	Nr   )ontrueTTN)offfalseF)FN,sleepT)
isinstancedictr   get_cfg_by_path	partitionint
ValueError)r   namemoder   defaultncfg_csleeps           r   _load_warn_cfgr'   F   s    
 mGjd++j$%78D|##&&nnS)ODVw	KE ;4;  	N	s   2B BBc                    Uc  0 n[        XX2S9u  p2U(       d  g [        U    R                  " S
0 UD6nSnUS-   nSU-  nSU-  S-   n	/ n
UR                  S5      R	                  5        H  nU
R                  X-  5        M     U	nU(       a  SU-  nUR                  US5      S-   n[        R                  " [        R                  R                  [        U5      U 5      U	SR                  U
5      -   S-   U	-   5        [        R                  SU	SR                  U
5      U5        U(       a-  [        R                  S	X 5        [         R"                  " U5        g g )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   
write_fileospathjoinr   LOGwarningdebugtimer   )r!   r   r   r"   kwargsmsgmsgwidth	linewidthfmttoplinefmtlinesline	closelinesleepmsgs                 r   show_warningrF   f   s4    { CKD
4.


)&
)CH1I

!CIo$GH		$**,
# - I2U:OOIs3d:	OO
]3'.$))H%%,w6
 KK
GTYYx%8)D		8%F

5 r   r   )NNT)loggingr5   r;   	cloudinitr   r   	getLogger__name__r8   r.   r   r'   rF   r-   r   r   <module>rK      sC     	  #!252j+@#r   