
    -_gb                     2    d dl mZ d dlmZ  G d de      Zy)    quote)Clusterc                   *    e Zd ZdZdZdZd Zd Zd Zy)	satellitea3  
    This profile is specifically for Red Hat Satellite 6, and not earlier
    releases of Satellite.

    While note technically a 'cluster' in the traditional sense, Satellite
    does provide for 'capsule' nodes which is what this profile aims to
    enumerate beyond the 'primary' Satellite system.
    zRed Hat Satellite 6)r   zsatellite-installerc                 >    d}d}|t        |t        |      z        z  S )Nzsu postgres -c %szpsql foreman -c %sr   )selfquery_cmd_dbcmds       B/usr/lib/python3/dist-packages/sos/collector/clusters/satellite.py	_psql_cmdzsatellite._psql_cmd   s%    "%eFU5\1222    c                     | j                  d      }| j                  |d      }|d   dk(  r4|d   j                         D cg c]  }d|vr|j                          }}|S g S c c}w )Nz/copy (select name from smart_proxies) to stdoutT)	need_rootstatusr   outputzcould not change directory)r   exec_primary_cmd
splitlinesstrip)r	   cmdresnnodess        r   	get_nodeszsatellite.get_nodes!   s{    nnNO##C4#8x=A#&x=#;#;#=/q8 	E  L	s   A#c                 L    |j                   | j                  j                   k(  ryy)Nr   capsule)addressprimary)r	   nodes     r   set_node_labelzsatellite.set_node_label,   s    <<4<<///r   N)	__name__
__module____qualname____doc__cluster_namepackagesr   r   r!    r   r   r   r      s"     )L3H3
	r   r   N)shlexr   sos.collector.clustersr   r   r(   r   r   <module>r+      s     *   r   