HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/sos/presets/__pycache__/__init__.cpython-38.pyc
U

i��d��	@s�ddlZddlZddlmZdZdZdZdZGdd�d�Zd	Z	d
Z
dZdZd
Z
dZedddddd�Ze	ee	e
ee�d�eeee
eed�iZdS)�N)�
SoSOptionsz/etc/sos/presets.d�desc�note�argsc@sZeZdZdZdZdZdZe�ZdZ	dd�Z
dd�Zddde�fd	d
�Zdd�Z
d
d�ZdS)�PresetDefaultsa�Preset command line defaults to allow for quick reference to sets of
    commonly used options

    :param name: The name of the new preset
    :type name: ``str``

    :param desc: A description for the new preset
    :type desc: ``str``

    :param note: Note for the new preset
    :type note: ``str``

    :param opts: Options set for the new preset
    :type opts: ``SoSOptions``
    NTcCsd|j|j|jt|j�fS)zeReturn a human readable string representation of this
            ``PresetDefaults`` object.
        z!name=%s desc=%s note=%s opts=(%s))�namerr�str�opts��self�r�6/usr/lib/python3/dist-packages/sos/presets/__init__.py�__str__4s�zPresetDefaults.__str__cCsd|j|j|jt|j�fS)zgReturn a machine readable string representation of this
            ``PresetDefaults`` object.
        z6PresetDefaults(name='%s' desc='%s' note='%s' opts=(%s))rrr�reprr	r
rrr
�__repr__;s�zPresetDefaults.__repr__�cCs||_||_||_||_dS)z�Initialise a new ``PresetDefaults`` object with the specified
            arguments.

            :returns: The newly initialised ``PresetDefaults``
        N�rrrr	)rrrrr	rrr
�__init__BszPresetDefaults.__init__c	Cs~|jrtd��|j��}|jt|jt|jt	|ii}t
j�|�sLt
j
|dd�tt
j�||j�d��}t�||�W5QRXdS)z�Write this preset to disk in JSON notation.

        :param presets_path: the directory where the preset will be written
        :type presets_path: ``str``
        zCannot write built-in preseti�)�mode�wN)�builtin�	TypeErrorr	�dictr�DESCr�NOTEr�OPTS�os�path�exists�makedirs�open�join�json�dump)r�presets_pathZodictZpdictZpfilerrr
�writeMs
zPresetDefaults.writecCst�tj�||j��dS)z�Delete a preset from disk

        :param presets_path: the directory where the preset is saved
        :type presets_path: ``str``
        N)r�unlinkrr!r)rr$rrr
�delete`szPresetDefaults.delete)�__name__�
__module__�__qualname__�__doc__rrrrr	rrrrr%r'rrrr
rsrZnonezDo not load a presetz+Use to disable automatically loaded presetsZminimalzCSmall and quick report that reduces sos report resource consumptionzXMay be useful for low-resource systems, but may not provide sufficient data for analysis�
�T)Zlog_sizeZjournal_sizeZplugin_timeoutZcommand_timeoutZlow_priorityr)r"rZsos.optionsrZPRESETS_PATHrrrrZ	NO_PRESETZNO_PRESET_DESCZNO_PRESET_NOTEZSMALL_PRESETZSMALL_PRESET_DESCZSMALL_PRESET_NOTEZSMALL_PRESET_OPTSZGENERIC_PRESETSrrrr
�<module>s@Q����