
    -_g                     d    d dl mZmZmZmZ  G d de      Z G d deee      Z G d dee      Zy)	    )PluginRedHatPluginDebianPluginUbuntuPluginc                   .    e Zd ZdZdZdZdZd Zd Zd Z	y)	OpenStackSwiftzOpenStack Swiftopenstack_swift)	openstackopenstack_controllerz%/var/lib/config-data/puppet-generatedc                 ,   | j                  d      r| j                  dg       n| j                  dg       | j                  d| j                  dz   | j                  dz   | j                  dz   | j                  dz   g       | j                  d	d
d       y )Nall_logsz/var/log/swift/z/var/log/swift/*.logz/etc/swift/z/swift/etc/*z/swift/etc/swift/*z/swift/etc/xinetd.d/*z"/memcached/etc/sysconfig/memcached
swift_conf	swift_log)z/etc/swift/swift.confz/var/log/swift/swift.log)
get_optionadd_copy_specvar_puppet_genadd_file_tags)selfs    D/usr/lib/python3/dist-packages/sos/report/plugins/openstack_swift.pysetupzOpenStackSwift.setup   s    ??:&!   &   	.0"66"99"FF
 	 	%1(3
 	    c                 j    | j                  d||       | j                  | j                  dz   ||       y)z Apply regex substitution z/etc/swift/.*\.conf.*z/swift/etc/swift/.*\.conf.*N)do_path_regex_subr   )r   regexpsubsts      r   apply_regex_subzOpenStackSwift.apply_regex_sub0   s7    7G"@@E	
r   c                     g d}ddg}| j                  ddj                  |       dd       dj                  |      }| j                  d| dd	       y )
N)ldap_dns_passwordneutron_admin_passwordrabbit_passwordqpid_passwordpowervm_mgr_passwdvirtual_power_host_passxenapi_connection_passwordpasswordhost_passwordvnc_passwordadmin_passwordtransport_url
connectionsql_connectionz(^\s*(|z)\s*=\s*)(.*)z\1*********z!)\s*=\s*(.*)://(\w*):)(.*)(@(.*))z\1*********\6)r   join)r   protect_keysconnection_keysjoin_con_keyss       r   postproczOpenStackSwift.postproc8   sk    
 ()9:chh|,-];	

 1m_$EF	
r   N)
__name__
__module____qualname__
short_descplugin_nameprofilesr   r   r   r1    r   r   r   r      s%    "J#K4H<N.

r   r   c                       e Zd ZdZy)DebianSwift)	swiftzswift-accountzswift-containerzswift-objectzswift-proxyswauthzpython-swiftzpython-swauthzpython3-swiftNr2   r3   r4   packagesr8   r   r   r:   r:   N   s	    
Hr   r:   c                       e Zd ZdZy)RedHatSwift)zopenstack-selinuxNr=   r8   r   r   r@   r@   ]   s    %Hr   r@   N)sos.report.pluginsr   r   r   r   r   r:   r@   r8   r   r   <module>rB      s9    P O:
V :
z., &., &r   