HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/origin.cpython-36.pyc
3

3��d�"�@s>ddlmZmZddlZGdd�de�ZGdd�dee�ZdS)�)�Plugin�RedHatPluginNc@s�eZdZdZdZdZdZdZdZe	j
jed�Ze	j
jed�Z
d	Ze	j
jee�Ze	j
jed
�Ze	j
jed�ZeefZdd
�Zdd�Zdd�Zdd�Zdd�Zdd�ZdS)�OpenShiftOriginzOpenShift Origin�originN�	openshiftz/etc/origin/masterz/etc/origin/nodezmaster-config.yamlz
master.envznode-config.yamlznode.kubeconfig�podscCs|j|j�S)zDetermine if we are on a master)�path_exists�
master_cfg)�self�r�/usr/lib/python3.6/origin.py�	is_master>szOpenShiftOrigin.is_mastercCs|j|j�S)zDetermine if we are on a node)r�node_cfg)r
rrr�is_nodeBszOpenShiftOrigin.is_nodecCs|j|j|jd��S)z*Determine if we are on a node running etcdz	etcd.yaml)r�	path_join�static_pod_dir)r
rrr�is_static_etcdFszOpenShiftOrigin.is_static_etcdcCs|j|j�S)z*Determine if a node is running static pods)rr)r
rrr�is_static_pod_compatibleKsz(OpenShiftOrigin.is_static_pod_compatiblecs�|j|jd|j�}|j|jd�}|j|jdd�}|j|jd�}|j|jd�}dd|f�d	}|j��r�|j|j|j|j|jd
�g�|j�r�|j|j|j	d��|j
d|d
|g�|j�r�|j
d|�dddg}|j
�fdd�|D��dddg}|j
�fdd�|D��dddddg}	|j
�fdd�|	D��|j��sT|jddd gd!�|j
d"��}
x(|
d#j�D]}|j
d$�|f��qpW|j��r�|j|j|j|||||j|jd
�|j|jd%�|j|jd&�g	�|jd'd!�dS)(Nz
bootstrap-zbootstrap.kubeconfigZcerts�*z
client-ca.crtzadmin.kubeconfigz%s --config=%sZoczmaster-logsz*.crtz*.yamlz
%s api apiz%s controllers controllersz%s etcd etcdzadm top imageszadm top imagestreamsz
adm top nodescsg|]}d�|f�qS)z%s %sr)�.0Zsubcmd)�oc_cmd_adminrr�
<listcomp>�sz)OpenShiftOrigin.setup.<locals>.<listcomp>Z
hostsubnetZclusternetworkZ
netnamespacescsg|]}d�|f�qS)z%s get -o json %sr)rZjcmd)rrrr�s�defaultzopenshift-web-consolez openshift-ansible-service-brokerz
openshift-sdnzopenshift-consolecsg|]}d�|f�qS)z;%s get -o json deploymentconfig,deployment,daemonsets -n %sr)r�n)rrrr�szatomic-openshift-masterzatomic-openshift-master-apiz#atomic-openshift-master-controllers)Zunitsz%s get pod -o name -n default�outputz%s logs -n default %szresolv.confznode-dnsmasq.confzatomic-openshift-node)r�
node_base_dir�
node_cfg_file�master_base_dirr
Z
add_copy_specr	�
master_envrrZadd_cmd_outputrZadd_journalZexec_cmd�
splitlinesrr�node_kubeconfig)r
Zbstrap_node_cfgZbstrap_kubeconfigZ
node_certsZnode_client_caZ	admin_cfgZstatic_pod_logs_cmdZsubcmdsZjcmdsZnmspsrZpodr)rr�setupOsz





zOpenShiftOrigin.setupcCs&d}|jd|d�|j|jdd�dS)Nzq(?P<var>{\s*"name":\s*[^,]*(pass|pwd|key|token|cred|secret|PASS|PWD|KEY|TOKEN|CRED|SECRET)[^,]*,\s*"value":)[^}]*zoc*jsonz\g<var> "********"z#(bindPassword|clientSecret):\s*(.*)z
\1:"********")Zdo_cmd_output_subZdo_file_subr	)r
Z
env_regexprrr�postproc�s

zOpenShiftOrigin.postproc)r)�__name__�
__module__�__qualname__�
short_descZplugin_name�filesZprofilesrr�os�path�joinr	rrrr rr
rrrr!r"rrrrr#s&
nrc@seZdZdZdZdS)�AtomicOpenShiftz3OpenShift Enterprise / OpenShift Container Platform�atomic-openshiftN)r,)r#r$r%r&Zpackagesrrrrr+�sr+)Zsos.report.pluginsrrZos.pathr(rr+rrrr�<module>s1