| Server IP : 216.238.111.58 / Your IP : 216.73.217.34 Web Server : LiteSpeed System : Linux hosting.smartskills.com.br 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64 User : skillsitcom ( 1002) PHP Version : 8.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/sos/policies/runtimes/__pycache__/ |
Upload File : |
3
ܓ�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| jjjd�rB| jjjd�s8| jjjd�rBd| _dS dS )Nr r zsnap.lxd.daemonTF)r �policy�sysrootZpackage_managerZpkg_by_nameZinit_systemZ
is_running�active)�self� r �/usr/lib/python3.6/lxd.py�check_is_active s z#LxdContainerRuntime.check_is_activeFc C s| g }| j � d�}| jrxt|| jjd�}|d dkrxtj|d �}x6|D ].}|d dksZ|rF|j|d d |d f� qFW |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"