+
    g*                        ^ RI t ^ RIt^ RIt^ RIHtHtHt ^ 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 ^ RIHt ^ RIHt ^ RIHtHtHt ^ R	IHt ^ R
IH t  ]PB                  ! 4       t"]PF                  ! ]PH                  ! ]%4      4      t&R R lt'RR/R lt(]PR                  ]PT                  ]PV                  ! ]PX                  4      ]PZ                  ! R4      R 4       4       4       4       t.]! R]P^                  ]P`                  ].]Pb                  ]! ]! R]Pd                  Pg                  RPi                  ]
Pj                  ! ]Pl                  ! 4       R7      4      R7      RRR7      ]! R]Pn                  Pg                  RR7      RR7      ]! R]Pp                  Pg                  RR 7      RRR!.RR"7      ]! R#]Pr                  RR7      .R$7      .R%7      t:R# )&    N)AnyDictList)configcontractentitlementsevent_logger
exceptionsmessagesstatusutil)ProgressWrapper)ServiceWithDependencies_dependencies)_enabled_services)cli_util)ProArgumentProArgumentGroup
ProCommand)HelpCategory)CanDisableFailurec                    V ^8  d   QhR\         P                  R\        R\        \        ,          R\        \        ,          R\        R\        /# )   cfgserviceall_dependenciesenabled_service_namescalled_nameservice_title)r   UAConfigstrr   r   )formats   "6/usr/lib/python3/dist-packages/uaclient/cli/disable.py__annotate__r$      sR      	 23  9	
      c                    . pV Fh  pVP                   V8X  g   VP                   V9  d   K'  VP                   F1  pVP                   V8X  g   K  VP                  VP                   4       K3  	  Kj  	  V Fo  p	\        P                  ! W	4      p
\
        P                  P                  VV
R 7      p\        P                  ! VR7      '       d   KY  \        P                  ! VV
R 7      h	  R# ))service_being_disableddependent_service)msgN)name
depends_onappendr   	get_titler   DEPENDENT_SERVICEr"   r   prompt_for_confirmationr
   DependentServiceStopsDisable)r   r   r   r   r   r   dependent_servicessrequirementr(   dependent_service_titleuser_msgs   &&&&&&      r#   prompt_for_dependency_handlingr6      s     66W.C C<<K7*"))!&&1 (  0"."8"8#
 --44#05 5 
 ++9999'4"9  0r%   update_statusTc                  V P                   pVe   Tp V'       d   \        4       pM \        \        P                  ! VR7      4      pV P	                  V4      w  rxV'       g   \
        P                  V P                  4       Ve   \        V\        4      '       d   VP                  et   \
        P                  VP                  P                  4       \
        P                  VP                  P                  VP                  P                  V P                  R7       M\
        P                  V P                  4       V'       d   \        P                  ! VR7       V# )a  Perform the disable action on a named entitlement.

:param entitlement_name: the name of the entitlement to enable
:param cfg: the UAConfig to pass to the entitlement
:param json_output: output should be json only

@return: True on success, False otherwise

assume_yes)	error_msg
error_coder   r   )enabled_variantr   r   CLIEnableDisableProgressdisableeventservice_failedr*   
isinstancer   messageinfor)   errorservice_processedr   )	entitlementr   json_outputr:   r7   variantprogressretreasons	   &&$$$    r#   perform_disablerN   >   s     ))G"$"--D
 %%h/KC[--.*V5F"G"G~~)

6>>--.$nn00%~~22',,   	 0 01#Jr%   zpro disablec               8   . p. p. p. pR\         P                  RRRR/pV P                  R8H  pV P                  p	\        P
                  ! V4      p
