+
     g                     J   ^ RI HtHtHtHtHtHtHtHt ^ RI	H
t
 ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHtHt ^ RIHt ]P0                  ! 4       t]
P4                  ]
P6                  ]
P8                  ! 4       ]
P:                  ! R4      R	 R
 l4       4       4       4       tR R lt]! R]P@                  ]PB                  ]]PD                  ]! ]! R]PF                  PI                  RR7      RR7      ]! R]PJ                  PI                  RR7      RRR.RR7      .R7      .R7      t&R# )    )configdaemonentitlementsevent_logger
exceptionsmessagestimerutil)cli_util)ProArgumentProArgumentGroup
ProCommand)perform_disable)HelpCategory)machine_tokenstate_files)update_motd_messagesz
pro detachc                $    V ^8  d   QhR\         /# )   return)int)formats   "5/usr/lib/python3/dist-packages/uaclient/cli/detach.py__annotate__r      s      S     c                   \        WP                  V P                  R8H  R7      pV^ 8X  d+   \        P                  ! 4        \
        P                  ! 4        \        P                  4        V# )zPPerform the detach action for this machine.

@return: 0 on success, 1 otherwise
json)
assume_yesjson_output)	_detachr   r   r   startr	   stopeventprocess_events)argscfgkwargsrets   &$, r   action_detachr)      sL     dkkV6KC ax

	Jr   c                \    V ^8  d   QhR\         P                  R\        R\        R\        /# )r   r&   r   r   r   )r   UAConfigboolr   )r   s   "r   r   r   (   s,     0 0 0d 0 0# 0r   c           	     D   . p\         P                  ! V 4       FK  p \         P                  ! V VR7      pTP                  RR7      w  rgT'       g   K:  TP                  T4       KM  	  V'       ds   \        P                  \        P                  P                  \        V4      4      4       V F1  p\        P                  RP                  VP                  4      4       K3  	  \        P                   ! VR7      '       g   ^# V F  p\#        VV VVRR7       K  	  \$        P&                  ! V 4      pVP)                  4        \*        P,                  ! 4        \/        V 4       \        P                  \        P0                  4       ^ #   \        P                   d     EK  i ; i)aN  Detach the machine from the active Ubuntu Pro subscription,

:param cfg: a ``config.UAConfig`` instance
:param assume_yes: Assume a yes answer to any prompts requested.
     In this case, it means automatically disable any service during
     detach.
:param json_output: output should be json only

@return: 0 on success, 1 otherwise
)r&   nameT)ignore_dependent_servicesz    {})r   F)r   r   update_status)r   entitlements_disable_orderentitlement_factoryr   EntitlementNotFoundErrorcan_disableappendr#   infor   DETACH_WILL_DISABLE	pluralizelenr   r.   r
   prompt_for_confirmationr   r   get_machine_token_filedeleter   delete_state_filesr   DETACH_SUCCESS)	r&   r   r   
to_disableent_nameentr(   _machine_token_files	   &&&      r   r    r    (   sA    J ;;C@	22C 4@3c" A  

8//99#j/JKCJJxsxx01 '':>>#!	
  '==cB""$	JJx&&'= 22 		s   FFFdetachz--assume-yes)command
store_true)helpactionz--formatcli)defaultstorer   )rG   rH   choicesrJ   )	arguments)rG   descriptionrH   help_categoryargument_groupsN)'uaclientr   r   r   r   r   r   r	   r
   uaclient.clir   uaclient.cli.commandsr   r   r   uaclient.cli.disabler   uaclient.cli.parserr   uaclient.filesr   r   uaclient.timer.update_messagingr   get_event_loggerr#   verify_json_format_argsassert_rootassert_attachedassert_lock_filer)   r    CLI_ROOT_DETACHCLI_DETACH_DESCOTHERCLI_ASSUME_YESr   CLI_FORMAT_DESCdetach_command r   r   <module>rd      s   	 	 	 " K K 0 , 5 @%%' 
!!			<( )   "0f 		!	!(($$"!00777I'
 !11888G""FO!	
r   