File: //lib/python3.6/site-packages/cloudinit/sources/__pycache__/DataSourceAliYun.cpython-36.opt-1.pyc
3
�q�h� � @ s� d dl Z d dlmZmZ d dlmZ e je�Z dZ
G dd� dej�Zdd� ZG d d
� d
e�Z
e
ejffeejejffgZdd� ZdS )
� N)�dmi�sources)�DataSourceApsarazAlibaba Cloud ECSc @ s$ e Zd ZdZdd� Zedd� �ZdS )�DataSourceAliYunZAliYunc C s t � r| jj� S dS )NZNO_ALIYUN_METADATA)�
_is_aliyun�dsname�lower)�self� r
�&/usr/lib/python3.6/DataSourceAliYun.py�_get_cloud_name s
z DataSourceAliYun._get_cloud_namec C s dS )NzX-aliyun-ecs-metadata-tokenr
)r r
r
r �imdsv2_token_put_header s z(DataSourceAliYun.imdsv2_token_put_headerN)�__name__�
__module__�__qualname__r r �propertyr
r
r
r
r r s r c C s t jd�tkS )Nzsystem-product-name)r Z
read_dmi_data�ALIYUN_PRODUCTr
r
r
r r s r c @ s e Zd ZdZdZdS )�DataSourceAliYunLocalay Datasource run at init-local which sets up network to query metadata.
In init-local, no network is available. This subclass sets up minimal
networking with dhclient on a viable nic so that it can talk to the
metadata service. If the metadata service provides network configuration
then render the network configuration for that instance based on metadata.
TN)r r r �__doc__Zperform_dhcp_setupr
r
r
r r s r c C s t j| t�S )N)r Zlist_from_depends�datasources)Zdependsr
r
r �get_datasource_list0 s r )ZloggingZ cloudinitr r Zcloudinit.sourcesr ZapsaraZ getLoggerr ZLOGr r r r ZDEP_FILESYSTEMZDEP_NETWORKr r r
r
r
r �<module> s