Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/check_point/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_host.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
dd
lmZmZmZddlZd�Zd�Zd�Zd�Zd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys�
---
module: checkpoint_host
short_description: Manages host objects on Check Point over Web Services API
description:
  - Manages host objects on Check Point devices including creating, updating, removing access rules objects.
    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.
    type: str
    required: True
  ip_address:
    description:
      - IP address of the host object.
    type: str
  state:
    description:
      - State of the access rule (present or absent). Defaults to present.
    type: str
    default: present
  auto_publish_session:
    description:
      - Publish the current session if changes have been performed
        after task completes.
    type: bool
    default: 'yes'
  auto_install_policy:
    description:
      - Install the package policy if changes have been performed
        after the task completes.
    type: bool
    default: 'yes'
  policy_package:
    description:
      - Package policy name to be installed.
    type: str
    default: 'standard'
  targets:
    description:
      - Targets to install the package policy on.
    type: list
s�
- name: Create host object
  checkpoint_host:
    name: attacker
    ip_address: 192.168.0.15

- name: Delete host object
  checkpoint_host:
    name: attacker
    state: absent
s�
checkpoint_hosts:
  description: The checkpoint host object created or updated.
  returned: always, except when deleting the host.
  type: list
(t
AnsibleModule(t
Connection(tcheckpoint_argument_spectpublishtinstall_policyNcC`s<|jd}i|d6}|jd|�\}}||fS(Ntnames/web_api/show-host(tparamstsend_request(tmodulet
connectionR
tpayloadtcodetresponse((sW/usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_host.pytget_hostes

cC`sP|jd}|jd}i|d6|d6}|jd|�\}}||fS(NR
t
ip_addresss
ip-addresss/web_api/add-host(RR(RRR
RRRR((sW/usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_host.pytcreate_hostos



cC`sP|jd}|jd}i|d6|d6}|jd|�\}}||fS(NR
Rs
ip-addresss/web_api/set-host(RR(RRR
RRRR((sW/usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_host.pytupdate_host{s



cC`s<|jd}i|d6}|jd|�\}}||fS(NR
s/web_api/delete-host(RR(RRR
RRR((sW/usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_host.pytdelete_host�s

cC`s*t}|jd|dkr&t}n|S(NRsipv4-address(tFalseRtTrue(Rthosttres((sW/usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_host.pytneeds_update�s	cC`s�tdtdddt�dtdd�dtdddd��}|jt�dg}td	|�}t|j�}t||�\}}itd
6}|j	ddkr�|dkr\t
||�r�t||�\}}|dkr�|jd|�n|j	d
rBt
|�|j	drBt||j	d|j	d�qBnt|d
<||d<q�q�|dkr�t||�\}}|dkr�|jd|�n|j	d
r�t
|�|j	dr�t||j	d|j	d�q�nt|d
<||d<q�n�|dkr�t||�\}}|dkr>|jd|�n|j	d
r�t
|�|j	dr�t||j	d|j	d�q�nt|d
<||d<n|dkr�n|j�|d<|j|�dS(NR
ttypetstrtrequiredRtstatetdefaulttpresentt
argument_spectchangedi�tmsgtauto_publish_sessiontauto_install_policytpolicy_packagettargetstcheckpoint_hostsi�tcheckpoint_session_uid(R"R$R(tdictRtupdateR
RR	t_socket_pathRRRRRt	fail_jsonRRRRtget_session_uidt	exit_json(R%trequired_ifRRRRtresult((sW/usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_host.pytmain�s^
	



$




$



$

t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRtansible.module_utils.connectionR	t2ansible.module_utils.network.checkpoint.checkpointR
RRtjsonRRRRRR6t__name__(((sW/usr/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_host.pyt<module>s&


0	
			
			?

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]