
    ~ g              
           S SK r S SKrS SKJr  SrSrSrSr " S S5      rS	r	S
r
SrSrSrSr\" SSSSSS9r\	\" \	\
\\" 5       S9\\" \\\\S90rg)    N)
SoSOptionsz/etc/sos/presets.ddescnoteargsc                   j    \ rS rSrSrSrSrSr\" 5       r	Sr
S rS rSSS\" 5       4S jrS	 rS
 rSrg)PresetDefaults   a]  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           
          SU R                    SU R                   SU R                   S[        U R                  5       S3	$ )zQReturn 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__PresetDefaults.__str__4   sC     		{&6$)) ETYY(+ 	,    c           
          SU R                    SU R                   SU R                   S[        U R                  5       S3	$ )zSReturn 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__PresetDefaults.__repr__;   sD     (		{(499+ F8DO+<A? 	@r    c                 4    Xl         X l        X0l        X@l        g)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__PresetDefaults.__init__B   s     				r   c                    U R                   (       a  [        S5      eU R                  R                  5       nU R                  [
        U R                  [        U R                  [        U00n[        R                  R                  U5      (       d  [        R                  " USS9  [        [        R                  R                  XR                  5      SSS9 n[         R"                  " X45        SSS5        g! , (       d  f       g= f)zWrite 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wzutf-8)encodingN)builtin	TypeErrorr   dictr   DESCr   NOTEr   OPTSospathexistsmakedirsopenjoinjsondump)r   presets_pathodictpdictpfiles        r   writePresetDefaults.writeM   s     <<:;; 		 T499dDIItUKLww~~l++KK51"'',,|YY7"$',IIe#$ $ $s   C66
Dc                 ~    [         R                  " [         R                  R                  XR                  5      5        g)ztDelete a preset from disk

:param presets_path: the directory where the preset is saved
:type presets_path: ``str``
N)r(   unlinkr)   r-   r   )r   r0   s     r   deletePresetDefaults.deletea   s!     			"'',,|YY78r   )r   r   r   r   )__name__
__module____qualname____firstlineno____doc__r   r   r   r   r   r"   r   r   r   r4   r8   __static_attributes__ r   r   r   r      sM      DDD<D G,@ Rd 	$(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_PRESETSr@   r   r   <module>rT      s     	 "# O9 O9d 	'># <  B/1F  ~^.\ . 18I	r   