CasperSecurity

Current Path : /lib/python3/dist-packages/cloudinit/cmd/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/cloudinit/cmd/__pycache__/cloud_id.cpython-310.pyc

o

쑛h�
�@s�dZddlZddlZddlZddlmZddlmZmZddl	m
Z
ddlmZm
Z
dZddd	�Zd
d�Zdd
�ZedkrBe�dSdS)zCCommandline utility to list the canonical cloud-id for an instance.�N)�read_cfg_paths)�
RunningStatus�get_status_details)�log_util)�METADATA_UNKNOWN�canonical_cloud_idzcloud-idcCsdt��d�}|stjtdd�}|jdddddd	�|jd
ddddd	�|jd
dt|d|��d�|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.
    �
instance_dataz/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 )�typer
r)r�get_runpath�argparse�ArgumentParser�NAME�add_argument�str)�parser�default_instance_json�r�8/usr/lib/python3/dist-packages/cloudinit/cmd/cloud_id.py�
get_parsers<	�����
rc	
Csvt�}|jtjkrtj�d�|jj��dS|jtj	kr)tj�d�|jj��dSzt
|j��
}t�
|�}Wd�n1s?wYWn,tyVt�d|j�YStyq}zt�d|j|f�WYd}~Sd}~ww|�di�}t|�dt�|�d	t�|�d
t��}|jr�tj�d�||d<tj|d
ddd�}n|jr�d||�d	t�f}n|}tj�d|�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}
��NzTFile not found '%s'. Provide a path to instance data json file using --instance-datazFile '%s' is not valid json. %s�v1�
cloud_name�region�platformz%DEPRECATED: Use: cloud-init query v1
�cloud_id�T)�,z: )�indent�	sort_keys�
separatorsz%s	%sz%s
r)r�running_statusr�DISABLED�sys�stdout�write�format�value�NOT_STARTED�openr�json�load�IOErrorr�error�
ValueError�getrr�stderr�dumps�long)	�name�args�status_details�filer�err!�responserrr�handle_args=sR�������


��r?cCst�}t�tt|����dS)z,Tool to query specific instance-data values.N)rr)�exitr?r�
parse_args)rrrr�mainlsrB�__main__)N)�__doc__rr0r)�cloudinit.cmd.develr�cloudinit.cmd.statusrr�
cloudinit.logr�cloudinit.sourcesrrrrr?rB�__name__rrrr�<module>s
*/
�
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY