%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/modules/zfs.pyc

�
���^c@@sjdZddlmZmZmZddlZddlZddlZddl	Zddl
ZddlmZddl
mZdZeje�Zidd6Zd	�Zd
�Zd�Zd�Zd
�Zdd�Zd�Zdd�Zd�Zd�Zdd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)dS(u�
Module for running ZFS command

:codeauthor:    Nitin Madhok <nmadhok@clemson.edu>, Jorge Schrauwen <sjorge@blackdot.be>
:maintainer:    Jorge Schrauwen <sjorge@blackdot.be>
:maturity:      new
:depends:       salt.utils.zfs
:platform:      illumos,freebsd,linux

.. versionchanged:: 2018.3.1
  Big refactor to remove duplicate code, better type converions and improved
  consistancy in output.

i(tabsolute_importtunicode_literalstprint_functionN(tOrderedDict(tzipuzfsulistulist_cC@s!tjd�rtStdfSdS(u5
    Only load when the platform has zfs support
    uzfs_supportu2The zfs module cannot be loaded: zfs not supportedN(t
__grains__tgett__virtualname__tFalse(((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pyt__virtual__&scK@sqi}|jdt�r.|jd�|d<ntdtdddd|d|�d	td
t�}|ddkS(
u�
    Check if a ZFS filesystem or volume or snapshot exists.

    name : string
        name of dataset
    type : string
        also check if dataset is of a certain type, valid choices are:
        filesystem, snapshot, volume, bookmark, or all.

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.exists myzpool/mydataset
        salt '*' zfs.exists myzpool/myvolume type=volume

    utypeu-tucmd.run_alluzfs.zfs_commandtcommandulisttoptsttargettpython_shelltignore_retcodeuretcodei(RRt__salt__t	__utils__tTrue(tnametkwargsRtres((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytexists0s
		c
K@s�g}i}|jdi�}|jdt�r@|jd�n|jdt�rt|jdd�rt|jd�n|jdd�r�td|jd�dt�|d	<ntd
tddd
d|d|d|d|�dt�}td|d�S(u�
    Create a ZFS File System.

    name : string
        name of dataset or volume
    volume_size : string
        if specified, a zvol will be created instead of a dataset
    sparse : boolean
        create sparse volume
    create_parent : boolean
        creates all the non-existing parent datasets. any property specified on the
        command line using the -o option is ignored.
    properties : dict
        additional zfs properties (-o)

    .. note::

        ZFS properties can be specified at the time of creation of the filesystem by
        passing an additional argument called "properties" and specifying the properties
        with their respective values in the form of a python dictionary::

            properties="{'property1': 'value1', 'property2': 'value2'}"

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.create myzpool/mydataset [create_parent=True|False]
        salt '*' zfs.create myzpool/mydataset properties="{'mountpoint': '/export/zfs', 'sharenfs': 'on'}"
        salt '*' zfs.create myzpool/volume volume_size=1G [sparse=True|False]`
        salt '*' zfs.create myzpool/volume volume_size=1G properties="{'volblocksize': '512'}" [sparse=True|False]

    u
propertiesu
create_parentu-pusparseuvolume_sizeu-suzfs.to_sizetconvert_to_humanu-Vucmd.run_alluzfs.zfs_commandR
ucreatetflagsRtfilesystem_propertiesRR
uzfs.parse_command_resultucreatedN(RRtappendtNoneRR(RRRRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytcreateZs$&$&
		cK@s�g}|jdt�r(|jd�n|jdt�rJ|jd�n|jdt�rl|jd�ntdtdd	d
d|d|�d
t�}td|d�S(uv
    Destroy a ZFS File System.

    name : string
        name of dataset, volume, or snapshot
    force : boolean
        force an unmount of any file systems using the unmount -f command.
    recursive : boolean
        recursively destroy all children. (-r)
    recursive_all : boolean
        recursively destroy all dependents, including cloned file systems
        outside the target hierarchy. (-R)

    .. warning::
        watch out when using recursive and recursive_all

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.destroy myzpool/mydataset [force=True|False]

    uforceu-fu
recursive_allu-Ru	recursiveu-rucmd.run_alluzfs.zfs_commandR
udestroyRRR
uzfs.parse_command_resultu	destroyed(RRRRR(RRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytdestroy�s
		cK@sEg}g}td|�r�|jdt�r>tjd�n|jdt�r`tjd�n|jdt�r�|jd�q�nf|jdt�r�|jd�n|jdt�r�|jd	�n|jdt�r�tjd
�n|j|�|j|�tdtdd
dd|d|�dt�}td|d�S(u/
    Rename or Relocate a ZFS File System.

    name : string
        name of dataset, volume, or snapshot
    new_name : string
        new name of dataset, volume, or snapshot
    force : boolean
        force unmount any filesystems that need to be unmounted in the process.
    create_parent : boolean
        creates all the nonexistent parent datasets. Datasets created in
        this manner are automatically mounted according to the mountpoint
        property inherited from their parent.
    recursive : boolean
        recursively rename the snapshots of all descendent datasets.
        snapshots are the only dataset that can be renamed recursively.

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.rename myzpool/mydataset myzpool/renameddataset

    uzfs.is_snapshotu
create_parentu>zfs.rename - create_parent=True cannot be used with snapshots.uforceu6zfs.rename - force=True cannot be used with snapshots.u	recursiveu-ru-pu-fu<zfs.rename - recursive=True can only be used with snapshots.ucmd.run_alluzfs.zfs_commandR
urenameRRR
uzfs.parse_command_resulturenamed(RRRtlogtwarningRR(Rtnew_nameRRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytrename�s0


		c
K@s�t�}|jdd�}t|t�s<|jd�}nxd|kr[|jd�q?W|jdd�dg}i}|jdt�r�|jd�n|jdt�r�|jd	t�r�|jd	�|d
<n|jdt�r�|jd�|d<n|jd
t�}|rX||krX|jdd�j	d�rK||d<qX||d<nt|t�r}dj
|�|d<n
||d<tdtdddd|d|d|�dt�}|ddkr~x�|dj
�D]�}|jdt�r&tdttt||jd �����}	n4td!ttt||jd ����d"t�}	|	||	d<||	dd=q�Wntd#|�S|S($uF
    Return a list of all datasets or a specified dataset on the system and the
    values of their used, available, referenced, and mountpoint properties.

    name : string
        name of dataset, volume, or snapshot
    recursive : boolean
        recursively list children
    depth : int
        limit recursion to depth
    properties : string
        comma-separated list of properties to list, the name property will always be added
    type : string
        comma-separated list of types to display, where type is one of
        filesystem, snapshot, volume, bookmark, or all.
    sort : string
        property to sort on (default = name)
    order : string [ascending|descending]
        sort order (default = ascending)
    parsable : boolean
        display numbers in parsable (exact) values
        .. versionadded:: 2018.3.0

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.list
        salt '*' zfs.list myzpool/mydataset [recursive=True|False]
        salt '*' zfs.list myzpool/mydataset properties="sharenfs,mountpoint"

    u
propertiesuused,avail,refer,mountpointu,unameiu-Hu	recursiveu-rudepthu-dutypeu-tusortuorderu	ascendinguau-su-Su-oucmd.run_alluzfs.zfs_commandR
ulistRRRR
uretcodeustdoutuparsableuzfs.from_auto_dictu	uzfs.to_auto_dictRuzfs.parse_command_result(RRt
isinstancetlisttsplittremovetinsertRRt
startswithtjoinRRt
splitlinesRR(
RRtrett
propertiesRRtkwargs_sortRtdstds_data((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytlist_sT#		$



		*$	cC@s�tdtddd�dt�}|ddkryt�}x6|dj�D]$}|j�}|d	||d<qMW|Std
