Ë
    i©¹d´  ã            	       ó´   — d dl Z d dlZd dlmZ dZdZdZdZ G d„ d«      Zd	Z	d
Z
dZdZdZdZ eddddd¬«      Ze	 ee	e
e e«       ¬«      e eeeee¬«      iZy)é    N)Ú
SoSOptionsz/etc/sos/presets.dÚdescÚnoteÚargsc                   ó`   — e Zd ZdZdZdZdZ e«       ZdZ	d„ Z
d„ Zddd e«       fd„Zd„ Zd	„ Zy)
Ú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``
    NTc           
      ó‚   — d| j                   ›d| j                  ›d| j                  ›dt        | j                  «      ›d�	S )zeReturn a human readable string representation of this
            ``PresetDefaults`` object.
        zname=z desc=z note=z opts=(ú))Únamer   r   ÚstrÚopts©Úselfs    ú6/usr/lib/python3/dist-packages/sos/presets/__init__.pyÚ__str__zPresetDefaults.__str__4   s-   � ð
 —“˜DŸI›I t§y£y´#°d·i±iµ.ðBð 	Có    c           
      ó‚   — d| j                   ›d| j                  ›d| j                  ›dt        | j                  «      ›d�	S )zgReturn a machine readable string representation of this
            ``PresetDefaults`` object.
        zPresetDefaults(name='z' desc='z' note='z' opts=(r
   )r   r   r   Úreprr   r   s    r   Ú__repr__zPresetDefaults.__repr__;   s-   � ð
 —“˜DŸI›I t§y£y´$°t·y±yµ/ðCð 	Dr   Ú c                 ó<   — || _         || _        || _        || _        y)z�Initialise a new ``PresetDefaults`` object with the specified
            arguments.

            :returns: The newly initialised ``PresetDefaults``
        N©r   r   r   r   )r   r   r   r   r   s        r   Ú__init__zPresetDefaults.__init__B   s    € ð ˆŒ	ØˆŒ	ØˆŒ	Øˆ�	r   c                 óø  — | j                   rt        d«      ‚| j                  j                  «       }| j                  t
        | j                  t        | j                  t        |ii}t        j                  j                  |«      st        j                  |d¬«       t        t        j                  j                  || j                  «      d«      5 }t!        j"                  ||«       ddd«       y# 1 sw Y   yxY w)z¥Write this preset to disk in JSON notation.

        :param presets_path: the directory where the preset will be written
        :type presets_path: ``str``
        zCannot write built-in presetií  )ÚmodeÚwN)ÚbuiltinÚ	TypeErrorr   Údictr   ÚDESCr   ÚNOTEr   ÚOPTSÚosÚpathÚexistsÚmakedirsÚopenÚjoinÚjsonÚdump)r   Úpresets_pathÚodictÚpdictÚpfiles        r   ÚwritezPresetDefaults.writeM   s¬   € ð �<Š<ÜÐ:Ó;Ð;ð —	‘	—‘Ó ˆØ—‘œT 4§9¡9¬d°D·I±I¼tÀUÐKÐLˆä�w‰w�~‰~˜lÔ+Ü�K‰K˜¨5Õ1ä”"—'‘'—,‘,˜|¨T¯Y©YÓ7¸Ó=ð 	$ÀÜ�I‰I�e˜UÔ#÷	$÷ 	$ñ 	$ús   ÃC0Ã0C9c                 ó~   — t        j                  t         j                  j                  || j                  «      «       y)zŒDelete a preset from disk

        :param presets_path: the directory where the preset is saved
        :type presets_path: ``str``
        N)r#   Úunlinkr$   r(   r   )r   r+   s     r   ÚdeletezPresetDefaults.delete`   s#   € ô 	�	‰	”"—'‘'—,‘,˜|¨T¯Y©YÓ7Õ8r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r   r/   r2   © r   r   r   r      sN   „ ñð  €Dà€Dà€Dá‹<€Dð €GòCòDð  R¨d¹»ó 	ò$ó&9r   r   ÚnonezDo not load a presetz+Use to disable automatically loaded presetsÚminimalzCSmall and quick report that reduces sos report resource consumptionzXMay be useful for low-resource systems, but may not provide sufficient data for analysisé
   é   T)Úlog_sizeÚjournal_sizeÚplugin_timeoutÚcommand_timeoutÚlow_priorityr   )r)   r#   Úsos.optionsr   ÚPRESETS_PATHr    r!   r"   r   Ú	NO_PRESETÚNO_PRESET_DESCÚNO_PRESET_NOTEÚSMALL_PRESETÚSMALL_PRESET_DESCÚSMALL_PRESET_NOTEÚSMALL_PRESET_OPTSÚGENERIC_PRESETSr7   r   r   ú<module>rK      s©   ðó Û 	å "à#€ð €Ø€Ø€÷N9ñ N9ðb €	Ø'€Ø>€à€ð#Ð ð<Ð ñ ¨¸ÈBØ/1ÀôFÐ ð ‰~Ø˜^°.Ù‹\ôð ‘.ØÐ 1Ð8IØôð	�r   