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) : /lib/python3.6/site-packages/sos/policies/runtimes/__pycache__/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
3 ~ �gm � @ s@ d dl Z d dlmZ d dlmZ d dlmZ G dd� de�ZdS )� N)�quote)�ContainerRuntime)�sos_get_command_outputc @ s: e Zd ZdZdZdZdd� Zddd�Zd d � Zdd� Z d S )�CrioContainerRuntimez-Runtime class to use for systems running crioZcrioZcrictlc C s dS )NF� )�selfr r �/usr/lib/python3.6/crio.py�check_can_copy s z#CrioContainerRuntime.check_can_copyFc C s~ g }| j � d|rdnd� d�}| jrzt|| jjd�}|d dkrztj|d �}x*|d D ]}|j|d |d d f� qXW |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 ps z-a� z -o json)�chroot�statusr �output� containers�idZmetadata�name)�binary�activer �policy�sysroot�json�loads�append)r Zget_allr Z_cmd�out�out_json� containerr r r �get_containers s z#CrioContainerRuntime.get_containersc C s� g }| j r�t| j� d�| jjd�}|d dkr�tj|d �}x�|d D ]|}t|d �dkr�xf|d D ]}|j||d f� qdW qFt|d �dkr�d }n|d d j d�d }|j|d |d f� qFW |S ) z�Get a list of images present on the system :returns: A list of 2-tuples containing (image_name, image_id) :rtype: ``list`` z images -o json)r r r r �imagesZrepoTagsr ZrepoDigestsz<none>�@z:<none>) r r r r r r r �lenr �split)r r r r ZimageZrepo_tagZ image_namer r r � get_images, s zCrioContainerRuntime.get_imagesc C s>