+
    i  c                   sJ    ^ RI t ^ RIt^ RIt^ RIHtHtHt  ! R R]]4      tR# )i    N)PluginUbuntuPlugin	PluginOptc                   sv   a  ] tR t^t o RtRtRtRtRt]	! RR]
RR7      ]	! RR	]R
R7      .tR tR tR tRtV tR# )SunbeamzSunbeam Openstack ControllerZsunbeamz/var/snap/openstack/commonsunbeam-userZubuntuz&The user used for sunbeam installation)ZdefaultZval_typeZdescjuju-allow-loginFzAllow sos to login to jujuc                s   V P                  R 4       V P                  V P                   R2V P                   R2V P                   R2V P                   R2V P                   R2R.4       V P                  R4      p \        P
                  ! V4      pT'       Ed   T P                  . R'ORTR7       T P                  RTR7      pTR,          ^ 8X  dE   \        P                  ! TR,          4      pT F!  pT P                  RTR,           2RTR7       K#  	  T P                  RTR7      pTR,          ^ 8X  dY   \        P                  ! TR,          4      pTR,           F.  pT P                  RTR,           2RTR,           R2.RTR7       K0  	  TP                   R2p	T P                  T	 R2T	 R2T	 R2T	 R2T	 R2.4       T P                  R4      '       d   T P                  RT R 24       T P                  R!TR7      p
T P                  R"T^R#7      pR$pT
R,          ^ 8X  g   TR,          ^ 8X  d_    T
R,          P                  4       ^ ,          pTR,          P                  4       ^ ,          pR%T9   g   R%T9   d   T P                  T4       RpT'       g   T P                  R&4       R
# R
# R
#   \         d    T P                  RT R	24        R
# i ; i  \          d     LSi ; i)(zsnap.openstack.*z
/hooks.logz/state/daemon.yaml#/state/truststore/sunbeam.maas.yamlz/state/database/info.yamlz/state/database/cluster.yamlz'/var/snap/openstack/current/config.yamlr   zUser "z" does not exist, will not collect juju information. Use `-k sunbeam.sunbeam-user` option to define the user to use to collect data for sunbeamNT)snap_cmdrunasz#sunbeam manifest list --format yamlr   statusoutputzsunbeam manifest show Z
manifestidz%sunbeam deployment list --format yamldeploymentszsunbeam deployment show namez --format yamlz/snap/openstack/commonz/*.logz/etc/**/*.logz/etc/**/terraform.tfvars.jsonz/logs/*.logz/reports/*.yamlr   zsu - z -c "sunbeam utils juju-login"zjuju whoamizjuju status)r   ZtimeoutFZ
Controllerzjuju is not logged in, will not collect juju information. Use `-k sunbeam.juju-allow-login=True` to login or use `juju login` as the sunbeam user to login)zsunbeam cluster listz"sunbeam cluster list --format yamlzsunbeam manifest listzsunbeam deployment list)Zadd_service_statusZadd_copy_spec
common_dirZ
get_optionpwdZgetpwnamZKeyErrorZ	_log_warnadd_cmd_outputcollect_cmd_outputyamlZ	safe_loadZpw_dirZexec_cmdZ
splitlines_get_juju_cmd_detailsZ
IndexError)selfZsunbeam_userZuser_pwdZmanifest_rawZ	manifestsZmanifestZdeployment_rawr   Z
deploymentZsb_snap_homedirZjuju_whoamiZjuju_statusZ	logged_inZj_whoamiZj_statuss   &              ?/usr/lib/python3.14/site-packages/sos/report/plugins/sunbeam.pysetupZSunbeam.setup"   s`    23z*12BC89;<5
 	 ~6	||L1H 8 !
 L   2  225" 3 L
 H%* NN<+AB	 )H''0,1G0HI!%\ (  !* "447" 5 N
 h'1,"nn^H-EF"-m"<"<J''2:f3E2FG2:f3E2F G( () !%L	 ( : #= "* 11GHO"#6*"#=1"##@A"#;/"#?3   122L>)GHJ --\-JK--\02 ( 4KI8$)[-Ba-G
*84??A!DH*84??A!DH#x/<83K22<@$(	  K   	NN '> >? 	P "  s%   <J1 5AK 1 KKK&%K&c           
     sD   V P                  R VRR7       V P                  RVR7      pVR,          ^ 8X  d   \        P                  ! VR,          4      pVR,          P	                  4        F  pV P                  RV 2R	V 2R
V 2R
V R2.VRR7       V P                  RV R2VR7      pVR,          ^ 8X  g   KO  \        P                  ! VR,          4      pVR,           F7  pV RVR,           2pV P                  RV 2RV R2RV 2RV R2.VRR7       K9  	  K  	  R# R# )juju controllersT)r   r   zjuju controllers --format jsonr	   r
   r   Zcontrollerszjuju models -c zjuju model-defaults -c zjuju controller-config -c z --format jsonZmodelsZ:r   zjuju status -m zjuju model-config -m N)r   r   jsonZloadsZkeys)	r   ZuserZjuju_controllersZjuju_ctrl_jsonZ
controllerZjuju_modelsZjuju_status_jsonZmodelZ
model_names	   &&       r   r   ZSunbeam._get_juju_cmd_details   sw   .dTJ22,D 3 : H%*!ZZ(8(BCN,];@@B
##%j\2-j\:0=0NK	%
  $ . #55%j\@ 6   x(A-'+zz+h2G'H$!1(!;!;(2|1U6]O%D
++-j\:-j\H3J<@3J<~N	-
 "& , 6	 "<! C +    c                s    V P                  V P                   R 24       V P                  R4       V P                  R4       R# )r   r   zjuju controller-configN)Zdo_file_private_subr   Zdo_cmd_private_sub)r   s   &r   postprocZSunbeam.postproc   s@      BC	
 	 23 89r    N)Zcloud)Z	openstack)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z
short_descZplugin_nameZprofilesZpackagesr   r   ZstrZboolZoption_listr   r   r   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      sb     /JKHH-J 	.(S?	A$ed3	5KbH 6D: :r   r   )r   r   r   Zsos.report.pluginsr    r   r   r   r   r   r   <module>r      s&     
  > >^:fl ^:r   