Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/f5/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZdd
l
mZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZ defd��YZ!de!fd��YZ"d e!fd!��YZ#d"e$fd#��YZ%d$e$fd%��YZ&d&e$fd'��YZ'd(�Z(e)d)kre(�nd*S(+i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: bigip_ssl_ocsp
short_description: Manage OCSP configurations on BIG-IP
description:
  - Manage OCSP configurations on BIG-IP.
version_added: 2.8
options:
  name:
    description:
      - Specifies the name of the OCSP certificate validator.
    type: str
    required: True
  cache_error_timeout:
    description:
      - Specifies the lifetime of an error response in the cache, in seconds.
    type: int
  proxy_server_pool:
    description:
      - Specifies the proxy server pool the BIG-IP system uses to fetch the OCSP
        response.
      - This involves creating a pool with proxy-servers.
      - Use this option when either the OCSP responder cannot be reached on any of
        BIG-IP system's interfaces or one or more servers can proxy an HTTP request
        to an external server and fetch the response.
    type: str
  cache_timeout:
    description:
      - Specifies the lifetime of the OCSP response in the cache, in seconds.
    type: str
  clock_skew:
    description:
      - Specifies the tolerable absolute difference in the clocks of the responder
        and the BIG-IP system, in seconds.
    type: int
  connections_limit:
    description:
      - Specifies the maximum number of connections per second allowed for the
        OCSP certificate validator.
    type: int
  dns_resolver:
    description:
      - Specifies the internal DNS resolver the BIG-IP system uses to fetch the
        OCSP response.
      - This involves specifying one or more DNS servers in the DNS resolver
        configuration.
      - Use this option when either there is a DNS server that can do the
        name-resolution of the OCSP responders or the OCSP responder can be
        reached on one of BIG-IP system's interfaces.
    type: str
  route_domain:
    description:
      - Specifies the route domain for fetching an OCSP response using HTTP
        forward proxy.
    type: str
  hash_algorithm:
    description:
      - Specifies a hash algorithm used to sign an OCSP request.
    type: str
    choices:
      - sha256
      - sha1
  certificate:
    description:
      - Specifies a certificate used to sign an OCSP request.
    type: str
  key:
    description:
      - Specifies a key used to sign an OCSP request.
    type: str
  passphrase:
    description:
      - Specifies a passphrase used to sign an OCSP request.
    type: str
  status_age:
    description:
      - Specifies the maximum allowed lag time that the BIG-IP system accepts for
        the 'thisUpdate' time in the OCSP response.
    type: int
  strict_responder_checking:
    description:
      - Specifies whether the responder's certificate is checked for an OCSP
        signing extension.
    type: bool
  connection_timeout:
    description:
      - Specifies the time interval that the BIG-IP system waits for before
        ending the connection to the OCSP responder, in seconds.
    type: int
  trusted_responders:
    description:
      - Specifies the certificates used for validating the OCSP response
        when the responder's certificate has been omitted from the response.
    type: str
  responder_url:
    description:
      - Specifies the absolute URL that overrides the OCSP responder URL
        obtained from the certificate's AIA extensions. This should be an
        HTTP-based URL.
    type: str
  update_password:
    description:
      - C(always) will allow to update passwords if the user chooses to do so.
        C(on_create) will only set the password for newly created OCSP validators.
    type: str
    choices:
      - always
      - on_create
    default: always
  partition:
    description:
      - Device partition to manage resources on.
    type: str
    default: Common
    version_added: 2.5
  state:
    description:
      - When C(present), ensures that the resource exists.
      - When C(absent), ensures that the resource does not exist.
    type: str
    choices:
      - present
      - absent
    default: present
extends_documentation_fragment: f5
notes:
  - Requires BIG-IP >= 13.x.
author:
  - Tim Rupp (@caphrim007)
