/usr/lib/python3/dist-packages/sos/collector/clusters/__pycache__
Edit: /usr/lib/python3/dist-packages/sos/collector/clusters/__pycache__/juju.cpython-310.pyc (7268B)
o
G%@i! @ sb d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ dddZdd Z G d d
d
eZ
dS ) N)Cluster)sos_parse_versionsos_get_command_outputc C s | sg S dd | dD S )zParse comma separated string.c S s g | ]}| qS )strip).0stringr r =/usr/lib/python3/dist-packages/sos/collector/clusters/juju.py
s z(_parse_option_string..,)split)stringsr r r
_parse_option_string s r c C s G dd d}|| S )aR Helper function to get Index.
The reason why we need Index defined in function is because currently
the collector.__init__ will load all the classes in this module
and also Index. This will cause bug because it think Index is
Cluster type. Also We don't want to provide a customized
filter to remove Index class.
c @ s0 e Zd ZdZdd Zdd Zdd Zdd Zd
S )z_get_index..IndexzIndex structure to help parse juju status output.
Attributes apps, units and machines are dict which key
is the app/unit/machine name
and the value is list of targets which format are
{model_name}:{machine_id}.
c S s( || _ i | _i | _i | _td| _d S )Nsos)
model_nameappsunitsmachineslogging getLoggerui_log)selfr r r r
__init__. s
z"_get_index..Index.__init__c
S s |d D ]7\}}g }|di }| D ]!\}}|d }| j d| } | g| j|<