�
i��d� � �f � d dl Z d dlZd dlZd dlZd dlmZ d dlmZmZ d dl m
Z
mZ G d� de� Zy)� N)�RemoteTransport)�ConnectionException�#SaltStackMasterUnsupportedException)�
is_executable�sos_get_command_outputc �r � � e Zd ZdZdZd� Z d� fd� Zd� Zed� � Z d
d�Z
d
d�Zd � Zed
� � Z
d� Z� xZS )�SaltStackMasterz�
A transport for collect that leverages SaltStack's Master Pub/Sub
functionality to send commands to minions.
This transport will by default assume the use cmd.shell module to
execute commands on the minions.
� saltstackc �` � t t j |� j � � d S )Nr )�list�json�loads�values)�self�json_outputs �D/usr/lib/python3/dist-packages/sos/collector/transports/saltstack.py�_convert_output_jsonz$SaltStackMaster._convert_output_json! s$ � ��D�J�J�{�+�2�2�4�5�a�8�8� c �� �� t t | � |||||� }t j t
� 5 | j
|d � |d< |