V P                  '       d!   V	'       d   \        P                  ! RRR	7      h\        V R
. 4      p\        P                  ! W4      w  pp\        V4      P                   Uu. uF  qP                  NK  	  pp\        V4      P                   pRpV EF  p\        P"                  ! VVV P                  R7      pVP$                  pVe   TpV	'       g'    \'        VVP                  VVVVP(                  R7       V'       d   \7        4       pM \7        \        P8                  ! V	R7      4      pVP;                  4       Vn         VP?                  V4      w  pp\@        P@                  ! VR7       V'       g   RpVPC                  V4       Ve   \E        V\F        4      '       d|   VPH                  ek   V
! VPH                  P0                  4       VPC                  RR
R
VP                  RVPH                  P0                  RVPH                  P                  /4       EK  EK  EK  EK  VPC                  V4       VPK                  4       pV'       d/   RVR&   V
! \2        PL                  P                  RR7      4       EK  EK  	  V'       d   RpRRPU                  \        PV                  ! VR7      4      ,           R,           pRPU                  \X        PZ                  ! V^PRRR7      4      p\        P\                  ! RRPU                  V4      VR7      pV
! VP0                  4       VPC                  RRR
RRVP0                  RVPP                  RVPR                  /4       \^        P`                  ! V4      pVPc                  4        V'       dp   VPe                  4        VPe                  4        V'       d   RMR VR&   W7R!&   WGR"&   WWR#&   WgR$&   \g        \h        Pj                  ! V\l        Pn                  RR%7      4       V'       d   ^ # ^# u upi   \        P*                   df   p\,        P/                  T4       T
! TP0                  4       T
! \2        P4                  P                  TP(                  R7      4       Rp Rp?EK  Rp?ii ; i  \        P*                   d   pRpTPC                  T4       T
! TP0                  4       T
! \2        PN                  P                  TP(                  R7      4       TPC                  RR
R
TP                  RTP0                  RTPP                  RTPR                  /4        Rp?EK  Rp?ii ; i)&zZPerform the disable action on a list of entitlements.

@return: 0 on success, 1 otherwise
_schema_versionresultsuccessneeds_rebootFjson--purge--assume-yes)option1option2r   T)r   r*   purgeN)r   r   )titler9   r=   typerD   message_codezdisable operation)	operationadditional_infozTry , .
)widthbreak_long_wordsbreak_on_hyphensr@   )r]   invalid_serviceservice_msgsystemfailureprocessed_servicesfailed_serviceserrorswarnings)cls	sort_keys)8r	   JSON_SCHEMA_VERSIONr"   r:   r   &create_interactive_only_print_functionrY   r
   InvalidOptionCombinationgetattrr   get_valid_entitlement_namesr   enabled_servicesr*   r   servicesentitlement_factoryr>   r6   rZ   UbuntuProErrorLOG	exceptionr)   r   ENABLE_FAILEDr   r?   calculate_total_disable_stepstotal_stepsr@   r   r,   rC   r   rD   _check_for_rebootENABLE_REBOOT_REQUIRED_TMPLDISABLE_FAILED_TMPLmsg_coder^   joinvalid_servicestextwrapwrapInvalidServiceOpErrorr   UAContractClientupdate_activity_tokensortprintrT   dumpsr   DatetimeAwareJSONEncoder)argsr   kwargsri   rj   rk   rl   json_responserI   r:   interactive_only_printnamesentitlements_foundentitlements_not_foundr2   r   r   rL   ent_nameentrJ   erK   disable_retrM   ent_reboot_requiredvalid_namesrf   errcontract_clients   &$,                           r#   action_disabler   l   s    OFH 	<;;)M ++'KJ
 &LL zzzj11~
 	
 D)R(E 	00< *#.???1?   %S)22
C&..**
 %%C.HH$) ("%))" &(H&11ZHH  #@@B-	"%++h"7KMMc"&&x0%*-+ + ~~1.v~~/A/AB &	 )388 )6>>+=+= .0C0C	 2+% #))(3&)&;&;&=#&48M.1* <<CC&9 D  '} 'l TYY|::sCDDsJ 	 iiMM!&!&	
 .. II&<=#

 	sww'4377!3#6#6	
 //4O))+!/2)	h.@*++:'("(h$,j!JJ11	
 1]: ,, a &quu-&**11		1B \ (( 	C""8,"155)",,33#))3D MMIsxxquu"AJJ%q'8'8 	sK   ?Q0%Q#2S B"S ?(S (+S #S8ASS V5BVVr@   r   r_   r=   )optionsstore+)helpactionnargsrV   )command
store_true)r   r   z--formatcli)defaultrT   )r   r   choicesr   rU   )	arguments)r   descriptionr   help_categoryargument_groups);rT   loggingr   typingr   r   r   uaclientr   r   r   r	   r
   r   r   r   uaclient.apir   +uaclient.api.u.pro.services.dependencies.v1r   r   -uaclient.api.u.pro.status.enabled_services.v1r   uaclient.clir   uaclient.cli.commandsr   r   r   uaclient.cli.parserr   (uaclient.entitlements.entitlement_statusr   get_event_loggerrA   	getLoggerreplace_top_level_logger_name__name__rx   r6   rN   verify_json_format_argsassert_rootassert_attached&_raise_enable_disable_unattached_errorassert_lock_filer   CLI_ROOT_DISABLECLI_DISABLE_DESCOTHERCLI_DISABLE_SERVICEr"   r   r   r    CLI_ASSUME_YESCLI_FORMAT_DESC	CLI_PURGEdisable_command r%   r#   <module>r      s      " "	 	 	 ) L ! K K , F%%'::8DE>+@D+\ 
!!		(IIJ	=)r * K  "rj 		"	"))$$!55<< $		(77FOO<MN! = 
 #	 "!0077	7J'
 !11888G""FO! !++'/	
 'r%   