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_device_syslog.pyc

�
�Udac@`sCddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZytddlm
Z
dd
lmZddlmZddlmZddlmZddlmZddlmZWn�ek
rYddlm
Z
dd
lmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZde fd ��YZ!d!e fd"��YZ"d#e fd$��YZ#d%�Z$e%d&kr?e$�nd'S((i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: bigip_device_syslog
short_description: Manage system-level syslog settings on BIG-IP
description:
  - Manage system-level syslog settings on BIG-IP.
version_added: 2.8
options:
  auth_priv_from:
    description:
      - Specifies the lowest level of messages about user authentication
        to include in the system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  auth_priv_to:
    description:
      - Specifies the highest level of messages about user authentication
        to include in the system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  console_log:
    description:
      - Enables or disables logging emergency syslog messages to the
        console.
    type: bool
  cron_from:
    description:
      - Specifies the lowest level of messages about time-based scheduling
        to include in the system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  cron_to:
    description:
      - Specifies the highest level of messages about time-based
        scheduling to include in the system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  daemon_from:
    description:
      - Specifies the lowest level of messages about daemon performance to
        include in the system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  daemon_to:
    description:
      - Specifies the highest level of messages about daemon performance
        to include in the system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  include:
    description:
      - Syslog-NG configuration to include in the device syslog config.
    type: str
  iso_date:
    description:
      - Enables or disables the ISO date format for messages in the log
        files.
    type: bool
  kern_from:
    description:
      - Specifies the lowest level of kernel messages to include in the
        system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  kern_to:
    description:
      - Specifies the highest level of kernel messages to include in the
        system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  local6_from:
    description:
      - Specifies the lowest error level for messages from the local6
        facility to include in the log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  local6_to:
    description:
      - Specifies the highest error level for messages from the local6
        facility to include in the log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  mail_from:
    description:
      - Specifies the lowest level of mail log messages to include in the
        system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  mail_to:
    description:
      - Specifies the highest level of mail log messages to include in the
        system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  messages_from:
    description:
      - Specifies the lowest level of system messages to include in the
        system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  messages_to:
    description:
      - Specifies the highest level of system messages to include in the
        system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  user_log_from:
    description:
      - Specifies the lowest level of user account messages to include in
        the system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
  user_log_to:
    description:
      - Specifies the highest level of user account messages to include in
        the system log.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - err
      - info
      - notice
      - warning
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
s�
- name: Create a syslog config
  bigip_device_syslog:
    name: foo
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
s:	
auth_priv_from:
  description: The new lowest user authentication logging level
  returned: changed
  type: str
  sample: alert
auth_priv_to:
  description: The new highest user authentication logging level.
  returned: changed
  type: str
  sample: emerg
console_log:
  description: Whether logging to console is enabled or not.
  returned: changed
  type: bool
  sample: yes
iso_date:
  description: Whether ISO date format in logs is enabled or not
  returned: changed
  type: bool
  sample: no
cron_from:
  description: The new lowest time-based scheduling logging level.
  returned: changed
  type: str
  sample: emerg
cron_to:
  description: The new highest time-based scheduling logging level.
  returned: changed
  type: str
  sample: alert
daemon_from:
  description: The new lowest daemon performance logging level.
  returned: changed
  type: str
  sample: alert
daemon_to:
  description: The new highest daemon performance logging level.
  returned: changed
  type: str
  sample: alert
include:
  description: The new extra syslog-ng configuration to include in syslog config.
  returned: changed
  type: str
  sample: "filter f_remote_syslog { not (facility(local6)) };"
kern_from:
  description: The new lowest kernel messages logging level.
  returned: changed
  type: str
  sample: alert
kern_to:
  description: The new highest kernel messages logging level.
  returned: changed
  type: str
  sample: alert
local6_from:
  description: The new lowest local6 facility logging level.
  returned: changed
  type: str
  sample: alert
local6_to:
  description: The new highest local6 facility logging level.
  returned: changed
  type: str
  sample: alert
mail_from:
  description: The new lowest mail log logging level.
  returned: changed
  type: str
  sample: alert
mail_to:
  description: The new highest mail log logging level.
  returned: changed
  type: str
  sample: alert
messages_from:
  description: The new lowest system logging level.
  returned: changed
  type: str
  sample: alert
messages_to:
  description: The new highest system logging level.
  returned: changed
  type: str
  sample: alert
user_log_from:
  description: The new lowest user account logging level.
  returned: changed
  type: str
  sample: alert
user_log_to:
  description: The new highest user account logging level.
  returned: changed
  type: str
  sample: alert
(t
AnsibleModule(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(tflatten_boolean(tcmp_str_with_nonet
ParameterscB`sgeZidd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6Zd$ddddd	dd
dddddddddd!d#gZd$dddddd
ddddddddddd d"gZd$dddddd
ddddddddddd d"gZed%��Zed&��ZRS('tauth_priv_fromtauthPrivFromtauth_priv_tot
authPrivTotconsole_logt
consoleLogt	cron_fromtcronFromtcron_totcronTotdaemon_fromt
daemonFromt	daemon_totdaemonTotiso_datetisoDatet	kern_fromtkernFromtkern_totkernTotlocal6_fromt
local6Fromt	local6_totlocal6Tot	mail_fromtmailFromtmail_totmailTot
messages_fromtmessagesFromtmessages_tot
messagesTot
user_log_fromtuserLogFromtuser_log_tot	userLogTotincludecC`st|jd�S(NR(Rt_values(tself((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR�scC`st|jd�S(NR(RR6(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR�s(	t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyRR(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR�s�
			t
ApiParameterscB`seZed��ZRS(cC`s"|jddkrdS|jdS(NR5tnone(NR@(R6tNone(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR5�s(R8R9R>R5(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR?�stModuleParameterscB`seZed��ZRS(cC`sE|jddkrdS|jddkr.dS|jdjdd�S(NR5tR@t"t'(RCsnone(R6RAtreplace(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR5�s
(R8R9R>R5(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRB�stChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R<tgetattrt_filter_paramst	Exception(R7tresultt
returnable((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyt	to_return�s
(R8R9RM(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRG�st
UsableChangescB`s&eZed��Zed��ZRS(cC`s2|jddkrdS|jddkr.dSdS(NRtyestenabledtdisabled(R6RA(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRs
cC`s2|jddkrdS|jddkr.dSdS(NRRORPRQ(R6RA(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRs
(R8R9R>RR(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRN
stReportableChangescB`s&eZed��Zed��ZRS(cC`st|jd�S(NR(RR6(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRscC`st|jd�S(NR(RR6(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR!s(R8R9R>RR(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRRst
DifferencecB`s5eZdd�Zd�Zd�Zed��ZRS(cC`s||_||_dS(N(twantthave(R7RTRU((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyt__init__'s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RHtAttributeErrort_Difference__default(R7tparamRK((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pytcompare+s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RHRTRURW(R7RYtattr1tattr2((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyt	__default2s
cC`st|jj|jj�S(N(RRTR5RU(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR5;sN(R8R9RARVRZRXR>R5(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRS&s			t
ModuleManagercB`sbeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tgetRAR_R	R`tclientRBRTR?RURNtchanges(R7targstkwargs((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRVAs
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NR`(RR<RHRTRARNRc(R7tchangedtkey((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyt_set_changed_optionsHs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`(RSRTRURR=tdictRZRAt
isinstancetupdateRNRctTruetFalse(R7tdiffR=Rftktchange((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyt_update_changed_optionsPs		
cC`s|j�}|rtStS(N(RqRlRm(R7RK((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyt
should_updatebscC`smt�}|j�}td|jj��}|j�}|j|�|jtd|��|j|�|S(NR`Rf(RitpresentRRRcRMRkt_announce_deprecations(R7RKRft
reportableRc((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pytexec_modulehs	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRbR_t	deprecate(R7RKtwarningstwarning((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRtts


cC`s
|j�S(N(Rk(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRs|scC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRURrRmR_t
check_modeRltupdate_on_device(R7((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRks
cC`s�|jj�}dj|jjd|jjd�}|jjj|d|�}y|j�}Wn%tk
r�}t	t
|���nXd|kr�|ddkr�d|kr�t	|d��q�t	|j��ndS(Ns"https://{0}:{1}/mgmt/tm/sys/syslogtservertserver_porttjsontcodei�tmessage(Rct
api_paramstformatRbtprovidertapitpatchR�t
ValueErrorR
tstrtcontent(R7R`turitresptresponsetex((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR��s
cC`s�dj|jjd|jjd�}|jjj|�}y|j�}Wn%tk
rr}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j	��nt
d|�S(Ns"https://{0}:{1}/mgmt/tm/sys/syslogR�R�R�i�R�R`(R�RbR�R�RaR�R�R
R�R�R?(R7R�R�R�R�((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR~�s
(R8R9RVRhRqRrRvRtRsRkR�R~(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR^@s										tArgumentSpeccB`seZd�ZRS(c)C`stt|_ddddddddg}td	td
|�dtd
|�dtd
d�dtd
|�dtd
|�dtd
|�dtd
|�dt�dtd
d�dtd
|�dtd
|�dtd
|�dtd
|�dtd
|�dtd
|�dtd
|�dtd
|�dtd
|�dtd
|��}i|_|jjt�|jj|�dS(NtalerttcrittdebugtemergterrtinfotnoticeR}RtchoicesRRttypetboolRRRRR5RR!R#R%R'R)R+R-R/R1R3(Rltsupports_check_modeRit
argument_specRkR
(R7tlevelsR�((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyRV�s2			(R8R9RV(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyR��scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�R_Rx(
R�RR�R�R^Rvt	exit_jsonR
t	fail_jsonR�(tspecR_tmmtresultsR�((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pytmain�s		t__main__N(&t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt%library.module_utils.network.f5.bigipR	t&library.module_utils.network.f5.commonR
RRR
Rt'library.module_utils.network.f5.compareRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont'ansible.module_utils.network.f5.compareRR?RBRGRNRRtobjectRSR^R�R�R8(((sR/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_syslog.pyt<module>sH


�b
a

m!	

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