Mini Shell

Direktori : /lib64/python3.6/site-packages/gi/overrides/__pycache__/
Upload File :
Current File : //lib64/python3.6/site-packages/gi/overrides/__pycache__/BlockDev.cpython-36.opt-1.pyc

3

�Hdh���@s�dZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZedjZ
gZe
jje
jje
jje
jje
jje
jje
jje
jje
jje
jje
jje
jje
jje
jjd�ZGd	d
�d
e
j�Ze	e�Zej d
��dKdd
�Z!e
j"Z#e	e
j"��dLdd��Z"ej d�e
j$Z%e	e
j$��dMdd��Z$ej d�e
j&Z'e	e
j&��dNdd��Z&ej d�e
j(Z)e	e
j(��dOdd��Z(ej d�e
j*Z+e	e
j*��dPdd��Z*ej d�e
j,Z-e	e
j,��dQdd��Z,ej d�e
j.Z/e	e
j.��dRdd��Z.ej d�e
j0Z1e	e
j0��dSdd��Z0ej d�e
j2Z3e	e
j2��dTdd ��Z2ej d �e
j4Z5e	e
j4��dUd!d"��Z4ej d"�e
j6Z7e	e
j6��dVd#d$��Z6ej d$�e
j8Z9e	e
j8��dWd%d&��Z8ej d&�e
j:Z;e	e
j:��dXd'd(��Z:ej d(�e
j<Z=e	e
j<��dYd)d*��Z<ej d*�e
j>Z?e	e
j>��dZd+d,��Z>ej d,�e
j@ZAe	e
j@��d[d-d.��Z@ej d.�Gd/d0�d0e
jB�ZBe	eB�ZBej d0�Gd1d2�d2e
jC�ZCe	eC�ZCej d2�e
jDZEe	e
jF�ddddde
jGjHdfd3d4��ZFej d4�e
jIZJe	e
jI��d\d5d6��ZIej d6�e
jKZLe	e
jM��d]d7d8��ZMej d8�e
jNZOe	e
jN��d^d9d:��ZNej d:�e
jPZQe	e
jP��d_d;d<��ZPej d<�e
jRZSe	e
jR��d`d=d>��ZRej d>�e
jTZUe	e
jT��dad?d@��ZTej d@�e
jVZWe	e
jX��dbdAdB��ZXej dB�e
jYZZe	e
jY��dcdCdD��ZYej dD�e
j[Z\e	e
j[��dddEdF��Z[ej dF�e
j]Z^e	e
j]��dgdHdI��Z]ej dI�e
j_Z`e	e
j_��dhdJdK��Z_ej dK�e
jaZbe	e
ja��didLdM��Zaej dM�e
jcZde	e
jc��djdNdO��Zcej dO�e
jeZfe	e
je��dkdPdQ��Zeej dQ�e
jgZhe	e
jg��dldRdS��Zgej dS�e
jiZje	e
ji��dmdTdU��Ziej dU�e
jkZle	e
jk��dndVdW��Zkej dW�e
jmZne	e
jm��dodXdY��Zmej dY�e
joZpe	e
jo��dpdZd[��Zoej d[�e
jqZre	e
jq��dqd\d]��Zqej d]�e
jsZte	e
js��drd^d_��Zsej d_�e
juZve	e
ju��dsd`da��Zuej da�e
jwZxe	e
jw��dtdbdc��Zwej dc�e
jyZze	e
jy��duddde��Zyej de�e
j{Z|e	e
j{��dvdfdg��Z{ej dg�e
j}Z~e	e
j}��dwdhdi��Z}ej di�e
jZ�e	e
j��dxdjdk��Zej dk�e
j�Z�e	e
j���dydldm��Z�ej dm�e
j�Z�e	e
j���dzdndo��Z�ej do�e
j�Z�e	e
j���d{dpdq��Z�ej dq�e
j�Z�e	e
j���d|drds��Z�ej ds�y*e
j�Z�e	e
j���d}dtdu��Z�ej du�Wne�k
�r�YnXe
j�Z�e	e
j���d~dvdw��Z�ej dw�e
j�Z�e	e
j���ddxdy��Z�ej dy�e
j�Z�e	e
j���d�dzd{��Z�ej d{�e
j�Z�e	e
j���d�d|d}��Z�ej d}�e
j�Z�e	e
j���d�d~d��Z�ej d�e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j���d�d�d���Z�ej d��e
j�Z�e	e
j�d�d�d���Z�ej d��e
j�Z�e	e
j�d�d�d���Z�ej d��e
j�Z�e	e
jǃ�d�d�d���Z�ej d��e
j�Z�e	e
jɃ�d�d�d���Z�ej d��e
j�Z�e	e
j˃ddde
j�j�dfd�d���Z�ej d��e
j�Z�e	e
jσ�d�d�d���Z�ej d��e
j�Z�e	e
jу�d�d�d���Z�ej d��e
j�Z�e	e
jӃ�d�d�d���Z�ej d��e
j�Z�e	e
jՃ�d�d�d���Z�ej d��e
j�Z�e	e
j׃�d�d�d���Z�ej d��e
j�Z�e	e
jك�d�d�dÄ�Z�ej dÃe
j�Z�e	e
jۃddde
j�j�dfd�dń�Z�ej dŃe
j�Z�e	e
j݃�d�d�dDŽ�Z�ej dǃe
j�Z�e	e
j߃�d�d�dɄ�Z�ej dɃe
j�Z�e	e
j��d�d�d˄�Z�ej d˃e
j�Z�e	e
j��d�d�d̈́�Z�ej d̓e
j�Z�e	e
j��d�d�dτ�Z�ej dσej�d�j�dу�r�e
j�Z�e	e
j��d�d�dӄ�Z�ej dӃe
j�Z�e	e
j��d�d�dՄ�Z�ej dՃe
j�Z�e	e
j��d�d�dׄ�Z�ej d׃e
j�Z�e	e
j��d�d�dل�Z�ej dكe
j�Z�e	e
j��d�d�dۄ�Z�ej dۃe
j�Z�e	e
j��d�d�d݄�Z�ej d݃e
j�Z�e	e
j���d�d�d߄�Z�ej d߃e
j�Z�e	e
j���d�d�d��Z�ej d�e
j�Z�e	e
j���d�d�d��Z�ej d�e
j�Z�e	e
j���d�d�d��Z�ej d�e
j�Z�e	e
j���d�d�d��Z�ej d�e
j��Ze	e
j��dddde
�jj�dfd�d��Z�ej d�e
�j�Ze	e
�j��d�d�d���Zej d�e
�j�Ze	e
�j��d�d�d���Zej d�e
�j�Ze	e
�j��d�d�d���Zej d�e
�j�Z	e	e
�j��d�d�d���Zej d�e
�j
�Ze	e
�j
��d�d�d���Z
ej d�e
�j�Z
e	e
�j��d�d�d����Zej d��e
�j�Ze	e
�j��d�d�d����Zej d��e
�j�Ze	e
�j��d�d�d����Zej d��e
�j�Ze	e
�j��d�d�d����Zej d��e
�j�Ze	e
�j��d�d�d����Zej d��e
�j�Ze	e
�j��d�d�d����Zej d��e
�j�Ze	e
�j��d��d�d���Zej �d��d�d��Zej �d�e�d�d�d�d�dg��ZG�d	�d
��d
�e��ZG�d�d��d�e��Zej �d�G�d
�d��d�e��Z ej �d�G�d�d��d�e��Z!ej �d�G�d�d��d�e��Z"ej �d�G�d�d��d�e��Z#ej �d�G�d�d��d�e��Z$ej �d�G�d�d��d�e��Z%ej �d�G�d�d��d�e��Z&ej �d�G�d�d��d�e��Z'G�d�d��d�e'��Z(G�d�d ��d �e(��Z)G�d!�d"��d"�e(��Z*G�d#�d$��d$�e(��Z+G�d%�d&��d&�e(��Z,e�j-�d��G�d'�d(��d(�e��Z.ej �d(�G�d)�d*��d*�e��Z/ej �d*�G�d+�d,��d,�e��Z0G�d-�d.��d.�e0��Z1e�j-�dƒG�d/�d0��d0�e��Z2ej �d0�G�d1�d2��d2�e��Z3ej �d2�G�d3�d4��d4�e��Z4ej �d4�G�d5�d6��d6�e��Z5ej �d6�G�d7�d8��d8�e6�e��Z7ej �d8��ee�j8e�j9�d9�d�e7��Z:�ee�j8d�d:�e1��Z;�ee�j8ddG�e(��Z<�ee�j8d�d:�e)��Z=�ee�j8ddАe*��Z>�ee�j8d�d;�e+��Z?�ee�j8d�d<�e,��Z@�e�d=e
e�j8�e fg�e:g��ZAej �d=��e�d>e
e�j8�e!fg�e:g��ZBej �d>��e�d?e
e�j8�e"fg�e:g��ZCej �d?��e�d@e
e�j8�e#fg�e:g��ZDej �d@��e�dAe
e�j8�e$fg�e:g��ZEej �dA��e�dBe
e�j8�e%fg�e:g��ZFej �dB��e�dCe
e�j8�e&fg�e:g��ZGej �dC��e�dDe
e�j8�e'fg�e:�e<�e=�e>�e?�e@g��ZHej �dD��e�dEe
e�j8�e.fg�e:g��ZIej �dE��e�dFe
e�j8�e/fg�e:g��ZJej �dF��e�dGe
e�j8�e0fg�e:�e;g��ZKej �dG��e�dHe
e�j8�e4fg�e:g��ZLej �dH��ed�e
e�j8�e2fg�e:g��ZMej dу�e�dIe
e�j8�e3fg��ZNej �dI��e�dJe
e�j8�e5fg��ZOej �dJ�dS(�a�
This code wraps the bindings automatically created by gobject-introspection.
They allow for creating more pythonic bindings where necessary.  For instance
this code allows many functions with default-value arguments to be called
without specifying values for such arguments.


A bit more special is the :class:`ErrorProxy` class defined in the second half
of this file. It enhances work with libblockdev in the area of error reporting
and exception handling. While native libblockdev functions only raise
GLib.GError instances via the GObject introspection it is desired to have the
exceptions more granular -- e.g. raise SwapError instances from swap-related
functions or even raise SwapErrorNoDev instances from swap-related functions if
the particular device passed as an argument doesn't exist etc. Also, it is
desired to be able to distinguish libblockdev errors/exceptions from other
GLib.GError errors/exceptions by having all libblockdev exception instances
inherited from a single class -- BlockDevError. That's what the
:class:`ErrorProxy` class and its instances (one for each libblockdev plugin)
implement. If for example ``BlockDev.swap.swapon("/dev/sda2")`` is used instead
of ``BlockDev.swap_swapon("/dev/sda2")`` (note the ``.`` instead of ``_``), then
if the function raises an error/exception, the exception is transformed into a
SwapError instance and thus can be caught by ``except BlockDev.SwapError`` or
even ``BlockDev.BlockDevError``. The ``BlockDev.swap`` object is an instance of
the :class:`ErrorProxy` class and makes sure the exception transformation
happens. It of course calls the ``swap_swapon`` function internally so there's
no code duplication and it propagates non-callable objects directly.

�N)�
namedtuple�defaultdict)�modules)�override)�GLib�BlockDev)�lvm�btrfs�crypto�dm�loop�swapZmdraid�mpath�kbd�part�fs�s390�nvdimm�vdoc@seZdZddd�ZdS)�ExtraArg�cCstjj||�}||_|S)N)rr�new�	__class__)�cls�opt�val�ret�r� /usr/lib64/python3.6/BlockDev.py�__new__;szExtraArg.__new__N)r)�__name__�
__module__�__qualname__rrrrrr:srTcCs�|rRt|t�r"dd�|j�D�}qVt|t�rDtdd�|D��rD|}qVd}t|��ng}|rr|dd�|j�D�7}n|dd�|j�D�7}t|�dkr�dS|S)	NcSsg|]\}}tj||��qSr)rr)�.0�keyrrrr�
<listcomp>Gsz_get_extra.<locals>.<listcomp>css|]}t|tj�VqdS)N)�
isinstancerr)r#�argrrr�	<genexpr>Hsz_get_extra.<locals>.<genexpr>zLextra arguments can only be given as a list of ExtraArg items or a as a dictcSs g|]\}}tjd||��qS)z--)rr)r#r$rrrrr%PscSsg|]\}}tj||��qSr)rr)r#r$rrrrr%Rsr)r&�dict�items�list�all�
ValueError�len)�extra�kwargsZ	cmd_extraZea�msgrrr�
_get_extraBs

r2cCs
t||�S)N)�_init)�require_plugins�log_funcrrr�initYsr6FcCst|||�S)N)�_reinit)r4�reloadr5rrr�reinit_sr9cCs
t||�S)N)�_ensure_init)r4r5rrr�ensure_initesr;cCs
t||�S)N)�	_try_init)r4r5rrr�try_initksr=cCst|||�S)N)�_try_reinit)r4r8r5rrr�
try_reinitqsr?cKst||�}t|||||�S)N)r2�_btrfs_create_volume)�devices�label�
data_level�md_levelr/r0rrr�btrfs_create_volumews
rEcKst||�}t|||�S)N)r2�_btrfs_add_device)�
mountpoint�devicer/r0rrr�btrfs_add_device~s
rIcKst||�}t|||�S)N)r2�_btrfs_remove_device)rGrHr/r0rrr�btrfs_remove_device�s
rKcKst||�}t|||�S)N)r2�_btrfs_create_subvolume)rG�namer/r0rrr�btrfs_create_subvolume�s
rNcKst||�}t|||�S)N)r2�_btrfs_delete_subvolume)rGrMr/r0rrr�btrfs_delete_subvolume�s
rPcKst||�}t|||�S)N)r2�_btrfs_set_default_subvolume)rGZ	subvol_idr/r0rrr�btrfs_set_default_subvolume�s
rRcCs
t||�S)N)�_btrfs_list_subvolumes)rGZsnapshots_onlyrrr�btrfs_list_subvolumes�srTcKst||�}t||||�S)N)r2�_btrfs_create_snapshot)�source�destZror/r0rrr�btrfs_create_snapshot�s
rXcKst||�}t|||||�S)N)r2�_btrfs_mkfs)rArBrCrDr/r0rrr�
btrfs_mkfs�s
rZcKst||�}t|||�S)N)r2�
_btrfs_resize)rG�sizer/r0rrr�btrfs_resize�s
r]cKst||�}t||�S)N)r2�_btrfs_check)rGr/r0rrr�btrfs_check�s
r_cs&eZdZddd�Z�fdd�Z�ZS)�CryptoLUKSPBKDFNrcCs tjj||||||�}||_|S)N)rr`rr)r�type�hashZ
max_memory_kbZ
iterationsZtime_msZparallel_threadsrrrrr�szCryptoLUKSPBKDF.__new__cstt|�j�dS)N)�superr`�__init__)�self�argsr0)rrrrd�szCryptoLUKSPBKDF.__init__)NNrrrr)r r!r"rrd�
__classcell__rr)rrr`�s
r`cs&eZdZddd�Z�fdd�Z�ZS)�CryptoLUKSExtrarNc	Cs0|dkrt�}tjj|||||||�}||_|S)N)r`rrhrr)	r�data_alignmentZdata_deviceZ	integrityZsector_sizerBZ	subsystemZpbkdfrrrrr�s
zCryptoLUKSExtra.__new__cstt|�j�dS)N)rcrhrd)rerfr0)rrrrd�szCryptoLUKSExtra.__init__)rNNrNNN)r r!r"rrdrgrr)rrrh�s
rhc	Cst||||||||�S)N)�_crypto_luks_format)rHZcipherZkey_size�
passphrase�key_fileZmin_entropyZluks_versionr/rrr�crypto_luks_format�srmcCst|||||�S)N)�_crypto_luks_open)rHrMrkrl�	read_onlyrrr�crypto_luks_open�srpcCst||||�S)N)�_crypto_luks_resize)Zluks_devicer\rkrlrrr�crypto_luks_resize�srrcCst|||||�S)N)�_crypto_luks_add_key)rH�pass_rlZnpassZ	nkey_filerrr�crypto_luks_add_key�srucCst|||�S)N)�_crypto_luks_remove_key)rHrtrlrrr�crypto_luks_remove_key�srwcCst|||||�S)N)�_crypto_escrow_device)rHrkZ	cert_dataZ	directoryZbackup_passphraserrr�crypto_escrow_device�srycCst|||�S)N)�_crypto_luks_resume)rHrkrlrrr�crypto_luks_resumesr{c		
Cs0t|t�rdd�|D�}t|||||||||�	S)NcSsg|]}t|��qSr)�ord)r#�crrrr%
sz"crypto_tc_open.<locals>.<listcomp>)r&�str�_crypto_tc_open)	rHrMrkroZkeyfilesZhidden�systemZ	veracryptZ
veracrypt_pimrrr�crypto_tc_opens
r�cCs&t|t�rdd�|D�}t||||�S)NcSsg|]}t|��qSr)r|)r#r}rrrr%sz%crypto_bitlk_open.<locals>.<listcomp>)r&r~�_crypto_bitlk_open)rHrMrkrorrr�crypto_bitlk_opens
r�cCst||||�S)N)�_dm_create_linear)Zmap_namerHZlength�uuidrrr�dm_create_linearsr��cCst||||�S)N)�_dm_get_member_raid_sets)rMr��major�minorrrr�dm_get_member_raid_setssr�cCst|||||�S)N)�_loop_setup)�file�offsetr\roZ	part_scanrrr�
loop_setup%sr�cKst||d�}t||||�S)NF)r2�_fs_unmount)�specZlazy�forcer/r0rrr�
fs_unmount,sr�cKst||d�}t|||||�S)NF)r2�	_fs_mount)rHrGZfstypeZoptionsr/r0rrr�fs_mount3sr�cKst||�}t||�S)N)r2�
_fs_ext2_mkfs)rHr/r0rrr�fs_ext2_mkfs:s
r�cKst||�}t||�S)N)r2�
_fs_ext3_mkfs)rHr/r0rrr�fs_ext3_mkfsAs
r�cKst||�}t||�S)N)r2�
_fs_ext4_mkfs)rHr/r0rrr�fs_ext4_mkfsHs
r�cKst||�}t||�S)N)r2�_fs_ext2_check)rHr/r0rrr�
fs_ext2_checkOs
r�cKst||�}t||�S)N)r2�_fs_ext3_check)rHr/r0rrr�
fs_ext3_checkVs
r�cKst||�}t||�S)N)r2�_fs_ext4_check)rHr/r0rrr�
fs_ext4_check]s
r�cKst||�}t|||�S)N)r2�_fs_ext2_repair)rH�unsafer/r0rrr�fs_ext2_repairds
r�cKst||�}t|||�S)N)r2�_fs_ext3_repair)rHr�r/r0rrr�fs_ext3_repairks
r�cKst||�}t|||�S)N)r2�_fs_ext4_repair)rHr�r/r0rrr�fs_ext4_repairrs
r�cKst||�}t|||�S)N)r2�_fs_ext2_resize)rHr\r/r0rrr�fs_ext2_resizeys
r�cKst||�}t|||�S)N)r2�_fs_ext3_resize)rHr\r/r0rrr�fs_ext3_resize�s
r�cKst||�}t|||�S)N)r2�_fs_ext4_resize)rHr\r/r0rrr�fs_ext4_resize�s
r�cKst||�}t||�S)N)r2�_fs_xfs_mkfs)rHr/r0rrr�fs_xfs_mkfs�s
r�cKst||�}t||�S)N)r2�_fs_xfs_repair)rHr/r0rrr�
fs_xfs_repair�s
r�cKst||�}t|||�S)N)r2�_fs_xfs_resize)rHr\r/r0rrr�
fs_xfs_resize�s
r�cKst||�}t||�S)N)r2�
_fs_vfat_mkfs)rHr/r0rrr�fs_vfat_mkfs�s
r�cKst||�}t||�S)N)r2�_fs_vfat_check)rHr/r0rrr�
fs_vfat_check�s
r�cKst||�}t||�S)N)r2�_fs_vfat_repair)rHr/r0rrr�fs_vfat_repair�s
r�cKst||�}t|||�S)N)r2�_kbd_bcache_create)�backing_deviceZcache_devicer/r0rrr�kbd_bcache_create�s
r�cCst|||�S)N)�_lvm_round_size_to_pe)r\�pe_sizeZrounduprrr�lvm_round_size_to_pe�sr�cCst|||�S)N)�_lvm_get_thpool_padding)r\r�Zincludedrrr�lvm_get_thpool_padding�sr�cCst|||�S)N)�_lvm_get_thpool_meta_size)r\�
chunk_sizeZn_snapshotsrrr�lvm_get_thpool_meta_size�sr�cKst||�}t||||�S)N)r2�
_lvm_pvcreate)rHriZ
metadata_sizer/r0rrr�lvm_pvcreate�s
r�cKst||�}t|||�S)N)r2�
_lvm_pvresize)rHr\r/r0rrr�lvm_pvresize�s
r�cKst||�}t||�S)N)r2�
_lvm_pvremove)rHr/r0rrr�lvm_pvremove�s
r�cKst||�}t|||�S)N)r2�_lvm_pvmove)�srcrWr/r0rrr�
lvm_pvmove�s
r�cKst||�}t|||�S)N)r2�_lvm_pvscan)rHZupdate_cacher/r0rrr�
lvm_pvscan�s
r�cKst||�}t||||�S)N)r2�
_lvm_vgcreate)rM�pv_listr�r/r0rrr�lvm_vgcreate�s
r�cKst||�}t||�S)N)r2�
_lvm_vgremove)rMr/r0rrr�lvm_vgremoves
r�cKst||�}t|||�S)N)r2�
_lvm_vgrename)Zold_name�new_namer/r0rrr�lvm_vgrename	s
r�cKst||�}t||�S)N)r2�_lvm_vgactivate)�vg_namer/r0rrr�lvm_vgactivates
r�cKst||�}t||�S)N)r2�_lvm_vgdeactivate)r�r/r0rrr�lvm_vgdeactivates
r�cKst||�}t|||�S)N)r2�
_lvm_vgreduce)r�rHr/r0rrr�lvm_vgreduces
r�cKst||�}t|||�S)N)r2�
_lvm_vgextend)r�rHr/r0rrr�lvm_vgextend%s
r�cKst||�}t||||||�S)N)r2�
_lvm_lvcreate)r��lv_namer\rar�r/r0rrr�lvm_lvcreate,s
r�cKst||�}t||||�S)N)r2�
_lvm_lvremove)r�r�r�r/r0rrr�lvm_lvremove3s
r�cKst||�}t||||�S)N)r2�
_lvm_lvrename)r�r�r�r/r0rrr�lvm_lvrename:s
r�cKst||�}t||||�S)N)r2�
_lvm_lvresize)r�r�r\r/r0rrr�lvm_lvresizeAs
r�cKst||�}tj|||||�S)N)r2rZlvm_lvactivate_shared)r�r�Zignore_skipZsharedr/r0rrr�lvm_lvactivateGs
r�cKst||�}t|||�S)N)r2�_lvm_lvdeactivate)r�r�r/r0rrr�lvm_lvdeactivateNs
r�cKst||�}t|||||�S)N)r2�_lvm_lvsnapshotcreate)r��origin_name�
snapshot_namer\r/r0rrr�lvm_lvsnapshotcreateUs
r�cKst||�}t|||�S)N)r2�_lvm_lvsnapshotmerge)r�r�r/r0rrr�lvm_lvsnapshotmerge\s
r�cCst|�S)N)�_lvm_lvs)r�rrr�lvm_lvscsr�cKst||�}t|||||||�S)N)r2�_lvm_thpoolcreate)r�r�r\Zmd_sizer�Zprofiler/r0rrr�lvm_thpoolcreateis
r�cKst||�}t|||||�S)N)r2�_lvm_thsnapshotcreate)r�r�r��	pool_namer/r0rrr�lvm_thsnapshotcreateps
r�cKst||�}t||||�S)N)r2�_lvm_cache_attach)r��data_lvZ
cache_pool_lvr/r0rrr�lvm_cache_attachws
r�cKst||�}t||||�S)N)r2�_lvm_cache_detach)r�Z	cached_lvZdestroyr/r0rrr�lvm_cache_detach~s
r�cCs
t||�S)N)�_lvm_is_valid_thpool_chunk_size)r\�discardrrr�lvm_is_valid_thpool_chunk_size�srcCst|�S)N)�_lvm_set_global_config)Z
new_configrrr�lvm_set_global_config�srcKst||�}t|||||�S)N)r2�_lvm_thpool_convert)r�r��metadata_lvrMr/r0rrr�lvm_thpool_convert�s
rcKst||�}t|||||�S)N)r2�_lvm_cache_pool_convert)r�r�rrMr/r0rrr�lvm_cache_pool_convert�s
r	c
Ks$t|	|
�}	t||||||||||	�
S)N)r2�_lvm_vdo_pool_create)r�r�r�Z	data_size�virtual_size�index_memory�compression�
deduplication�write_policyr/r0rrr�lvm_vdo_pool_create�s
rcKst||�}t||||�S)N)r2�_lvm_vdo_resize)r�r�r\r/r0rrr�lvm_vdo_resize�s
rcKst||�}t||||�S)N)r2�_lvm_vdo_pool_resize)r�r�r\r/r0rrr�lvm_vdo_pool_resize�s
rcKst||�}t|||�S)N)r2�_lvm_vdo_enable_compression)r�r�r/r0rrr�lvm_vdo_enable_compression�s
rcKst||�}t|||�S)N)r2�_lvm_vdo_disable_compression)r�r�r/r0rrr�lvm_vdo_disable_compression�s
rcKst||�}t|||�S)N)r2�_lvm_vdo_enable_deduplication)r�r�r/r0rrr�lvm_vdo_enable_deduplication�s
rcKst||�}t|||�S)N)r2�_lvm_vdo_disable_deduplication)r�r�r/r0rrr�lvm_vdo_disable_deduplication�s
rc	

