%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/ceph.pyo

�
���^c@@s�dZddlmZmZmZddlZeje�ZdZ	yddl
Z
eZWne
k
rreZnXd�Zd�Zd�Zd�Zd	�Zd
�Zdd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*d �Z+d!�Z,d"�Z-d#�Z.d$�Z/d%�Z0d&�Z1dS('un
Module to provide ceph control with salt.

:depends:   - ceph_cfg Python module

.. versionadded:: 2016.11.0
i(tabsolute_importtprint_functiontunicode_literalsNucephcC@s)ttkr%djt�}t|fStS(Nu:ceph_cfg unavailable: {0} execution module cant be loaded (tHAS_CEPH_CFGtFalsetformatt__virtualname__(tmsg((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyt__virtual__s
cC@s
tj�S(us
    List partitions by disk

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.partition_list
    (tceph_cfgtpartition_list(((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR
 s
cC@s
tj�S(u�
    List all OSD data partitions by partition

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.partition_list_osd
    (R	tpartition_list_osd(((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR-s
cC@s
tj�S(u�
    List all OSD journal partitions by partition

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.partition_list_journal
    (R	tpartition_list_journal(((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR:s
cC@s
tj�S(ur
    List all OSD by cluster

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.osd_discover

    (R	tosd_discover(((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR
GscC@s
tj|�S(u�
    Check whether a given device path is a partition or a full disk.

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.partition_is /dev/sdc1
    (R	tpartition_is(tdev((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyRUs
cK@sE|dk	rtjd�n|jd|�}||d<tj|�S(u�
    Destroy the partition table and content of a given disk.

    .. code-block:: bash

        salt '*' ceph.osd_prepare 'dev'='/dev/vdc' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    dev
        The block device to format.

    cluster_name
        The cluster name. Defaults to ``ceph``.

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.
    u&Depricated use of function, use kwargsudevN(tNonetlogtwarningtgetR	tzap(ttargettkwargs((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyRbs

cK@s
tj|�S(u
    Prepare an OSD

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.osd_prepare 'osd_dev'='/dev/vdc' \
                'journal_dev'='device' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid' \
                'osd_fs_type'='xfs' \
                'osd_uuid'='2a143b73-6d85-4389-a9e9-b8a78d9e1e07' \
                'journal_uuid'='4562a5db-ff6f-4268-811d-12fd4a09ae98'

    cluster_uuid
        The device to store the osd data on.

    journal_dev
        The journal device. defaults to osd_dev.

    cluster_name
        The cluster name. Defaults to ``ceph``.

    cluster_uuid
        The cluster date will be added too. Defaults to the value found in local config.

    osd_fs_type
        set the file system to store OSD data with. Defaults to "xfs".

    osd_uuid
        set the OSD data UUID. If set will return if OSD with data UUID already exists.

    journal_uuid
        set the OSD journal UUID. If set will return if OSD with journal UUID already exists.
    (R	tosd_prepare(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR|s%cK@s
tj|�S(u~
    Activate an OSD

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.osd_activate 'osd_dev'='/dev/vdc'
    (R	tosd_activate(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR�s
cK@s
tj|�S(u�
    Create keyring for cluster

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.keyring_create \
                'keyring_type'='admin' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    keyring_type (required)
        One of ``admin``, ``mon``, ``osd``, ``rgw``, ``mds``

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tkeyring_create(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR�scK@s
tj|�S(u�
    Create save keyring locally

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.keyring_save \
                'keyring_type'='admin' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    keyring_type (required)
        One of ``admin``, ``mon``, ``osd``, ``rgw``, ``mds``

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tkeyring_save(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR�scK@s
tj|�S(u)
    Delete keyring for cluster

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.keyring_purge \
                'keyring_type'='admin' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    keyring_type (required)
        One of ``admin``, ``mon``, ``osd``, ``rgw``, ``mds``

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.

    If no ceph config file is found, this command will fail.
    (R	t
keyring_purge(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR�scK@s
tj|�S(u
    Returns ``True`` if the keyring is present on disk, otherwise ``False``

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.keyring_present \
                'keyring_type'='admin' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    keyring_type (required)
        One of ``admin``, ``mon``, ``osd``, ``rgw``, ``mds``

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tkeyring_present(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR�scK@s
tj|�S(u�
    Add keyring to authorized list

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.keyring_auth_add \
                'keyring_type'='admin' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    keyring_type (required)
        One of ``admin``, ``mon``, ``osd``, ``rgw``, ``mds``

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tkeyring_auth_add(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyRscK@s
tj|�S(u�
    Remove keyring from authorised list

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.keyring_osd_auth_del \
                'keyring_type'='admin' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    keyring_type (required)
        One of ``admin``, ``mon``, ``osd``, ``rgw``, ``mds``

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tkeyring_auth_del(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR0scK@s
tj|�S(u�
    Returns ``True`` if the target is a mon node, otherwise ``False``

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.mon_is \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_name
        The cluster name. Defaults to ``ceph``.

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.
    (R	tmon_is(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyRIscK@s
tj|�S(ue
    Get status from mon daemon

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.mon_status \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tstatus(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyt
mon_status^scK@s
tj|�S(u�
    Returns ``True`` if the mon daemon is in the quorum, otherwise ``False``

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.mon_quorum \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	t
mon_quorum(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR"sscK@s
tj|�S(u�
    Returns ``True`` if the mon daemon is running, otherwise ``False``

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.mon_active \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	t
mon_active(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR#�scK@s
tj|�S(u\
    Create a mon node

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.mon_create \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	t
mon_create(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR$�scK@s
tj|�S(u

    Create pools for rgw

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.rgw_pools_create

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	trgw_pools_create(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR%�scK@s
tj|�S(u
    Show pools missing for rgw

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.rgw_pools_missing

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	trgw_pools_missing(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR&�scK@s
tj|�S(u�
    Create a rgw

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.rgw_create \
                'name' = 'rgw.name' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    name (required)
        The RGW client name. Must start with ``rgw.``

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	t
rgw_create(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR'�scK@s
tj|�S(u�
    Remove a rgw

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.rgw_destroy \
                'name' = 'rgw.name' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    name (required)
        The RGW client name (must start with ``rgw.``)

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	trgw_destroy(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR(�scK@s
tj|�S(u�
    Create a mds

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.mds_create \
                'name' = 'mds.name' \
                'port' = 1000, \
                'addr' = 'fqdn.example.org' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    name (required)
        The MDS name (must start with ``mds.``)

    port (required)
        Port to which the MDS will listen

    addr (required)
        Address or IP address for the MDS to listen

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	t
mds_create(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR)
scK@s
tj|�S(u�
    Remove a mds

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.mds_destroy \
                'name' = 'mds.name' \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    name (required)
        The MDS name (must start with ``mds.``)

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tmds_destroy(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR*+scK@s
tj|�S(us
    List all cephx authorization keys

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.keyring_auth_list \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_name
        The cluster name. Defaults to ``ceph``.

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.
    (R	tkeyring_auth_list(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR+DscK@s
tj|�S(uX
    List all pools

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.pool_list \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_name
        The cluster name. Defaults to ``ceph``.

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.
    (R	t	pool_list(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR,YscK@stj||�S(uX
    Create a pool

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.pool_add pool_name \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_name
        The cluster name. Defaults to ``ceph``.

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    pg_num
        Default to 8

    pgp_num
        Default to pg_num

    pool_type
        can take values "replicated" or "erasure"

    erasure_code_profile
        The "erasure_code_profile"

    crush_ruleset
        The crush map rule set
    (R	tpool_add(t	pool_nameR((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR-ns!cK@stj||�S(u`
    Delete a pool

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.pool_del pool_name \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_name
        The cluster name. Defaults to ``ceph``.

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.
    (R	tpool_del(R.R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR/�scK@s
tj|�S(uj
    purge ceph configuration on the node

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.purge \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_name
        The cluster name. Defaults to ``ceph``.

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.
    (R	tpurge(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR0�scC@s
tj�S(u{
    Get the version of ceph installed

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.ceph_version
    (R	tceph_version(((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR1�s
cK@s
tj|�S(un
    Get the cluster's quorum status

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.cluster_quorum \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tcluster_quorum(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR2�scK@s
tj|�S(u�
    Get the cluster status, including health if in quorum

    CLI Example:

    .. code-block:: bash

        salt '*' ceph.cluster_status \
                'cluster_name'='ceph' \
                'cluster_uuid'='cluster_uuid'

    cluster_uuid
        The cluster UUID. Defaults to value found in ceph config file.

    cluster_name
        The cluster name. Defaults to ``ceph``.
    (R	tcluster_status(R((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyR3�s(2t__doc__t
__future__RRRtloggingt	getLoggert__name__RRR	tTrueRtImportErrorRRR
RRR
RRRRRRRRRRRRR!R"R#R$R%R&R'R(R)R*R+R,R-R/R0R1R2R3(((s5/usr/lib/python2.7/site-packages/salt/modules/ceph.pyt<module>sV


		
	
	
		
	(	
																!				$			
	

Zerion Mini Shell 1.0