File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/postgres.cpython-310.pyc
Back
o ;j)` � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlmZ ddl ZddlZddlZddlZddlmZmZ ddlmZ ddlmZ zddlZdZW n eyg dZY nw zdd lmZ W n ey dd lmZ Y nw e�e �Z!dZ"dZ#dZ$d Z%dZ&dZ'e$e%e&e'fZ(ddddddddddddddd�Z)e*d�Z+d d!d"d#d$d%d&d'�Z,d(d)� Z-d*d+� Z.d�d,d-�Z/ . / d�d0d1�Z0 d�d2d3�Z1 d�d4d5�Z2d�d6d7�Z3d8d9� Z4 d�d:d;�Z5 d�d<d=�Z6 d�d>d?�Z7 d�d@dA�Z8d�dCdD�Z9 d�dEdF�Z: d�dGdH�Z; d�dIdJ�Z< d�dKdL�Z= d�dMdN�Z> d�dOdP�Z? d�dQdR�Z@ d�dSdT�ZA d�dUdV�ZB d�dWdX�ZC d�dYdZ�ZDd�d]d^�ZEe"fd_d`�ZFdadb� ZGdcdd� ZHd�dfdg�ZI \ h d�didj�ZJ h d�dkdl�ZK d�dmdn�ZL h d�dodp�ZM d�dqdr�ZN d�dsdt�ZO d�dudv�ZP d�dwdx�ZQ d�dydz�ZR d�d{d|�ZS d�d}d~�ZTdd�� ZU d�d�d��ZV d�d�d��ZW d�d�d��ZX d�d�d��ZY d�d�d��ZZ d�d�d��Z[ d�d�d��Z\ d�d�d��Z] d�d�d��Z^ d�d�d��Z_ d�d�d��Z` d�d�d��Za d�d�d��Zb d�d�d��Zc d�d�d��Zd d�d�d��Ze d�d�d��Zf d�d�d��Zgd�d�� Zh � d�d�d��Zid�d�� Zjd�d�� Zkd�d�� Zl � d�d�d��Zm � d�d�d��Zn � d�d�d��Zo � d�d�d��Zp . / d�d�d��Zqd�d�� ZrdS )�a� Module to provide Postgres compatibility to salt. :configuration: In order to connect to Postgres, certain configuration is required in /etc/salt/minion on the relevant minions. Some sample configs might look like:: postgres.host: 'localhost' postgres.port: '5432' postgres.user: 'postgres' -> db user postgres.pass: '' postgres.maintenance_db: 'postgres' The default for the maintenance_db is 'postgres' and in most cases it can be left at the default setting. This data can also be passed into pillar. Options passed into opts will overwrite options passed into pillar To prevent Postgres commands from running arbitrarily long, a timeout (in seconds) can be set .. code-block:: yaml postgres.timeout: 60 .. versionadded:: 3006.0 :note: This module uses MD5 hashing which may not be compliant with certain security audits. :note: When installing postgres from the official postgres repos, on certain linux distributions, either the psql or the initdb binary is *not* automatically placed on the path. Add a configuration to the location of the postgres bin's path to the relevant minion for this module:: postgres.bins_dir: '/usr/pgsql-9.5/bin/' � N)�OrderedDict)�CommandExecutionError�SaltInvocationError)�saslprep��LooseVersionTF)�token_bytes)�urandom�md5zEXTENSION NOT INSTALLEDzEXTENSION INSTALLEDzEXTENSION TO UPGRADEzEXTENSION TO MOVEZINSERTZCREATEZTRUNCATEZCONNECTZTRIGGERZSELECTZUSAGEZ TEMPORARYZUPDATEZEXECUTEZ REFERENCESZDELETEZGRANTZMAINTAIN)�a�C�D�c�t�r�U�T�w�X�x�d�*�m)�schema� tablespace�language�sequence�table�group�database�functionZarwdDxtmr r ZrwUZUCZCTcr )r r r r r r r c C s t sdS td�s dS dS )z� Only load this module if the psql bin exist. initdb bin might also be used, but its presence will be detected on runtime. F�psql)Fzpsql was not foundT)�HAS_CSV�_find_pg_binary� r$ r$ �I/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/postgres.py�__virtual__} s r&