| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.7/site-packages/cloudinit/sources/ |
Upload File : |
�
oB�]c @ s d Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m
Z
e j e � Z
d Z d d g Z i i d
6d d 6d
d 6i d 6Z d � Z d e j f d � � YZ d � Z e e j e j f f g Z d � Z d S( sb
This file contains code used to gather the user data passed to an
instance on RHEVm and vSphere.
i����N( t log( t sources( t util( t ProcessExecutionErrors /etc/sysconfig/cloud-infot modprobet floppys block-device-mappingi� s instance-idt localhosts local-hostnamet placementc C s� | d } | d } y t j | � j � } WnO t k
r~ y t j | � j � } Wq t k
rz t j t d � d SXn X| S( sn
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
s /deltacloud-user-data.txts /user-data.txts Failed accessing user data file.N( R t load_filet stript IOErrort logexct LOGt None( t mount_dirt deltacloud_user_data_filet user_data_filet user_data( ( sH /usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceAltCloud.pyt read_user_data_callback) s
t DataSourceAltCloudc B sM e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( t AltCloudc C s/ t j j | | | | � d | _ d | _ d S( Nt /s file://( R s file://( R t
DataSourcet __init__R
t seedt supported_seed_starts( t selft sys_cfgt distrot paths( ( sH /usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceAltCloud.pyR O s c C s# t j j | � } d | | j f S( Ns %s [seed=%s]( R R t __str__R ( R t root( ( sH /usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceAltCloud.pyR T s c C s� t j j t � r] y t j t � j � j � } Wn% t k
rX t j t
d t � d SX| St j d � } | sv d S| j � } | j d � r� d S| j d � r� d Sd S( st
Description:
Get the type for the cloud back end this instance is running on
by examining the string returned by reading either:
CLOUD_INFO_FILE or
the dmi data.
Input:
None
Returns:
One of the following strings:
'RHEV', 'VSPHERE' or 'UNKNOWN'
s'