File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/bigip.cpython-310.pyc
o
�N�gW � @ s� d Z ddlZddlZzddlZddlZdZW n ey! dZY nw dZdd� Z dZ
dOd d
�Zdd� Zd
d� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� ZdPdd �ZdOd!d"�Z dQd#d$�ZdOd%d&�ZdOd'd(�Z dRd)d*�Z dSd+d,�Zd-d.� Zd/d0� Zd1d2� Z dTd3d4�Z d5d6� Z!dOd7d8�Z" dUd9d:�Z# dVd;d<�Z$d=d>� Z% dOd?d@�Z&dAdB� Z'dCdD� Z(dEdF� Z) dOdGdH�Z*dIdJ� Z+dKdL� Z,dMdN� Z-dS )Wz�
An execution module which can manipulate an f5 bigip via iControl REST
:maturity: develop
:platform: f5_bigip_11.6
� NTF�bigipc C s t rtS dS )z.
Only return if requests is installed
)FzSThe bigip execution module cannot be loaded: python requests library not available.)�HAS_LIBS�__virtualname__� r r �F/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/bigip.py�__virtual__ s r zhttps://{host}/mgmt/tmc C sj t �� }| |f|_d|_|j�ddi� |r3td d|� ��}|r+|j�d|i� |S |j�ddi� |S )zG
Create a session to be used when connecting to iControl REST.
TzContent-Typezapplication/json�
grains.get�bigip_f5_trans:zX-F5-REST-Coordination-IdN)�requests�sessionZauthZverify�headers�update�__salt__)�username�password�trans_labelr �trans_idr r r �_build_session'