�
�Udac @` s� d d l m Z m Z m Z e Z d Z d d l m Z d d l m
Z
d d l m Z d d l
Z
d d l Z d e f d � � YZ d S( i ( t absolute_importt divisiont print_functions
---
author:
- Miguel Angel Munoz (@magonzalez)
httpapi : fortios
short_description: HttpApi Plugin for Fortinet FortiOS Appliance or VM
description:
- This HttpApi plugin provides methods to connect to Fortinet FortiOS Appliance or VM via REST API
version_added: "2.9"
( t HttpApiBase( t to_text( t urllibNt HttpApic B` sG e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( c C` s# t t | � j | � d | _ d S( Nt ( t superR t __init__t _ccsrftoken( t selft
connection( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/httpapi/fortios.pyR 4 s c C` s d S( s�
Elevation is not required on Fortinet devices - Skipped
:param become_context: Unused input.
:return: None
N( t None( R t become_context( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/httpapi/fortios.pyt
set_become9 s c C` su d t j j | � d t j j | � d } | j d d d | d d � \ } } | d d
k rq t d � � n d S(
sA Call a defined login endpoint to receive an authentication token.s username=s &secretkey=s &ajax=1t urls /logincheckt datat methodt POSTi t 1s Wrong credentials. Please checkN( R t parset quotet send_requestt Exception( R t usernamet passwordR t dummyt result_data( ( sC /usr/lib/python2.7/site-packages/ansible/plugins/httpapi/fortios.pyt loginA s .$c C` s | j d d d d � d S( s"