s�
- name: Create a OCSP validator
  bigip_ssl_ocsp:
    name: foo
    proxy_server_pool: validators-pool
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
s^
cache_error_timeout:
  description: The new Response Caching Error Timeout value.
  returned: changed
  type: int
  sample: 3600
cache_timeout:
  description: The new Response Caching Timeout value.
  returned: changed
  type: str
  sample: indefinite
clock_skew:
  description: The new Response Validation Clock Skew value.
  returned: changed
  type: int
  sample: 300
connections_limit:
  description: The new Concurrent Connections Limit value.
  returned: changed
  type: int
  sample: 50
dns_resolver:
  description: The new DNS Resolver value.
  returned: changed
  type: str
  sample: /Common/resolver1
route_domain:
  description: The new Route Domain value.
  returned: changed
  type: str
  sample: /Common/0
hash_algorithm:
  description: The new Request Signing Hash Algorithm value.
  returned: changed
  type: str
  sample: sha256
certificate:
  description: The new Request Signing Certificate value.
  returned: changed
  type: str
  sample: /Common/cert1
key:
  description: The new Request Signing Key value.
  returned: changed
  type: str
  sample: /Common/key1
proxy_server_pool:
  description: The new Proxy Server Pool value.
  returned: changed
  type: str
  sample: /Common/pool1
responder_url:
  description: The new Connection Responder URL value.
  returned: changed
  type: str
  sample: "http://responder.site.com"
status_age:
  description: The new Response Validation Status Age value.
  returned: changed
  type: int
  sample: 0
strict_responder_checking:
  description: The new Response Validation Strict Responder Certificate Checking value.
  returned: changed
  type: bool
  sample: yes
connection_timeout:
  description: The new Connection Timeout value.
  returned: changed
  type: int
  sample: 8
trusted_responders:
  description: The new Response Validation Trusted Responders value.
  returned: changed
  type: int
  sample: /Common/default