Ks"t||	�}t|||||||||�	S)N)r2�_lvm_vdo_pool_convert)
r�r�r�rrr
rrr/r0rrr�lvm_vdo_pool_convert�s
rcCs
t||�S)N)�_md_get_superblock_size)r\�versionrrr�md_get_superblock_size�sr!c		Ks t||�}t||||||||�S)N)r2�
_md_create)	Zdevice_name�levelZdisksZsparesr Zbitmapr�r/r0rrr�	md_create�s
r$cKst||�}t||||�S)N)r2�_md_add)�	raid_specrHZ	raid_devsr/r0rrr�md_add�s
r'cKst||�}t||||�S)N)r2�
_md_remove)r&rHZfailr/r0rrr�	md_remove�s
r)cKst||�}t|||||�S)N)r2�_md_activate)r&�membersr�Zstart_degradedr/r0rrr�md_activate�s
r,�rcKst||�}t||�S)N)r2�_s390_dasd_format)Zdasdr/r0rrr�s390_dasd_format�s
r/cKst||�}t|||�S)N)r2�_swap_mkswap)rHrBr/r0rrr�swap_mkswaps
r1cCs
t||�S)N)�_swap_swapon)rHZpriorityrrr�swap_swapon
sr3cCst|||�S)N)�_kbd_zram_create_devices)Znum_devicesZsizes�nstreamsrrr�kbd_zram_create_devicessr6cCs
t||�S)N)�_kbd_zram_add_device)r\r5rrr�kbd_zram_add_devicesr8cCst|||�S)N)�_part_create_table)ZdiskraZignore_existingrrr�part_create_tablesr:cKst||�}t||||�S)N)r2�_nvdimm_namespace_reconfigure)�	namespace�moder�r/r0rrr�nvdimm_namespace_reconfigure%s
r>cKst||�}t||�S)N)r2�_nvdimm_namespace_info)r<r/r0rrr�nvdimm_namespace_info,s
r@cKst||�}t||||�S)N)r2�_nvdimm_list_namespaces)ZbusZregionZidler/r0rrr�nvdimm_list_namespaces3s
rBcKst||�}t||�S)N)r2�_nvdimm_namespace_enable)r<r/r0rrr�nvdimm_namespace_enable:s
rDcKst||�}t||�S)N)r2�_nvdimm_namespace_disable)r<r/r0rrr�nvdimm_namespace_disableAs
rFc		Ks t||�}t||||||||�S)N)r2�_vdo_create)	rMr�Zlogical_sizerr
rrr/r0rrr�
vdo_createIs
rHcKst||�}t|||�S)N)r2�_vdo_remove)rMr�r/r0rrr�
vdo_removePs
rJcKst||�}t|||�S)N)r2�_vdo_change_write_policy)rMrr/r0rrr�vdo_change_write_policyWs
rLcKst||�}t||�S)N)r2�_vdo_enable_compression)rMr/r0rrr�vdo_enable_compression^s
rNcKst||�}t||�S)N)r2�_vdo_disable_compression)rMr/r0rrr�vdo_disable_compressiones
rPcKst||�}t||�S)N)r2�_vdo_enable_deduplication)rMr/r0rrr�vdo_enable_deduplicationls
rRcKst||�}t||�S)N)r2�_vdo_disable_deduplication)rMr/r0rrr�vdo_disable_deduplicationss
rTcKst||�}t||�S)N)r2�
_vdo_activate)rMr/r0rrr�vdo_activatezs
rVcKst||�}t||�S)N)r2�_vdo_deactivate)rMr/r0rrr�vdo_deactivate�s
rXcKst||�}t|||�S)N)r2�
_vdo_start)rMZrebuildr/r0rrr�	vdo_start�s
rZcKst||�}t|||�S)N)r2�	_vdo_stop)rMr�r/r0rrr�vdo_stop�s
r\cKst||�}t|||�S)N)r2�_vdo_grow_logical)rMr\r/r0rrr�vdo_grow_logical�s
r^cKst||�}t||�S)N)r2�_vdo_grow_physical)rMr/r0rrr�vdo_grow_physical�s
r`cCs<g}x2|D]*}tj�}t|j�|_d|_|j|�q
W|S)N)rZ
PluginSpec�
bd_plugins�lowerrMZso_name�append)Zplugin_namesrrMZpluginrrr�plugin_specs_from_names�s
rd�XRule�orig_exc�regexp�code�new_excc@s*eZdZdZd
dd�Zdd�Zdd	�ZdS)�
ErrorProxyz�
    Class that defines a proxy that can be used to transform errors/exceptions
    reported/raised by functions into different exception instances of given
    class(es).

    NTcCsT||_||_||_t�|_|rBx"|D]}|jj|jg�j|�q$W||_t	�|_
dS)a@Constructor for the :class:`ErrorProxy` class.

        :param str prefix: prefix of the proxied set of functions
        :param mod: module that provides the original functions
        :type mod: module
        :param tr_excs: list of pairs of exception classes that should be transformed (the first item into the second one)
        :type tr_excs: list of 2-tuples of exception classes
        :param xrules: transformation rules for exception transformations which
                       take precedence over the :param:`orig_excs` ->
                       :param:`new_excs` mapping (see below for details)
        :type xrules: set of XRule instances
        :param bool use_local: if original functions should be first searched in
                               the local scope (the current module) or not

        The :param:`tr_excs` parameter specifies the basic transformations. If
        an instance of an error/exception contained in the list as first item of
        some tuple is raised, it is transformed in an instance of the second
        item of the same tuple. For example::

          tr_excs = [(GLib.Error, SwapError), (OverflowError, ValueError)]

        would result in every GLib.GError instance raised from any of the
        functions being transformed into an instance of a SwapError class and
        similarly for the (OverflowError, ValueError) pair.

        If the :param:`xrules` parameter is specified, it takes precedence over
        the :param:`tr_excs` list above in the following way -- if raised
        exception/error is of type equal to :field:`orig_exc` field of any of
        the :param:`xrules` items then the transformation rule defined by the
        mapped XRule instance is used unless the :field:`regexp` is not None and
        doesn't match exception's/error's :attribute:`msg` attribute.

        N)�_prefix�_mod�_tr_excsr�_xrules�
setdefaultrfrc�
_use_localr)�_wrapped_cache)re�prefix�modZtr_excsZxrulesZ	use_local�xrulerrrrd�s#
zErrorProxy.__init__csT�jr$tt�j��tt�j��B}ntt�j��}t�j�d���fdd�|D�S)z#Let's make TAB-TAB in ipython work!r�cs$g|]}|j�j�r|�d��qS)N)�
startswithrk)r#�item)�
prefix_lenrerrr%�sz&ErrorProxy.__dir__.<locals>.<listcomp>)rp�set�dirrl�locals�keysr.rk)rer*r)rwrer�__dir__�s
zErrorProxy.__dir__cs��jr0�jd|t�kr0t��jd|�nt�j�jd|��t��sR�S|�jkrf�j|S��fdd�}|�j|<|S)N�_cs
y�||�}Wn�tdd��jD��k
�r�z�t�d�rD�j}nt�d�rV�j}nt��}t�����jkr�x>�j�D]0}|jt	�d�ks�|j
r||j
j|�r||j|��q|Wt
��fdd��jD�d�}|s�t
�fdd��jD��}|d|��WYdd��XnX|S)	Ncss|]}|dVqdS)rNr)r#�tr_trrrr(sz:ErrorProxy.__getattr__.<locals>.wrapped.<locals>.<genexpr>r1�messagerhc3s|]}�j�kr|VqdS)N)rm)r#r~)�e_typererrr(sc3s |]}t�|d�r|VqdS)rN)r&)r#r~)�errr(!sr�)�tuplerm�hasattrr1rr~rarnrh�getattrrg�matchri�next)rfr0rr1rtZ	transform)�orig_objre)r�r�r�wrappeds$"


"z'ErrorProxy.__getattr__.<locals>.wrapped)rprk�globalsr�rl�callablerq)re�attrr�r)r�rer�__getattr__�s


zErrorProxy.__getattr__)NT)r r!r"�__doc__rdr|r�rrrrrj�s
/rjc@seZdZdS)�
BlockDevErrorN)r r!r"rrrrr�*sr�c@seZdZdS)�
BtrfsErrorN)r r!r"rrrrr�.sr�c@seZdZdS)�CryptoErrorN)r r!r"rrrrr�2sr�c@seZdZdS)�DMErrorN)r r!r"rrrrr�6sr�c@seZdZdS)�	LoopErrorN)r r!r"rrrrr�:sr�c@seZdZdS)�LVMErrorN)r r!r"rrrrr�>sr�c@seZdZdS)�MDRaidErrorN)r r!r"rrrrr�Bsr�c@seZdZdS)�
MpathErrorN)r r!r"rrrrr�Fsr�c@seZdZdS)�	SwapErrorN)r r!r"rrrrr�Jsr�c@seZdZdS)�SwapActivateErrorN)r r!r"rrrrr�Lsr�c@seZdZdS)�SwapOldErrorN)r r!r"rrrrr�Nsr�c@seZdZdS)�SwapSuspendErrorN)r r!r"rrrrr�Psr�c@seZdZdS)�SwapUnknownErrorN)r r!r"rrrrr�Rsr�c@seZdZdS)�SwapPagesizeErrorN)r r!r"rrrrr�Tsr�c@seZdZdS)�KbdErrorN)r r!r"rrrrr�Xsr�c@seZdZdS)�	PartErrorN)r r!r"rrrrr�\sr�c@seZdZdS)�FSErrorN)r r!r"rrrrr�`sr�c@seZdZdS)�FSNoFSErrorN)r r!r"rrrrr�bsr�c@seZdZdS)�	S390ErrorN)r r!r"rrrrr�fsr�c@seZdZdS)�
UtilsErrorN)r r!r"rrrrr�jsr�c@seZdZdS)�NVDIMMErrorN)r r!r"rrrrr�nsr�c@seZdZdS)�VDOErrorN)r r!r"rrrrr�rsr�c@seZdZdS)�BlockDevNotImplementedErrorN)r r!r"rrrrr�vsr�z0.*The function '.*' called, but not implemented!���r	r
rrr�mdrr
rrrr�utilsr)T)NN)NFN)NN)NN)NFN)NNNN)N)N)N)N)N)F)FN)NNNN)N)N)NNF)rNN)NNNN)NN)N)NN)FNFFFr)F)N���r�)NNr�r�)rrFT)FFN)NNNNN)N)N)N)N)N)N)FN)FN)FN)N)N)N)N)N)N)N)N)N)N)rT)rF)rr)rrN)N)N)NN)NTN)rN)N)N)N)N)NN)N)NNN)FN)N)N)FFN)N)N)N)N)rrNN)NN)N)TN)F)N)NN)NN)N)N)N)N)N)N)N)rNFrN)rN)N)NNNTN)N)NNr�)r�)N)r)T)FN)N)NNFN)N)N)FN)N)N)N)N)N)N)N)FN)FN)N)N)r�r�r�r�r�r�)r�r�(Pr��re�os�collectionsrrZgi.importerrZgi.overridesrZ
gi.repositoryrZ_introspection_moduler�__all__ZPluginZLVMZBTRFSZCRYPTOZDMZLOOPZSWAPZMDRAIDZMPATHZKBDZPARTZFSZS390ZNVDIMMZVDOrarrcr2r6r3r9r7r;r:r=r<r?r>rEr@rIrFrKrJrNrLrPrOrRrQrTrSrXrUrZrYr]r[r_r^r`rhZcrypto_luks_format_luks2rjrmZCryptoLUKSVersionZLUKS1rprnZcrypto_luks_resize_luks2rqrrrursrwrvryrxr{rzZcrypto_tc_open_fullrr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��AttributeErrorr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrrrr	rrr
ZLVMVDOWritePolicyZAUTOrrrrrrrrrrrrrrr!rr$r"r'r%r)r(r,r*�unamerur/r.r1r0r3r2r6r4r8r7r:r9r>r;r@r?rBrArDrCrFrErHrGZVDOWritePolicyrJrIrLrKrNrMrPrOrRrQrTrSrVrUrXrWrZrYr\r[r^r]r`r_rdre�objectrj�	Exceptionr�r�r�r�r�r�r�r�r�r�r�r�r�r��extendr�r�r�r�r�r�r�r��NotImplementedErrorr��Error�compileZnot_implemented_ruleZfs_nofs_ruleZswap_activate_ruleZ
swap_old_ruleZswap_suspend_ruleZswap_unknown_ruleZswap_pagesize_ruler	r
rrrr�rr
rrrrrr�rrrrr�<module>s�


















	




























































































































	n"$$$$$$$8$$($"