Anons79 Mini Shell

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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlZddlZddl
mZdd
lmZddlmZd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys/
---
module: bigmon_policy
author: "Ted (@tedelhourani)"
short_description: Create and remove a bigmon out-of-band policy.
description:
    - Create and remove a bigmon out-of-band policy.
version_added: "2.3"
options:
  name:
    description:
     - The name of the policy.
    required: true
  policy_description:
    description:
     - Description of policy.
  action:
    description:
     - Forward matching packets to delivery interfaces, Drop is for measure rate of matching packets,
       but do not forward to delivery interfaces, capture packets and write to a PCAP file, or enable NetFlow generation.
    default: forward
    choices: ['forward', 'drop', 'flow-gen']
  priority:
    description:
     - A priority associated with this policy. The higher priority policy takes precedence over a lower priority.
    default: 100
  duration:
    description:
     - Run policy for duration duration or until delivery_packet_count packets are delivered, whichever comes first.
    default: 0
  start_time:
    description:
     - Date the policy becomes active
    default: ansible_date_time.iso8601
  delivery_packet_count:
    description:
     - Run policy until delivery_packet_count packets are delivered.
    default: 0
  state:
    description:
     - Whether the policy should be present or absent.
    default: present
    choices: ['present', 'absent']
  controller:
    description:
     - The controller address.
    required: true
  validate_certs:
    description:
     - If C(false), SSL certificates will not be validated. This should only be used
       on personally controlled devices using self-signed certificates.
    required: false
    default: true
    type: bool
  access_token:
    description:
     - Bigmon access token. If this isn't set, the environment variable C(BIGSWITCH_ACCESS_TOKEN) is used.

s
- name: policy to aggregate filter and deliver data center (DC) 1 traffic
  bigmon_policy:
    name: policy1
    policy_description: DC 1 traffic policy
    action: drop
    controller: '{{ inventory_hostname }}'
    state: present
    validate_certs: false
s # N(t
AnsibleModule(tRest(t	to_nativec
C`sOy|jdptjd}Wn6tk
rV}|jdd|jdtj��nX|jd}|jd}|jd}|jd	}|jd
}|jd}|jd}	|jd
}
|jd}t|idd6d|d6d|d�}|dkr|jdd�n|j
ddi�}
|
jdkr^|jddj|
j
d��nt}g|
j
D]l}|d|krn|d
|krn|d|	krn|d|krn|d|krn|d	|krn|^qn}|r�t}n|
dkr|r|jdt�n|
dkr:|r:|jdt�n|
dkr�i|d6|d6|d6|d	6|d
6|d 6|	d6}|jd!|d|�}
|
jd"kr�|jdt�q�|jdd#j||
j
d��n|
dkrK|jd!|di�}
|
jd"kr%|jdt�qK|jdd$j||
j
d��ndS(%Ntaccess_tokentBIGSWITCH_ACCESS_TOKENtmsgsUnable to load %st	exceptiontnametpolicy_descriptiontactiontprioritytdurationt
start_timetdelivery_packet_counttstatet
controllersapplication/jsonscontent-typessession_cookie=tCookieshttps://s0:8443/api/v1/data/controller/applications/bigtapsparameter `name` is missingspolicy?config=truetdatai�s,failed to obtain existing policy config: {0}tdescriptionsdelivery-packet-countspolicy-descriptiontpresenttchangedtabsents
start-timespolicy[name="%s"]i�s error creating policy '{0}': {1}s error deleting policy '{0}': {1}(tparamstostenvirontKeyErrort	fail_jsontmessaget	tracebackt
format_excR	tNonetgettstatus_codetformattjsontFalsetTruet	exit_jsontputtdelete(tmoduleRteRRRRRRRRRtresttresponsetconfig_presenttpolicytmatchingR((sS/usr/lib/python2.7/site-packages/ansible/modules/network/bigswitch/bigmon_policy.pyR5ds`'








#	
&cC`shtdtdtdddt�dtdddd�d	td
ddd
dgdd�dtdddd�dtdddd�dtdddtjj�j�d�dtdddd�dtdddt�dtd
ddgdd�dtdddd�dtdddt���}yt|�Wn5tk
rc}|jd t	|�d!t
j��nXdS("Nt
argument_specRttypetstrtrequiredRtdefaulttRtchoicestforwardtdroptcapturesflow-genRtintidRiRs+00:00RRRRRtvalidate_certstboolR,Rtno_logR
R(RtdictR,tdatetimetnowt	isoformatR5t	ExceptionR"R
R$R%(R0R1((sS/usr/lib/python2.7/site-packages/ansible/modules/network/bigswitch/bigmon_policy.pytmain�s"!(t__main__(t
__future__RRRR8t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRFRR$tansible.module_utils.basicRt0ansible.module_utils.network.bigswitch.bigswitchR	tansible.module_utils._textR
R5RJt__name__(((sS/usr/lib/python2.7/site-packages/ansible/modules/network/bigswitch/bigmon_policy.pyt<module>	s"


=	A	

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