(t
AnsibleModule(tenv_fallback(tLooseVersion(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_name(tflatten_boolean(ttmos_versiont
ParameterscB`s>eZidd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6Zddddd	ddd
ddddddddgZddddddddddd
dddddgZddddddddddd
dddddgZed ��Zed!��ZRS("tcache_error_timeouttcacheErrorTimeoutt
cache_timeouttcacheTimeoutt
clock_skewt	clockSkewtconnections_limittconcurrentConnectionsLimittdns_resolvertdnsResolvertproxy_server_pooltproxyServerPoolt
responder_urltresponderUrltroute_domaintrouteDomainthash_algorithmtsignHashtcertificatet
signerCerttkeyt	signerKeyt
passphrasetsignerKeyPassphraset
status_aget	statusAgetstrict_responder_checkingtstrictRespCertChecktconnection_timeoutttimeoutttrusted_respondersttrustedResponderscC`st|jd�S(NR.(Rt_values(tself((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR.QscC`sL|jddkrdSyt|jd�SWntk
rG|jdSXdS(NR(R4tNonetintt
ValueError(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRUs
(	t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyR.R(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRs�
			t
ApiParameterscB`seZRS((R9R:(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR@_stModuleParameterscB`sqeZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	RS(cC`s4|jddkrdSt|j|jd�}|S(NR"(R4R6Rt	partition(R5tresult((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR"dscC`s4|jddkrdSt|j|jd�}|S(NR(R4R6RRB(R5RC((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRkscC`s4|jddkrdSt|j|jd�}|S(NR(R4R6RRB(R5RC((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRrscC`s9|jddkrdS|jddkr.dS|jdS(NR ttnone(RDRE(R4R6(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR ys
cC`sK|jddkrdS|jddkr.dSt|j|jd�}|S(NR&RDRE(RDsnone(R4R6RRB(R5RC((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR&�scC`sK|jddkrdS|jddkr.dSt|j|jd�}|S(NR(RDRE(RDsnone(R4R6RRB(R5RC((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR(�scC`sK|jddkrdS|jddkr.dSt|j|jd�}|S(NR2RDRE(RDsnone(R4R6RRB(R5RC((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR2�s(
R9R:R?R"RRR R&R(R2(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRAcs		tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R=tgetattrt_filter_paramst	Exception(R5RCt
returnable((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyt	to_return�s
(R9R:RK(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRF�st
UsableChangescB`seZed��ZRS(cC`s2|jddkrdS|jddkr.dSdS(NR.tyestenabledtnotdisabled(R4(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR.�s(R9R:R?R.(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRL�stReportableChangescB`s&eZed��Zed��ZRS(cC`st|jd�}|S(NR.(RR4(R5RC((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR.�scC`sdS(N(R6(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR*�s(R9R:R?R.R*(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRQ�st
DifferencecB`sbeZdd�Zd�Zd�Zed��Zed��Zed��Z	ed��Z
RS(cC`s||_||_dS(N(twantthave(R5RSRT((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RGtAttributeErrort_Difference__default(R5tparamRC((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RGRSRTRV(R5RXtattr1tattr2((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyt	__default�s
cC`sd|jjdkrdS|jjdkr>|jjdkr>dS|jj|jjkr`|jjSdS(NRD(RSR R6RT(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR �s$cC`sd|jjdkrdS|jjdkr>|jjdkr>dS|jj|jjkr`|jjSdS(NRD(RSR&R6RT(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR&�s$cC`sd|jjdkrdS|jjdkr>|jjdkr>dS|jj|jjkr`|jjSdS(NRD(RSR(R6RT(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR(�s$cC`sd|jjdkrdS|jjdkr>|jjdkr>dS|jj|jjkr`|jjSdS(NRD(RSR2R6RT(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR2�s$N(R9R:R6RURYRWR?R R&R(R2(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRR�s						t
ModuleManagercB`s�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZRS(cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tgetR6R^RR_tclientRARSR@RTRLtchanges(R5targstkwargs((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRU�s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NR_(RR=RGRSR6RLRb(R5tchangedR(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyt_set_changed_options�scC`s�t|j|j�}tj}t�}xX|D]P}|j|�}|dkrUq.q.t|t�rt|j	|�q.|||<q.W|r�t
d|�|_tSt
S(NR_(RRRSRTRR>tdictRYR6t
isinstancetupdateRLRbtTruetFalse(R5tdiffR>Retktchange((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyt_update_changed_optionss		
cC`s|j�}|rtStS(N(RoRjRk(R5RC((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyt
should_updatescC`s�t|j�}t|�td�kr6td��nt}t�}|jj}|dkrl|j�}n|dkr�|j	�}nt
d|jj��}|j�}|j
|�|j
td|��|j|�|S(Ns13.0.0s5BIG-IP v13 or greater is required to use this module.tpresenttabsentR_Re(RRaR
RRkRgRStstateRqRrRQRbRKRit_announce_deprecations(R5ttmosReRCRst
reportableRb((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pytexec_modules"	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRaR^t	deprecate(R5RCtwarningstwarning((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRt5s


cC`s$|j�r|j�S|j�SdS(N(texistsRitcreate(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRq=s
cC`s�dj|jjd|jjdt|jj|jj��}|jjj|�}y|j	�}Wnt
k
rwtSX|jdks�d|kr�|ddkr�tSt
S(Ns:https://{0}:{1}/mgmt/tm/sys/crypto/cert-validator/ocsp/{2}tservertserver_porti�tcode(tformatRatproviderRRSRBtnametapiR`tjsonR8RkRRj(R5turitresptresponse((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRCs


+cC`s�|j�|_|jjdkrA|jji|jjd6�n|jjr]|jjd=n|j�smtS|jj	r�|j
jidd6�n|jjr�|j
jidd6�n|jj
r�tS|j�tS(NtalwaysR*RDRR(tread_current_from_deviceRTRStupdate_passwordRiR*R4RpRkRRbRR^t
check_modeRjtupdate_on_device(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRiRs 
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(R^R�Rjtremove_from_deviceRR(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pytremoveks
cC`s(|j�|jjrtS|j�tS(N(RfR^R�Rjtcreate_on_device(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR�ss


cC`s�|jj�}|jj|d<|jj|d<dj|jjd|jjd�}|jjj	|d|�}y|j
�}Wn%tk
r�}tt
|���nXd|kr�|ddkr�d
|kr�t|d
��q�t|j��ndS(NR�RBs7https://{0}:{1}/mgmt/tm/sys/crypto/cert-validator/ocsp/R�R�R�R�i�i�tmessage(i�i�(Rbt
api_paramsRSR�RBR�RaR�R�tpostR�R8Rtstrtcontent(R5R_R�R�R�tex((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR�zs
cC`s�|jj�}dj|jjd|jjdt|jj|jj��}|jj	j
|d|�}y|j�}Wn%tk
r�}t
t|���nXd|kr�|ddkr�d|kr�t
|d��q�t
|j��ndS(Ns:https://{0}:{1}/mgmt/tm/sys/crypto/cert-validator/ocsp/{2}R�R�R�R�i�R�(RbR�R�RaR�RRSRBR�R�tpatchR�R8RR�R�(R5R_R�R�R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR��s

cC`s|j�r|j�StS(N(RR�Rk(R5((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRr�s
cC`sydj|jjd|jjdt|jj|jj��}|jjj|�}|j	dkrft
St|j��dS(Ns:https://{0}:{1}/mgmt/tm/sys/crypto/cert-validator/ocsp/{2}R�R�i�(
R�RaR�RRSRBR�R�tdeleteRRjRR�(R5R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR��s

cC`s�dj|jjd|jjdt|jj|jj��}|jjj|�}y|j	�}Wn%t
k
r�}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j
��ntd|�S(Ns:https://{0}:{1}/mgmt/tm/sys/crypto/cert-validator/ocsp/{2}R�R�R�i�R�R_(R�RaR�RRSRBR�R�R`R�R8RR�R�R@(R5R�R�R�R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR��s

(R9R:RURfRoRpRwRtRqRRiR�R�R�R�RrR�R�(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR]�s 															tArgumentSpeccB`seZd�ZRS(c.C`s�t|_tdtdt�dtdd�dt�dt�dtdd�d	tdd�d
t�dt�dtd
ddg�dt�dt�dtdt�dtdd�dtdd�dtdd�dt�dt�dtddd
ddg�dtddd
dd g�d!tdd"d#td$gf��}i|_|jjt�|jj|�d
dgg|_ddgg|_dS(%NR�trequiredRttypeR7RRRRRR"R$tchoicestsha256tsha1R&R(R*tno_logR,R.tboolR0R2R R�tdefaultR�t	on_createRsRqRrRBtCommontfallbacktF5_PARTITION(	Rjtsupports_check_modeRgR	t
argument_specRiRtmutually_exclusivetrequired_together(R5R�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyRU�sD										(R9R:RU(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyR��sc	C`s�t�}td|jd|jd|jd|j�}y,td|�}|j�}|j|�Wn)t	k
r�}|j
dt|��nXdS(NR�R�R�R�R^Ry(R�RR�R�R�R�R]Rwt	exit_jsonRt	fail_jsonR�(tspecR^tmmtresultsR�((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pytmain�s				t__main__N(*t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR	tdistutils.versionR
t%library.module_utils.network.f5.bigipRt&library.module_utils.network.f5.commonRR
RRRRt(library.module_utils.network.f5.icontrolRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont(ansible.module_utils.network.f5.icontrolRR@RARFRLRQtobjectRRR]R�R�R9(((sM/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_ssl_ocsp.pyt<module>sP


�N
[:	:�/	

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