+
    i                         R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHtHt ^ RI	H
t
 ^ RIHtHt RtRR ltR tR	 t]R
8X  d
   ]! 4        R# R# )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_idzcloud-idc                   \        4       P                  R4      pV '       g   \        P                  ! \        RR7      p V P                  RRRRRR	7       V P                  R
RRRRR	7       V P                  RR\        VRV 2R7       V # )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_jsons   & 8/usr/lib/python3/dist-packages/cloudinit/cmd/cloud_id.py
get_parserr      s     +,88I((I
 D   L   %/02  	 M    c                4   \        4       pVP                  \        P                  8X  dE   \        P
                  P                  RP                  VP                  P                  4      4       ^# VP                  \        P                  8X  dE   \        P
                  P                  RP                  VP                  P                  4      4       ^#  \        VP                  4      ;_uu_ 4       p\        P                  ! V4      pRRR4       XP%                  R/ 4      p\'        TP%                  R\(        4      TP%                  R\(        4      TP%                  R	\(        4      4      pTP                  '       d?   \        P*                  P                  R
4       YvR&   \        P,                  ! T^RRR7      pM2TP.                  '       d   T: RTP%                  R\(        4      : 2pMTp\        P
                  P                  RT,          4       ^ #   + '       g   i     EL; i  \         d+    \        P                   ! RTP                  ,          4      u # \"         d3   p\        P                   ! RTP                  : RT: 24      u Rp?# Rp?ii ; i)zHandle 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-datazFile 'z' is not valid json. v1
cloud_nameregionplatformz%DEPRECATED: Use: cloud-init query v1
cloud_idT)indent	sort_keys
separators	z%s
),z: )r   running_statusr   DISABLEDsysstdoutwriteformatvalueNOT_STARTEDopenr	   jsonloadIOErrorr   error
ValueErrorgetr   r   stderrdumpslong)	nameargsstatus_detailsfiler	   er   r!   responses	   &&       r   handle_argsr?   =   s    ()N$$(>(>>

(E(E(K(KLM		&	&-*C*C	C

(E(E(K(KLM
$$$%% IIdOM & 
		4	$B!
|-.
x)*
z+,H
 yyy

AB!:::qD[
 
':J)KLJJVh&'9 &%% 
~~%'+'9'9:
 	
  
~~151C1CQG
 	

sH   H' /HH' H$	H' $H' '2JJ$J%'JJJc                 ~    \        4       p \        P                  ! \        \        V P                  4       4      4       R# )z,Tool to query specific instance-data values.N)r   r)   exitr?   r   
parse_args)r   s    r   mainrC   l   s%    \FHH[v00234r   __main__)N)__doc__r   r0   r)   cloudinit.cmd.develr   cloudinit.cmd.statusr   r   cloudinit.logr   cloudinit.sourcesr   r   r   r   r?   rC   __name__ r   r   <module>rL      sJ   
 J   
 . B " B'T,^5 zF r   