| Server IP : 77.50.203.18 / Your IP : 192.168.0.10 Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23 System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64 User : warsnews.ru ( 1001) PHP Version : 8.4.23 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.9/site-packages/sos/policies/runtimes/__pycache__/ |
Upload File : |
a
ܓ�iI � @ s@ d dl Z d dlmZ d dlmZ d dlmZ G dd� de�ZdS )� N)�ContainerRuntime)�sos_get_command_output)�
is_executablec @ sL e Zd ZdZdZdZdd� Zddd�Zd d
� Zdd� Z d
d� Z
ddd�ZdS )�LxdContainerRuntimez,Runtime class to use for systems running LXD�lxd�lxcc C sF t d| jj�rB| jj�d�rB| jj�d�s8| jj�d�rBd| _dS dS )Nr r zsnap.lxd.daemonTF)r �policy�sysrootZpackage_managerZpkg_by_nameZinit_systemZ
is_running�active)�self� r �=/usr/lib/python3.9/site-packages/sos/policies/runtimes/lxd.py�check_is_active s ���z#LxdContainerRuntime.check_is_activeFc C sx g }| j � d�}| jrtt|| jjd�}|d dkrtt�|d �}|D ].}|d dksX|rD|�|d d |d f� qD|S )
z�Get a list of containers present on the system.
:param get_all: If set, include stopped containers as well
:type get_all: ``bool``
z list --format json��chroot�statusr �outputZRunningZexpanded_configz
volatile.uuid�name)�binaryr
r r r �json�loads�append)r Zget_allZ
containersZ_cmd�out�out_json� containerr r r
�get_containers"