__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

x[h�!����SrSSKrSSKrSSKrSSKrSSKJrJrJrJ	r	 \R"\5rSr
SS/r0SS0S	.rS
r"SS\R"5rS
r\\R(\R*44/rSrg)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-info�modprobe�floppyi��	localhost)zblock-device-mappingzinstance-idzlocal-hostname�	placementc�(�US-nUS-n[R"U5R5nU$![aU [R"U5R5nU$![a [R"[
S5 gf=ff=f)aB
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)�	mount_dir�deltacloud_user_data_file�user_data_file�	user_datas    �F/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceAltCloud.py�read_user_data_callbackr&s���$!*�,G� G���!1�1�N���'�'�(A�B�H�H�J�	������	��+�+�N�;�A�A�C�I�
���	�	��K�K��?�@��	���s&�$2�
B�$A$�$%B
�	B�B
�
Bc�b^�\rSrSrSrSrS\SS4U4SjjrSrS	r	S
r
SrSrS
r
SrU=r$)�DataSourceAltCloud�H�AltCloudc��[RRXX#5 SUlSUl[R
Ulg)N)�/zfile://)r�
DataSource�__init__�seed�supported_seed_starts�METADATA_UNKNOWN�source)�self�sys_cfg�distro�pathss    rr�DataSourceAltCloud.__init__Ls4�����#�#�D�6�A���	�%5��"��.�.����ci_pkl_version�returnNc�r>�[TU]U5 [US5(d[RUlgg)Nr")�super�	_unpickle�hasattrrr!r")r#r)�	__class__s  �rr-�DataSourceAltCloud._unpickleRs/���
���.�)��t�X�&�&�!�2�2�D�K�'r(c�h�[RRU5nU<SUR<S3$)Nz [seed=�])rr�__str__r)r#�roots  rr3�DataSourceAltCloud.__str__Ws'���!�!�)�)�$�/��!%�t�y�y�1�1r(c���[RR[5(a9[R
"[5R
5R5nU$[R"S5nU(dgUR5nURS5(agURS5(agg![a# [R"[S[5 gf=f)a
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'

z'Unable to access cloud info file at %s.�UNKNOWNzsystem-product-name�RHEV�VMWARE�VSPHERE)�os�path�exists�CLOUD_INFO_FILErrr
�upperrrrr�
read_dmi_data�
startswith)r#�
cloud_type�system_name�sys_names    r�get_cloud_type�!DataSourceAltCloud.get_cloud_type[s��� �7�7�>�>�/�*�*�

!��'�'��8�>�>�@�F�F�H�����'�'�(=�>�����$�$�&�����v�&�&�����x�(�(����)�
!�����=�#��
!�

!�s�6B?�?*C,�+C,c�8�[RS5 UR5n[RS[U55 SU;aUR	5(agOSU;aUR5(agOg[R"[S5 g)a4
Description:
    User Data is passed to the launching instance which
    is used to perform instance configuration.

    Cloud providers expose the user data differently.
    It is necessary to determine which cloud provider
    the current instance is running on to determine
    how to access the user data. Images built with
    image factory will contain a CLOUD_INFO_FILE which
    contains a string identifying the cloud provider.

    Images not built with Imagefactory will try to
    determine what the cloud provider is based on system
    information.
zInvoked get_data()zcloud_type: %sr8Tr:FzFailed accessing user data.)r�debugrE�str�user_data_rhevm�user_data_vsphererr�r#rBs  r�	_get_data�DataSourceAltCloud._get_data�s���$	�	�	�&�'��(�(�*�
��	�	�"�C�
�O�4��Z���#�#�%�%��&�
�*�
$��%�%�'�'��(�
�	
���C�6�7�r(c��UR5nUS:XaSUlUR5<SUR<S3$)z(Return the subplatform metadata details.r8�/dev/fd0z (�))rEr"�lowerrLs  r�_get_subplatform�#DataSourceAltCloud._get_subplatform�s7���(�(�*�
����$�D�K�&�,�,�.����<�<r(c��Sn[5 Sn[R"USS9 [R"U[5nXl
[UlU(ag	g![Ra&n[R"[
SU5 SnAgSnAff=f![R[4a&n[R"[
SU5 SnAgSnAff=f![a)nUR[R:waeSnAN�SnAf[Ra [R"[
SU5 N�f=f)
ag
RHEVM specific userdata read

 If on RHEV-M the user data will be contained on the
 floppy device in file <user_data_file>
 To access it:
   modprobe floppy

   Leverage util.mount_cb to:
       mkdir <tmp mount dir>
       mount /dev/fd0 <tmp mount dir>
       The call back passed to util.mount_cb will do:
           read <tmp mount dir>/<user_data_file>
NzFailed modprobe: %sFrP�)r=�timeoutzFailed udevadm_settle: %s
�-Failed to mount %s when looking for user dataT)�modprobe_floppyr�ProcessExecutionErrorrrr�udevadm_settle�OSError�mount_cbr�errno�ENOENT�MountFailedError�userdata_raw�META_DATA_NOT_SUPPORTED�metadata)r#�
return_str�e�
floppy_dev�errs     rrJ�"DataSourceAltCloud.user_data_rhevm�s�� �
�	���
 �
�	����z�1�=�

	����z�3J�K�J�'��/��
�����?�)�)�	��K�K��2�A�6���	���*�*�G�4�	��K�K��:�A�>���	���	��y�y�E�L�L�(��)���$�$�	��K�K��?��
�	�sK�
A�B�C�B�0B�B�C�3C�C�
E�&D
�
3E�?Ec��Sn[R"S5nUH.n[R"U[5nU(aX0l OM0 Xl[Ul
U(agg![
a*nUR[R:waeSnAM{SnAf[Ra  [R"[SU5 M�f=f)aR
vSphere specific userdata read

If on vSphere the user data will be contained on the
cdrom device in file <user_data_file>
To access it:
   Leverage util.mount_cb to:
       mkdir <tmp mount dir>
       mount /dev/fd0 <tmp mount dir>
       The call back passed to util.mount_cb will do:
           read <tmp mount dir>/<user_data_file>
NzLABEL=CDROMrXTF)r�find_devs_withr]rr"r\r^r_r`rrrarbrc)r#rd�
cdrom_list�	cdrom_devrgs     rrK�$DataSourceAltCloud.user_data_vsphere�s����
��(�(��7�
�#�I�

�!�]�]�9�6M�N�
��"+�K���$� '��/��
�����!�
��9�9����,��-���(�(�
�����C���
�s�(A'�'
C
�1B�3C
�C
)rcrr"r ra)�__name__�
__module__�__qualname__�__firstlineno__�dsnamer�intr-r3rErMrSrJrK�__static_attributes__�
__classcell__)r/s@rrrHsF���
�F�/�3��3��3�
2�)�V%�N=�4�l&�&r(rc��[R"[5up[RSSR	[5U5 g)NzCommand: %s
Output%s� )r�CMD_PROBE_FLOPPYrrH�join)�out�_errs  rrYrYs.���	�	�*�+�I�C��I�I�%�s�x�x�0@�'A�3�Gr(c�8�[R"U[5$)N)r�list_from_depends�datasources)�dependss r�get_datasource_listr�"s���$�$�W�k�:�:r()�__doc__r^�loggingr;�os.path�	cloudinitrrrr�	getLoggerrnrr>rxrbrrrrY�DEP_FILESYSTEM�DEP_NETWORKr~r��r(r�<module>r�s����

��	��.�.�
����!��.����)����!��	���DH��+�+�H�VH��'�0�0�'�2E�2E�F�G���;r(

Filemanager

Name Type Size Permission Actions
DataSourceAkamai.cpython-313.pyc File 12.33 KB 0644
DataSourceAliYun.cpython-313.pyc File 18.33 KB 0644
DataSourceAltCloud.cpython-313.pyc File 9.85 KB 0644
DataSourceAzure.cpython-313.pyc File 79.75 KB 0644
DataSourceBigstep.cpython-313.pyc File 2.86 KB 0644
DataSourceCloudCIX.cpython-313.pyc File 7.22 KB 0644
DataSourceCloudSigma.cpython-313.pyc File 5.18 KB 0644
DataSourceCloudStack.cpython-313.pyc File 13.11 KB 0644
DataSourceConfigDrive.cpython-313.pyc File 14.2 KB 0644
DataSourceDigitalOcean.cpython-313.pyc File 6.2 KB 0644
DataSourceEc2.cpython-313.pyc File 43.31 KB 0644
DataSourceExoscale.cpython-313.pyc File 8.9 KB 0644
DataSourceGCE.cpython-313.pyc File 16.12 KB 0644
DataSourceHetzner.cpython-313.pyc File 6.46 KB 0644
DataSourceIBMCloud.cpython-313.pyc File 18.43 KB 0644
DataSourceLXD.cpython-313.pyc File 20.3 KB 0644
DataSourceMAAS.cpython-313.pyc File 18.29 KB 0644
DataSourceNWCS.cpython-313.pyc File 6.76 KB 0644
DataSourceNoCloud.cpython-313.pyc File 17.26 KB 0644
DataSourceNone.cpython-313.pyc File 1.88 KB 0644
DataSourceOVF.cpython-313.pyc File 15.34 KB 0644
DataSourceOpenNebula.cpython-313.pyc File 18.96 KB 0644
DataSourceOpenStack.cpython-313.pyc File 13.1 KB 0644
DataSourceOracle.cpython-313.pyc File 21.77 KB 0644
DataSourceRbxCloud.cpython-313.pyc File 10.25 KB 0644
DataSourceScaleway.cpython-313.pyc File 17.07 KB 0644
DataSourceSmartOS.cpython-313.pyc File 38.32 KB 0644
DataSourceUpCloud.cpython-313.pyc File 7.11 KB 0644
DataSourceVMware.cpython-313.pyc File 35.8 KB 0644
DataSourceVultr.cpython-313.pyc File 5.79 KB 0644
DataSourceWSL.cpython-313.pyc File 15.48 KB 0644
__init__.cpython-313.pyc File 47.24 KB 0644
Filemanager