�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d d l m
Z
d d
l m Z m Z d d l Z d � Z d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust networkt supported_bysy
---
module: checkpoint_session
short_description: Manages session objects on Check Point over Web Services API
description:
- Manages session objects on Check Point devices performing actions like publish and discard.
All operations are performed over Web Services API.
version_added: "2.8"
author: "Ansible by Red Hat (@rcarrillocruz)"
options:
uid:
description:
- UID of the session.
type: str
required: True
state:
description:
- Action to perform on the session object. Valid choices are published and discarded.
type: str
choices: ['published', 'discarded']
default: published
s�
- name: Publish session
checkpoint_session:
uid: 7a13a360-9b24-40d7-acd3-5b50247be33e
state: published
- name: Discard session
checkpoint_session:
uid: 7a13a360-9b24-40d7-acd3-5b50247be33e
state: discarded
s�
checkpoint_session:
description: The checkpoint session output per return from API. It will differ depending on action.
returned: always.
type: list
( t
AnsibleModule( t
Connection( t publisht discardNc C` s6 i | j d d 6} | j d | � \ } } | | f S( Nt uids /web_api/show-session( t paramst send_request( t modulet
connectiont payloadt codet result( ( sZ /usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_session.pyt get_sessionM s c C` s^ t d t d d d d � d t d d d d d d d g � � } t d | � } t | j � } t | | � \ } } i t d
6} | d k r1t | d
<d } | j d r� i | j d d 6} n | j d d k r� | j d | � \ } } n | j d
| � \ } } | d k r$| j
d | � n | | d <n | j
d d j | | � � | j | � d S( NR t typet strt defaultt statet publishedt choicest discardedt
argument_spect changedi� s /web_api/publishs /web_api/discardt msgt checkpoint_sessions6 Check Point device returned error {0} with message {1}(
t dictt NoneR R t _socket_pathR t Falset TrueR
R t fail_jsont formatt exit_json( R R R R t responseR R ( ( sZ /usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_session.pyt mainU s( $
t __main__( t
__future__R R R R t
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt ansible.module_utils.basicR t ansible.module_utils.connectionR t2 ansible.module_utils.network.checkpoint.checkpointR
R t jsonR R) t __name__( ( ( sZ /usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_session.pyt <module> s
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]