Server IP : 184.107.3.203 / Your IP : 216.73.216.51 Web Server : Apache System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64 User : adminteladeoro ( 1015) PHP Version : 8.2.28 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
3 ~ �g�% � @ sj d dl Z d dlZd dlZd dlmZmZmZmZ G dd� de�ZG dd� dee�Z G dd� deee�Z dS ) � N)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc @ s\ e Zd ZdZdZdZdZdZdZdZ dZ dZdZdZ dd � Zg fd d�Zdd � Zdd� ZdS )� OVNCentralz OVN NorthdZovn_central�network�virt�ovn-dbs-bundle.*�ovn_cluster_north_db_server� c C s� | j ||�}| jr�| jd|� �| jd�}|d dks@d|d krT| jd| j� �� n8tj|�}x,|d jd�D ]}|j|�rn| j ||�S qnW |S )Nzls )� container�statusr � �outputz=Could not retrieve ovn_controller socket path from container )� path_join�container_name�exec_cmd� _log_error�re�compile�split�match)�self�pathZ regex_nameZ_sfile�res�pattern�filename� r �!/usr/lib/python3.6/ovn_central.py� _find_sock% s zOVNCentral._find_sockc s` | j r�d|� �}| j|dd| j d�}|d dkrF| jd| j � �� dS ytj|d �}W n$ tk r| | jd |� �� dS X n�y\| j|�}t|d dd��:}ytj|�}W n$ tk r� | jd |� �� dS X W dQ R X W n8 t k �r } z| jd |� d|� �� dS d}~X nX y� fdd�t j|d �D �S tk �rZ | jd|� d�� Y nX dS )z Get tables from schema zcat NT)�timeout� foregroundr r r z1Could not retrieve DB schema file from container r zCannot parse JSON file �rzUTF-8)�encodingzCould not open DB schema file z: c s g | ]}|� kr|�qS r r )�.0�table)�skipr r � <listcomp>S s z5OVNCentral.get_tables_from_schema.<locals>.<listcomp>�tablesz DB schema z has no 'tables' key) r r r �json�loads� Exceptionr �open�load�IOError�dict�keys�AttributeError) r r r&