File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/pillar/__pycache__/azureblob.cpython-310.pyc
Back
o ;j}7 � @ s� d Z ddlZddlZddlZddlZddlmZ ddlZddl Zddl mZ dZz ddl mZ dZW n ey; Y nw dZe�e�Zd d � Z d!d d�Zdd� Zdd� Zdd� Zdd� Z d"dd�Zdd� Zdd� Zdd� Zdd � ZdS )#a� Use Azure Blob as a Pillar source. .. versionadded:: 3001 :maintainer: <devops@eitr.tech> :maturity: new :depends: * `azure-storage-blob <https://pypi.org/project/azure-storage-blob/>`_ >= 12.0.0 The Azure Blob ext_pillar can be configured with the following parameters: .. code-block:: yaml ext_pillar: - azureblob: container: 'test_container' connection_string: 'connection_string' multiple_env: False environment: 'base' blob_cache_expire: 30 blob_sync_on_update: True :param container: The name of the target Azure Blob Container. :param connection_string: The connection string to use to access the specified Azure Blob Container. :param multiple_env: Specifies whether the pillar should interpret top level folders as pillar environments. Defaults to false. :param environment: Specifies which environment the container represents when in single environment mode. Defaults to 'base' and is ignored if multiple_env is set as True. :param blob_cache_expire: Specifies expiration time of the Azure Blob metadata cache file. Defaults to 30s. :param blob_sync_on_update: Specifies if the cache is synced on update. Defaults to True. � N)�deepcopy)�PillarF)�BlobServiceClientT� azureblobc C s t sdS tS )N)FznThe following dependency is required to use the Azure Blob ext_pillar: Microsoft Azure Storage Blob >= 12.0.0 )�HAS_LIBS�__virtualname__� r r �I/opt/saltstack/salt/lib/python3.10/site-packages/salt/pillar/azureblob.py�__virtual__C s r �base� c C s& t j�t j�t� ||��}td �|g �|gkri S t|||||�} t� d| � |rdt� d� | �� D ]+\} }t|��� D ] \}}|D ]} t || | �}t� d|| | � t|| | || |� qCq=q3t� d� tt�}|rrt j�||�gn|g|d |<