�
�Udac @ s� d d l m Z d d l m Z d d l m Z d d l m Z y d d l m Z e Z Wn e k
rs e
Z n Xd e f d � � YZ d e f d � � YZ
d
e f d � � YZ d S(
i����( t FMGR_RC( t FMGBaseException( t
FMGRCommon( t
scrub_dict( t FortiManagert FortiManagerHandlerc
B s} e Z d � Z d � Z d d d d d d d d d d d d � Z e d d e e e e e e e e d d � � Z d � Z
RS(
c C s | | _ | | _ t | _ d S( N( t _connt _moduleR t _tools( t selft connt module( ( sZ /usr/lib/python2.7/site-packages/ansible/module_utils/network/fortimanager/fortimanager.pyt __init__8 s c C s1 | j j | | | � } | j j | | � } | S( s
Formats and Runs the API Request via Connection Plugin. Streamlined for use FROM Modules.
:param url: Connection URL to access
:type url: string
:param datagram: The prepared payload for the API Request in dictionary format
:type datagram: dict
:param method: The preferred API Request method (GET, ADD, POST, etc....)
:type method: basestring
:return: Dictionary containing results of the API Request via Connection Plugin
:rtype: dict
( R t format_requestR t send_request( R t urlt datagramt methodt datat response( ( sZ /usr/lib/python2.7/site-packages/ansible/module_utils/network/fortimanager/fortimanager.pyt process_request= s c C s� | d k r'