|�SdS(u�
    List mounted zfs filesystems

    .. versionadded:: 2018.3.1

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.list_mount

    ucmd.run_alluzfs.zfs_commandR
umountR
uretcodeiustdouti����uzfs.parse_command_resultN(RRRRR(R#(RR)tmount((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pyt
list_mountys
			c
K@s�g}i}|jdt�r.|jd�n|jdt�rV|jd�|d<n|dkr�|dkr�tjjjdd�n|jd�d}ntdt	d	d
dd|d
|d|�dt�}t	d|d�S(u�
    Mounts ZFS file systems

    name : string
        name of the filesystem, having this set to None will mount all filesystems. (this is the default)
    overlay : boolean
        perform an overlay mount.
    options : string
        optional comma-separated list of mount options to use temporarily for
        the duration of the mount.

    .. versionadded:: 2016.3.0
    .. versionchanged:: 2018.3.1

    .. warning::

            Passing '-a' as name is deprecated and will be removed in Sodium.

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.mount
        salt '*' zfs.mount myzpool/mydataset
        salt '*' zfs.mount myzpool/mydataset options=ro

    uoverlayu-Ouoptionsu-ou-auSodiumu�Passing '-a' as name is deprecated as of Salt 2019.2.0. This warning will be removed in Salt Sodium. Please pass name as 'None' instead to mount all filesystems.ucmd.run_alluzfs.zfs_commandR
umountRRRR
uzfs.parse_command_resultumountedN(Nu-a(
RRRRtsalttutilstversionst
warn_untilRR(RRRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pyR/�s*

	
		cK@s�g}|jdt�r(|jd�n|dkrJ|jd�d
}ntdtdddd|d	|�d
t�}td|d�S(u
    Unmounts ZFS file systems

    name : string
        name of the filesystem, you can use None to unmount all mounted filesystems.
    force : boolean
        forcefully unmount the file system, even if it is currently in use.

    .. warning::

        Using ``-a`` for the name parameter will probably break your system, unless your rootfs is not on zfs.

    .. versionadded:: 2016.3.0
    .. versionchanged:: 2018.3.1

    .. warning::

            Passing '-a' as name is deprecated and will be removed in Sodium.

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.unmount myzpool/mydataset [force=True|False]

    uforceu-fu-aucmd.run_alluzfs.zfs_commandR
uunmountRRR
uzfs.parse_command_resultu	unmountedN(Nu-a(RRRRRR(RRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytunmount�s
	
		c
K@s�g}|jdt�r(|jd�n|jdt�rJ|jd�ntdtdddd	|d
|d|�dt�}td
|d�S(u&
    Clears the specified property

    prop : string
        name of property
    name : string
        name of the filesystem, volume, or snapshot
    recursive : boolean
        recursively inherit the given property for all children.
    revert : boolean
        revert the property to the received value if one exists; otherwise
        operate as if the -S option was not specified.

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.inherit canmount myzpool/mydataset [recursive=True|False]

    u	recursiveu-rurevertu-Sucmd.run_alluzfs.zfs_commandR
uinheritRt
property_nameRR
uzfs.parse_command_resultu	inherited(RRRRR(tpropRRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytinherits
		c
K@sgdg}g}|jdt�r1|jd�n|jdt�rS|jd�n|j|�|rv|j|�ntdtddd	d
|d|�dt�}|d
dkr�td|�S|jdt�rO|jdt�rOt�}xk|dj�D]F}|j�}td|dd�}dj	|d�}	|	||<qWn|dj�}|SdS(u

    Display the difference between a snapshot of a given filesystem and
    another snapshot of that filesystem from a later time or the current
    contents of the filesystem.

    name_a : string
        name of snapshot
    name_b : string
        (optional) name of snapshot or filesystem
    show_changetime : boolean
        display the path's inode change time as the first column of output. (default = True)
    show_indication : boolean
        display an indication of the type of file. (default = True)
    parsable : boolean
        if true we don't parse the timestamp to a more readable date (default = True)

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.diff myzpool/mydataset@yesterday myzpool/mydataset

    u-Hushow_changetimeu-tushow_indicationu-Fucmd.run_alluzfs.zfs_commandR
udiffRRR
uretcodeiuzfs.parse_command_resultuparsableustdoutudateutils.strftimeu%Y-%m-%d.%H:%M:%S.%fu		iN(
RRRRRRRR(R#R'(
tname_atname_bRRRRR)tentrytentry_timestampt
entry_data((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytdiff?s4	

		%	c	K@s�g}|jdt�r(|jd�n|jdt�rJ|jd�n|jdt�r�|jdt�s�|jdt�r�|jd�q�tjd�ntdtd	d
dd|d
|�dt�}td|d�S(u
    Roll back the given dataset to a previous snapshot.

    name : string
        name of snapshot
    recursive : boolean
        destroy any snapshots and bookmarks more recent than the one
        specified.
    recursive_all : boolean
        destroy any more recent snapshots and bookmarks, as well as any
        clones of those snapshots.
    force : boolean
        used with the -R option to force an unmount of any clone file
        systems that are to be destroyed.

    .. warning::

        When a dataset is rolled back, all data that has changed since
        the snapshot is discarded, and the dataset reverts to the state
        at the time of the snapshot. By default, the command refuses to
        roll back to a snapshot other than the most recent one.

        In order to do so, all intermediate snapshots and bookmarks
        must be destroyed by specifying the -r option.

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.rollback myzpool/mydataset@yesterday

    u
recursive_allu-Ru	recursiveu-ruforceu-fuTzfs.rollback - force=True can only be used with recursive_all=True or recursive=Trueucmd.run_alluzfs.zfs_commandR
urollbackRRR
uzfs.parse_command_resultu
rolledback(RRRRRRR(RRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytrollback�s %$
		c
K@s�g}g}|jdi�}|jdt�r@|jd�n|j|�|j|�tdtdddd|d	|d
|�dt�}td|d
�S(uk
    Creates a clone of the given snapshot.

    name_a : string
        name of snapshot
    name_b : string
        name of filesystem or volume
    create_parent : boolean
        creates all the non-existing parent datasets. any property specified on the
        command line using the -o option is ignored.
    properties : dict
        additional zfs properties (-o)

    .. note::

        ZFS properties can be specified at the time of creation of the filesystem by
        passing an additional argument called "properties" and specifying the properties
        with their respective values in the form of a python dictionary::

            properties="{'property1': 'value1', 'property2': 'value2'}"

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.clone myzpool/mydataset@yesterday myzpool/mydataset_yesterday

    u
propertiesu
create_parentu-pucmd.run_alluzfs.zfs_commandR
ucloneRRRR
uzfs.parse_command_resultucloned(RRRRR(R9R:RRRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytclone�s!


		cC@s:tdtdddd|�dt�}td|d�S(	u5
    Promotes a clone file system to no longer be dependent on its "origin"
    snapshot.

    .. note::

        This makes it possible to destroy the file system that the
        clone was created from. The clone parent-child dependency relationship
        is reversed, so that the origin file system becomes a clone of the
        specified file system.

        The snapshot that was cloned, and any snapshots previous to this
        snapshot, are now owned by the promoted clone. The space they use moves
        from the origin file system to the promoted clone, so enough space must
        be available to accommodate these snapshots. No new space is consumed
        by this operation, but the space accounting is adjusted. The promoted
        clone must not have any conflicting snapshot names of its own. The
        rename subcommand can be used to rename any conflicting snapshots.

    name : string
        name of clone-filesystem

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.promote myzpool/myclone

    ucmd.run_alluzfs.zfs_commandR
upromoteRR
uzfs.parse_command_resultupromoted(RRR(RR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytpromote�s!
		cC@sttd�stdg�Sg}|j|�|j|�tdtdddd|�d	t�}td
|d�S(
un
    Creates a bookmark of the given snapshot

    .. note::

        Bookmarks mark the point in time when the snapshot was created,
        and can be used as the incremental source for a zfs send command.

        This feature must be enabled to be used. See zpool-features(5) for
        details on ZFS feature flags and the bookmarks feature.

    snapshot : string
        name of snapshot to bookmark
    bookmark : string
        name of bookmark

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.bookmark myzpool/mydataset@yesterday myzpool/mydataset#complete

    uzfs.has_feature_flagsuerrorubookmarks are not supporteducmd.run_alluzfs.zfs_commandR
ubookmarkRR
uzfs.parse_command_resultu
bookmarked(uerrorubookmarks are not supported(RRRRR(tsnapshottbookmarkRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pyRC*s




		cK@s�dg}g}|jdt�r1|jd�n|j|�tdtdddd|d	|�d
t�}td|�}|dd
kr�x`|dj�D]K}tttdddg|j	d����}|d||dj
�<q�Wn|S(uj
    Lists all existing user references for the given snapshot or snapshots.

    snapshot : string
        name of snapshot
    recursive : boolean
        lists the holds that are set on the named descendent snapshots also.

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.holds myzpool/mydataset@baseline

    u-Hu	recursiveu-rucmd.run_alluzfs.zfs_commandR
uholdsRRR
uzfs.parse_command_resulturetcodeiustdoutunameutagu	timestampu	(RRRRRR(RR"RR#tstrip(RBRRRRR)tholdt	hold_data((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytholds\s&	

			cO@s�d|kr%tjjjdd�ng}g}|jdt�rS|jd�n|j|�|j|�tdt	ddd	d
|d|�dt�}t	d
|d�S(u-
    Adds a single reference, named with the tag argument, to the specified
    snapshot or snapshots.

    .. note::

        Each snapshot has its own tag namespace, and tags must be unique within that space.

        If a hold exists on a snapshot, attempts to destroy that snapshot by
        using the zfs destroy command return EBUSY.

    tag : string
        name of tag
    snapshot : string
        name of snapshot(s)
    recursive : boolean
        specifies that a hold with the given tag is applied recursively to
        the snapshots of all descendent file systems.

    .. versionadded:: 2016.3.0
    .. versionchanged:: 2018.3.1

    .. warning::

        As of 2018.3.1 the tag parameter no longer accepts a comma-separated value.
        It's is now possible to create a tag that contains a comma, this was impossible before.

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.hold mytag myzpool/mydataset@mysnapshot [recursive=True]
        salt '*' zfs.hold mytag myzpool/mydataset@mysnapshot myzpool/mydataset@myothersnapshot

    u,uSodiumudA comma-separated tag is no support as of Salt 2018.3.1 This warning will be removed in Salt Sodium.u	recursiveu-rucmd.run_alluzfs.zfs_commandR
uholdRRR
uzfs.parse_command_resultuheld(
R1R2R3R4RRRtextendRR(ttagRBRRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pyRE�s"%



		cO@s�d|kr%tjjjdd�ng}g}|jdt�rS|jd�n|j|�|j|�tdt	ddd	d
|d|�dt�}t	d
|d�S(u
    Removes a single reference, named with the tag argument, from the
    specified snapshot or snapshots.

    .. note::

        The tag must already exist for each snapshot.
        If a hold exists on a snapshot, attempts to destroy that
        snapshot by using the zfs destroy command return EBUSY.

    tag : string
        name of tag
    snapshot : string
        name of snapshot(s)
    recursive : boolean
        recursively releases a hold with the given tag on the snapshots of
        all descendent file systems.

    .. versionadded:: 2016.3.0
    .. versionchanged:: 2018.3.1

    .. warning::

        As of 2018.3.1 the tag parameter no longer accepts a comma-separated value.
        It's is now possible to create a tag that contains a comma, this was impossible before.

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.release mytag myzpool/mydataset@mysnapshot [recursive=True]
        salt '*' zfs.release mytag myzpool/mydataset@mysnapshot myzpool/mydataset@myothersnapshot

    u,uSodiumudA comma-separated tag is no support as of Salt 2018.3.1 This warning will be removed in Salt Sodium.u	recursiveu-rucmd.run_alluzfs.zfs_commandR
ureleaseRRR
uzfs.parse_command_resultureleased(
R1R2R3R4RRRRHRR(RIRBRRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytrelease�s"$



		cO@s�g}|jdi�}|jdt�r:|jd�ntdtdddd|d	|d
t|��dt�}td|d
�S(uP
    Creates snapshots with the given names.

    snapshot : string
        name of snapshot(s)
    recursive : boolean
        recursively create snapshots of all descendent datasets.
    properties : dict
        additional zfs properties (-o)

    .. note::

        ZFS properties can be specified at the time of creation of the filesystem by
        passing an additional argument called "properties" and specifying the properties
        with their respective values in the form of a python dictionary::

            properties="{'property1': 'value1', 'property2': 'value2'}"

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.snapshot myzpool/mydataset@yesterday [recursive=True]
        salt '*' zfs.snapshot myzpool/mydataset@yesterday myzpool/myotherdataset@yesterday [recursive=True]

    u
propertiesu	recursiveu-rucmd.run_alluzfs.zfs_commandR
usnapshotRRRR
uzfs.parse_command_resultusnapshotted(RRRRRR"(RBRRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pyRBs
	cO@smtjjj|�}tdtdddd|j�d|j�dt|��dt	�}td	|d�S(
u!
    Sets the property or list of properties to the given value(s) for each dataset.

    dataset : string
        name of snapshot(s), filesystem(s), or volume(s)
    properties : string
        additional zfs properties pairs

    .. note::

        properties are passed as key-value pairs. e.g.

            compression=off

    .. note::

        Only some properties can be edited.

        See the Properties section for more information on what properties
        can be set and acceptable values.

        Numeric values can be specified as exact values, or in a human-readable
        form with a suffix of B, K, M, G, T, P, E (for bytes, kilobytes,
        megabytes, gigabytes, terabytes, petabytes, or exabytes respectively).

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.set myzpool/mydataset compression=off
        salt '*' zfs.set myzpool/mydataset myzpool/myotherdataset compression=off
        salt '*' zfs.set myzpool/mydataset myzpool/myotherdataset compression=lz4 canmount=off

    ucmd.run_alluzfs.zfs_commandR
usetR6tproperty_valueRR
uzfs.parse_command_result(
R1R2targstclean_kwargsRRtkeystvaluesR"R(tdatasetRRR((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pytsetOs'
	c

O@s�dg}i}|jdt�r7|jd�|d<n"|jdt�rY|jd�n|jdd�jd�}d	|kr�|jd	�nd
|kr�|jd
�n|jdd	�|jdd
�dj|�|d
<|jdt�r|jd�|d<n|jdt�r/|jd�|d<n|jdd�}tdtdddd|d|d|dt	|��dt�}td|�}|ddkr�x�|dj
�D]�}tt	t||jd ����}	d!|	krE|jd"t
�rtd#|	d
|	d!�|	d!<qEtd$|	d
|	d!d%t
�|	d!<n|	d	|krit�||	d	<n|	||	d	|	d
<|	d	=|	d
=q�Wn|S(&u�
    Displays properties for the given datasets.

    dataset : string
        name of snapshot(s), filesystem(s), or volume(s)
    properties : string
        comma-separated list of properties to list, defaults to all
    recursive : boolean
        recursively list children
    depth : int
        recursively list children to depth
    fields : string
        comma-separated list of fields to include, the name and property field will always be added
    type : string
        comma-separated list of types to display, where type is one of
        filesystem, snapshot, volume, bookmark, or all.
    source : string
        comma-separated list of sources to display. Must be one of the following:
        local, default, inherited, temporary, and none. The default value is all sources.
    parsable : boolean
        display numbers in parsable (exact) values (default = True)
        .. versionadded:: 2018.3.0

    .. note::
        If no datasets are specified, then the command displays properties
        for all datasets on the system.

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' zfs.get
        salt '*' zfs.get myzpool/mydataset [recursive=True|False]
        salt '*' zfs.get myzpool/mydataset properties="sharenfs,mountpoint" [recursive=True|False]
        salt '*' zfs.get myzpool/mydataset myzpool/myotherdataset properties=available fields=value depth=1

    u-Hudepthu-du	recursiveu-rufieldsuvalue,sourceu,unameupropertyiiu-outypeu-tusourceu-su
propertiesuallucmd.run_alluzfs.zfs_commandR
ugetRRR6RR
uzfs.parse_command_resulturetcodeustdoutu	uvalueuparsableu
zfs.from_autouzfs.to_autoR(RRRR#R$R%R'RRR"R(RRR(
RPRRRtfieldsR6RR)R,R-((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pyR�s`*	
		
(*t__doc__t
__future__RRRtloggingtsalt.utils.argsR1tsalt.utils.pathtsalt.utils.versionstsalt.modules.cmdmodtsalt.utils.odictRtsalt.ext.six.movesRRt	getLoggert__name__Rt__func_alias__R	RRRR RR.R0R/R5R8R>R?R@RARCRGRERJRBRQR(((s4/usr/lib/python2.7/site-packages/salt/modules/zfs.pyt<module>sB
	
	*	C	3	Ah	B	6	/C	?	=	,	2	4	E	D	6	7

Zerion Mini Shell 1.0