File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/boto3mod.cpython-310.pyc
Back
o ;j?! � @ sb d Z ddlZddlZddlZddlmZ ddlZddlZddl Zddl mZ zddlZddl ZddlZddlZe�d��ej� dZW n eyN dZY nw e�e�ZdZejj�� Ze�di �Zd d � Zdd� Zd d� Z d+dd�Z!dd� Z" d,dd�Z#d-dd�Z$dd� Z%dd� Z&d.dd�Z'dd� Z( ! "d/d#d$�Z)d%d&� Z*d'd(� Z+d)d*� Z,dS )0a� Boto3 Common Utils ================= Note: This module depends on the dicts packed by the loader and, therefore, must be accessed via the loader or from the __utils__ dict. This module provides common functionality for the boto execution modules. The expected usage is to call `apply_funcs` from the `__virtual__` function of the module. This will bring properly initilized partials of `_get_conn` and `_cache_id` into the module's namespace. Example Usage: .. code-block:: python def __virtual__(): __utils__['boto.apply_funcs'](__name__, 'vpc') def test(): conn = _get_conn() vpc_id = _cache_id('test-vpc') .. versionadded:: 2015.8.0 � N)�partial)�SaltInvocationError�boto3TF�__context__c C s t jj�� } | du rtS | S )zg Only load if boto libraries exist and if boto libraries are greater than a given version. T)�salt�utilsZversionsZcheck_boto_reqs�__virtualname__)Zhas_boto� r �G/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/boto3mod.py�__virtual__<