https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/openstack_neutron.cpython-310.pyc
o

-�_g,�@sZddlZddlmZmZmZmZGdd�de�ZGdd�deee�ZGdd�dee�ZdS)	�N)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc@s4eZdZdZdZdZdZdd�Zdd�Zd	d
�Z	dS)�OpenStackNeutronzOpenStack Networking�openstack_neutron)�	openstack�openstack_controller�openstack_compute�openstack_edpmz-/var/lib/config-data/puppet-generated/neutronc
Cs|�d�r|�dg�n|�dg�|�d|jd|jd|jdg�|�d�|�d�|jdd	d
�|�|j�r?|j}nd}|�d�}g}gd
�}z;t|ddd��*}|����D]}|s`q[|�	d�}|d�
�|vrv|�|d�
��q[Wd�n1s�wYWnty�}z|�
d|�d|���WYd}~nd}~ww|�|�dd�dD�}	dd�dD�}
t|	�r�t|
�s�|j�d�n;gd�}|D]4}|�d|�d��}
|
ddk�r|
d }|��d!d"�D]}|�	�d}d|�d#|��}|�|�q�q�|�d$d%d&��dS)'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�rzUTF-8)�encoding�=r�zCould not open conf file z: cS�g|]}|tjv�qS���os�environ��.0�prr�F/usr/lib/python3/dist-packages/sos/report/plugins/openstack_neutron.py�
<listcomp>O�z*OpenStackNeutron.setup.<locals>.<listcomp>)�OS_USERNAME�OS_PASSWORDcSrrrrrrr!r"Rr#)�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�	extensionzfloating ipzsecurity 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�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�vars_all�vars_any�cmds�cmd�res�
neutron_items�item�show_cmdrrr!�setupsv
���


	
�������
��zOpenStackNeutron.setupcCs&|�d||�|�|jd||�dS)z Apply regex substitution z/etc/neutron/*N)�do_path_regex_subr5)rH�regexp�substrrr!�apply_regex_subts
�z OpenStackNeutron.apply_regex_subcCsJgd�}dg}d�|�}|�dd�|��d�d�|�d|�d�d�dS)	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])rH�protect_keys�connection_keys�
join_con_keysrrr!�postproc|s

�
�zOpenStackNeutron.postprocN)
�__name__�
__module__�__qualname__�
short_desc�plugin_name�profilesr5rYr]rzrrrr!rs[rcs(eZdZdZdd�Z�fdd�Z�ZS)�
DebianNeutron)�neutron-commonzneutron-plugin-ciscoz neutron-plugin-linuxbridge-agentzneutron-plugin-nicirazneutron-plugin-openvswitchz neutron-plugin-openvswitch-agentzneutron-plugin-ryuzneutron-plugin-ryu-agentzneutron-serverzpython-neutronzpython3-neutroncCs
|�d�S)Nr�)�is_installed�rHrrr!�
check_enabled�s
zDebianNeutron.check_enabledcst���|�d�dS)Nz/etc/sudoers.d/neutron_sudoers)�superrYr4r���	__class__rr!rY�s
zDebianNeutron.setup)r{r|r}�packagesr�rY�
__classcell__rrr�r!r��sr�cs$eZdZdZdZ�fdd�Z�ZS)�
RedHatNeutron)zopenstack-selinuxz'/var/lib/config-data/ansible-generated/cs2t���|�d|jd|jd|jdg�dS)Nz/etc/sudoers.d/neutron-rootwrapz/neutron-dhcp-agent/z/neutron-dhcp-ovn/z/neutron-sriov-agent/)r�rYr4�var_ansible_genr�r�rr!rY�s

�zRedHatNeutron.setup)r{r|r}r�r�rYr�rrr�r!r��sr�)	r�sos.report.pluginsrrrrrr�r�rrrr!�<module>s

https://t.me/RX1948 - 2025