Viewing File: /usr/lib/python2.7/site-packages/cloudinit/cmd/status.pyo
ó
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 d l m Z d d l
m Z d d l m
Z
m Z m Z d Z d Z d Z d
Z d Z d Z d d
Z d Z d Z d Z d Z e d k rě e n d S( sF Define 'status' utility and handler as part of cloud-init commandline.i˙˙˙˙N( t gmtimet strftimet sleep( t uses_systemd( t Init( t get_cmdlinet load_filet load_jsons /etc/cloud/cloud-init.disableds not runt runningt donet errort disabledc C si | s! t j d d d d } n | j d d d d d t d
d | j d d
d d d t d
d | S( s% Build or extend an arg parser for status utility.
@param parser: Optional existing ArgumentParser instance representing the
status subcommand which will be extended to support the args of
this utility.
@returns: ArgumentParser with proper argument configuration.
t progt statust descriptions Report run status of cloud inits -ls --longt actiont
store_truet defaultt helpsJ Report long format of statuses including run stage name and error messagess -ws --waits' Block waiting on cloud-init to complete( t argparset ArgumentParsert add_argumentt False( t parser( ( s8 /usr/lib/python2.7/site-packages/cloudinit/cmd/status.pyt
get_parser s c C s t d g } | j t | j \ } } } | j rĽ xU | t t f k r t j j d t j j
t | j \ } } } t d q= Wt j j d n | j rä d j
| GH| rÓ d j
| GHn d j
| GHn d j
| GH| t k rd Sd S(
s4 Handle calls to 'cloud-init status' as a subcommand.t ds_depst .g Đ?s
s status: {0}s time: {0}s detail:
{0}i i ( R t read_cfgt _get_status_detailst pathst waitt STATUS_ENABLED_NOT_RUNt STATUS_RUNNINGt syst stdoutt writet flushR t longt formatt STATUS_ERROR( t namet argst initR
t
status_detailt time( ( s8 /usr/lib/python2.7/site-packages/cloudinit/cmd/status.pyt handle_status_args1 s"