�
�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 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_bys�
---
module: checkpoint_access_rule_facts
short_description: Get access rules objects facts on Check Point over Web Services API
description:
- Get access rules objects facts on Check Point devices.
All operations are performed over Web Services API.
version_added: "2.8"
author: "Ansible by Red Hat (@rcarrillocruz)"
options:
name:
description:
- Name of the access rule. If not provided, UID is required.
type: str
uid:
description:
- UID of the access rule. If not provided, name is required.
type: str
layer:
description:
- Layer the access rule is attached to.
required: True
type: str
sl
- name: Get access rule facts
checkpoint_access_rule_facts:
layer: Network
name: "Drop attacker"
si
ansible_facts:
description: The checkpoint access rule object facts.
returned: always.
type: list
( t
AnsibleModule( t
Connection( t HTTPErrorNc C` s� | j d } | j d } | j d } | rD i | d 6| d 6} n | ra i | d 6| d 6} n | j d | � \ } } | | f S( Nt namet uidt layers /web_api/show-access-rule( t paramst send_request( t modulet
connectionR R R
t payloadt codet response( ( sd /usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_access_rule_facts.pyt get_access_ruleK s
c C` s� t d t d d � d t d d � d t d d d t � � } t d | � } t | j � } t | | � \ } } | d k r� | j d t d
| � � n | j d d j | | � � d S(
NR t typet strR R
t requiredt
argument_speci� t
ansible_factst checkpoint_access_rulest msgs5 Checkpoint device returned error {0} with message {1}( t dictt TrueR R t _socket_pathR t exit_jsont fail_jsont format( R R R R R ( ( sd /usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_access_rule_facts.pyt mainZ 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 t+ ansible.module_utils.six.moves.urllib.errorR
t jsonR R# t __name__( ( ( sd /usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_access_rule_facts.pyt <module> s
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]