
    ~ g,                     l    S SK r S SKJrJrJrJr   " S S\5      r " S S\\\5      r " S S\\5      rg)	    N)PluginRedHatPluginDebianPluginUbuntuPluginc                   6    \ rS rSrSrSrSrSrS rS r	S r
S	rg
)OpenStackNeutron   zOpenStack Networkingopenstack_neutron)	openstackopenstack_controlleropenstack_computeopenstack_edpmz-/var/lib/config-data/puppet-generated/neutronc                    U R                  S5      (       a  U R                  S/5        OU R                  S/5        U R                  SU R                  S-   U R                  S-   U R                  S-   /5        U R                  S5        U R                  S5        U R	                  SS	S
9  U R                  U R                  5      (       a  U R                  nOSnU S3n/ n/ SQn [        USSS9 nUR                  5       R                  5        HX  nU(       d  M  UR                  S5      nUS   R                  5       U;   d  M6  UR                  US   R                  5       5        MZ     S S S 5        U R                  U5        S V	s/ s H  o[        R                  ;   PM     n
n	S V	s/ s H  o[        R                  ;   PM     nn	[!        U
5      (       a  [#        U5      (       d  U R$                  R'                  S5        Ox/ SQnU Hn  nU R)                  SU S35      nUS   S:X  d  M#  US   nUR                  5       SS  H/  nUR                  5       S   nSU S U 3nU R+                  U5        M1     Mp     U R-                  S!S"S#.5        g ! , (       d  f       GN-= f! [         a"  nU R                  SU SU 35         S nAGNWS nAff = fs  sn	f s  sn	f )$Nall_logsz/var/log/neutron/z/var/log/neutron/*.logz/etc/neutron/z/etc/default/neutron-serverz/etc/my.cnf.d/tripleo.cnfz/var/lib/neutron/z/var/lib/neutron/lockT)	recursive z%/etc/neutron/plugins/ml2/ml2_conf.ini)ovn_nb_private_keyovn_nb_certificateovn_nb_ca_certovn_sb_private_keyovn_sb_certificateovn_sb_ca_certrzUTF-8)encoding=r      zCould not open conf file z: )OS_USERNAMEOS_PASSWORD)OS_TENANT_NAMEOS_PROJECT_NAMEz}Not all environment variables set. Source the environment file for the user intended to connect to the OpenStack environment.)subnetportrouterznetwork agentnetwork	extensionzfloating ipzsecurity groupz
openstack z liststatusoutput   z show neutronml2_confneutron_server_log)z'.*/etc/neutron/plugins/ml2/ml2_conf.iniz/var/log/neutron/server.log)
get_optionadd_copy_specvar_puppet_genadd_forbidden_pathadd_dir_listingpath_existsopenread
splitlinessplitstripappendIOError
_log_errorosenvironallanysoslogwarningcollect_cmd_outputadd_cmd_outputadd_file_tags)selfml2_preml2_conf_file	ml2_certsml2_cert_keyscfilelinewordserrorpvars_allvars_anycmdscmdresneutron_itemsitemshow_cmds                     F/usr/lib/python3/dist-packages/sos/report/plugins/openstack_neutron.pysetupOpenStackNeutron.setup   s   ??:&&#   (   	/1"??"==	
 	 	./ 784ED//00))GG")#HI	

	)mS7;u!JJL335D  JJsOEQx~~'=8!((q)9: 6 < 		*.2 3 .2O .2 3.9 : .9O .9 : H#h--KK !K L	D --
3%u.EFx=A%$'MM - 8 8 :1R @#zz|A%/uF4&#A++H5 !A  	7H+?
 	[ <;  	)OO7 G  %w( ) )	)3:sI   %J# 0AJ&J+J# K*K
J J#  J# #
K-K

Kc                 f    U R                  SX5        U R                  U R                  S-   X5        g)zApply regex substitution z/etc/neutron/*N)do_path_regex_subr.   )rC   regexpsubsts      rU   apply_regex_sub OpenStackNeutron.apply_regex_subt   s3    /?"22	
    c                     / SQnS/nSR                  U5      nU R                  SSR                  U5       S3S5        U R                  SU S3S5        g )	N)rabbit_passwordqpid_passwordnova_admin_passwordxenapi_connection_passwordpasswordserver_authadmin_passwordmetadata_proxy_shared_secreteapi_passwordcrd_passwordprimary_l3_host_password
serverauthucsm_passwordha_vrrp_auth_passwordssl_key_passwordnsx_passwordvcenter_passwordedge_appliance_passwordtenant_admin_passwordapic_passwordtransport_urlmemcache_secret_key
connection|z(^\s*(z)\s*=\s*)(.*)z\1*********z!)\s*=\s*(.*)://(\w*):)(.*)(@(.*))z\1*********\6)joinr\   )rC   protect_keysconnection_keysjoin_con_keyss       rU   postprocOpenStackNeutron.postproc|   sg    	
 (.1chh|,-];	
 	m_$EF	
r^    N)__name__
__module____qualname____firstlineno__
short_descplugin_nameprofilesr.   rV   r\   r|   __static_attributes__r~   r^   rU   r   r      s,    'J%K7H ENYv

r^   r   c                   2   ^  \ rS rSrSrS rU 4S jrSrU =r$ )DebianNeutron   )neutron-commonzneutron-plugin-ciscoz neutron-plugin-linuxbridge-agentzneutron-plugin-nicirazneutron-plugin-openvswitchz neutron-plugin-openvswitch-agentzneutron-plugin-ryuzneutron-plugin-ryu-agentzneutron-serverzpython-neutronzpython3-neutronc                 $    U R                  S5      $ )Nr   )is_installed)rC   s    rU   check_enabledDebianNeutron.check_enabled   s      !122r^   c                 D   > [         TU ]  5         U R                  S5        g )Nz/etc/sudoers.d/neutron_sudoers)superrV   r-   rC   	__class__s    rU   rV   DebianNeutron.setup   s    ;<r^   r~   )	r   r   r   r   packagesr   rV   r   __classcell__r   s   @rU   r   r      s    H3= =r^   r   c                   0   ^  \ rS rSrSrSrU 4S jrSrU =r$ )RedHatNeutron   )zopenstack-selinuxz'/var/lib/config-data/ansible-generated/c                    > [         TU ]  5         U R                  SU R                  S-   U R                  S-   U R                  S-   /5        g )Nz/etc/sudoers.d/neutron-rootwrapz/neutron-dhcp-agent/z/neutron-dhcp-ovn/z/neutron-sriov-agent/)r   rV   r-   var_ansible_genr   s    rU   rV   RedHatNeutron.setup   sO    -  #99  #77  #::	
 	r^   r~   )	r   r   r   r   r   r   rV   r   r   r   s   @rU   r   r      s    %H?O r^   r   )	r:   sos.report.pluginsr   r   r   r   r   r   r   r~   r^   rU   <module>r      s?    
 O OB
v B
J=$lL =.$l r^   