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_chain.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlZddlm
Z
dd
lmZddlmZd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: bigmon_chain
author: "Ted (@tedelhourani)"
short_description: Create and remove a bigmon inline service chain.
description:
    - Create and remove a bigmon inline service chain.
version_added: "2.3"
options:
  name:
    description:
     - The name of the chain.
    required: true
  state:
    description:
     - Whether the service chain should be present or absent.
    default: present
    choices: ['present', 'absent']
  controller:
    description:
     - The controller IP 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: bigmon inline service chain
  bigmon_chain:
    name: MyChain
    controller: '{{ inventory_hostname }}'
    state: present
    validate_certs: false
s # N(t
AnsibleModule(tRest(t	to_nativec	C`s�y|jdptjd}Wn6tk
rV}|jdd|jdtj��nX|jd}|jd}|jd}t|id	d
6d|d6d
|d�}d|||fkr�|jdd�n|j
ddi�}|jdkr|jddj|j
d��nt}g|j
D]}	|	d|kr)|	^q)}
|
rZt}n|dkr|r|jdt�n|dkr�|r�|jdt�n|dkr|jd|di|d6�}|jdkr�|jdt�q|jddj||j
d��n|dkr�|jd|di�}|jdkr`|jdt�q�|jddj||j
d��ndS(Ntaccess_tokentBIGSWITCH_ACCESS_TOKENtmsgsUnable to load %st	exceptiontnametstatet
controllersapplication/jsonscontent-typessession_cookie=tCookieshttps://s2:8443/api/v1/data/controller/applications/bigchainsparameter `name` is missingschain?config=truetdatai�s+failed to obtain existing chain config: {0}tdescriptiontpresenttchangedtabsentschain[name="%s"]i�serror creating chain '{0}': {1}serror deleting chain '{0}': {1}(tparamstostenvirontKeyErrort	fail_jsontmessaget	tracebackt
format_excR	tNonetgettstatus_codetformattjsontFalsetTruet	exit_jsontputtdelete(tmoduleRteRRRtresttresponsetconfig_presenttchaintmatching((sR/usr/lib/python2.7/site-packages/ansible/modules/network/bigswitch/bigmon_chain.pyR/IsB'


#,	 &cC`s�tdtdtdddt�dtdddt�dtdd	d
gdd	�dtdd
dd�dtdddt���}yt|�Wn5tk
r�}|jdt|�dtj��nXdS(Nt
argument_specRttypetstrtrequiredRRtchoicesRRtdefaulttvalidate_certstboolR&Rtno_logR
R(	RtdictR&R/t	ExceptionRR
RR(R*R+((sR/usr/lib/python2.7/site-packages/ansible/modules/network/bigswitch/bigmon_chain.pytmainxst__main__(t
__future__RRRR2t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRRtansible.module_utils.basicRt0ansible.module_utils.network.bigswitch.bigswitchR	tansible.module_utils._textR
R/R<t__name__(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/bigswitch/bigmon_chain.pyt<module>	s 


#
	/	

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