| 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/cmd/ |
Upload File : |
�
oB�]c @ s� d Z d d l Z d d l Z d d l Z d d l m Z m Z m Z d e Z d Z d d � Z d � Z d � Z
d � Z e d
k r� e � n d S( sC Commandline utility to list the canonical cloud-id for an instance.i����N( t INSTANCE_JSON_FILEt METADATA_UNKNOWNt canonical_cloud_ids /run/cloud-init/%ss cloud-idc
C s� | s! t j d t d d � } n | j d d d d d t d d
�| j d d d d d t d d
�| j d d d t d t d d t �| S( s* 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.
t progt descriptions/ Report the canonical cloud-id for this instances -js --jsont actiont
store_truet defaultt helps5 Report all standardized cloud-id information as json.s -ls --longs= Report extended cloud-id information as tab-delimited string.s -is --instance-datat types. Path to instance-data.json file. Default is %s( t argparset ArgumentParsert NAMEt add_argumentt Falset strt DEFAULT_INSTANCE_JSON( t parser( ( s: /usr/lib/python2.7/site-packages/cloudinit/cmd/cloud_id.pyt
get_parser s c C s t j j d | � d S( Ns
ERROR: %s
i ( t syst stderrt write( t msg( ( s: /usr/lib/python2.7/site-packages/cloudinit/cmd/cloud_id.pyt error+ s c C s) y t j t | j � � } WnE t k
r= t d | j � St k
rc } t d | j | f � SX| j d i � } t | j d t � | j d t � | j d t � � } | j r� | | d <t j
| d d d
t d d �} n. | j rd | | j d t � f } n | } t
j j d | � d S( s� Handle calls to 'cloud-id' cli.
Print the canonical cloud-id on which the instance is running.
@return: 0 on success, 1 otherwise.
sT File not found '%s'. Provide a path to instance data json file using --instance-datas File '%s' is not valid json. %st v1t
cloud_namet regiont platformt cloud_idt indenti t sort_keyst
separatorst ,s : s %s %ss %s
i ( R s : ( t jsont loadt opent
instance_datat IOErrorR t
ValueErrort getR R t dumpst Truet longR t stdoutR ( t namet argsR$ t eR R t response( ( s: /usr/lib/python2.7/site-packages/cloudinit/cmd/cloud_id.pyt handle_args0 s.
c C s) t � } t j t t | j � � � d S( s, Tool to query specific instance-data values.N( R R t exitR0 R t
parse_args( R ( ( s: /usr/lib/python2.7/site-packages/cloudinit/cmd/cloud_id.pyt mainQ s t __main__( t __doc__R
R! R t cloudinit.sourcesR R R R R t NoneR R R0 R3 t __name__( ( ( s: /usr/lib/python2.7/site-packages/cloudinit/cmd/cloud_id.pyt <module> s
!