File: //lib/python3/dist-packages/cloudinit/sources/__pycache__/DataSourceAltCloud.cpython-38.pyc
U
Ӈg�! � @ s� d Z ddlZddlZddlZddlZddlmZmZmZm Z e�
e�ZdZ
ddgZi ddi d �Zd
d� ZG dd
� d
ej�Zdd� ZeejejffgZdd� ZdS )zb
This file contains code used to gather the user data passed to an
instance on RHEVm and vSphere.
� N)�dmi�sources�subp�utilz/etc/sysconfig/cloud-infoZmodprobeZfloppyi� Z localhost)zblock-device-mappingzinstance-idzlocal-hostnameZ placementc C st | d }| d }zt �|��� }W nL tk
rn zt �|��� }W n$ tk
rh t �td� Y Y dS X Y nX |S )an
Description:
This callback will be applied by util.mount_cb() on the mounted
file.
Deltacloud file name contains deltacloud. Those not using
Deltacloud but instead instrumenting the injection, could
drop deltacloud from the file name.
Input:
mount_dir - Mount directory
Returns:
User Data
z/deltacloud-user-data.txtz/user-data.txtz Failed accessing user data file.N)r �load_text_file�strip�IOError�logexc�LOG)Z mount_dirZdeltacloud_user_data_fileZuser_data_fileZ user_data� r �F/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceAltCloud.py�read_user_data_callback&