Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/storage/netapp/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZddljjZddlmZej�Zdefd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_byse

---
module: na_ontap_vserver_cifs_security
short_description: NetApp ONTAP vserver CIFS security modification
extends_documentation_fragment:
    - netapp.na_ontap
version_added: '2.9'
author: NetApp Ansible Team (@carchi8py) <[email protected]>

description:
    - modify vserver CIFS security.

options:

  vserver:
    description:
    - name of the vserver.
    required: true
    type: str

  kerberos_clock_skew:
    description:
    - The clock skew in minutes is the tolerance for accepting tickets with time stamps that do not exactly match the host's system clock.
    type: int

  kerberos_ticket_age:
    description:
    - Determine the maximum amount of time in hours that a user's ticket may be used for the purpose of Kerberos authentication.
    type: int

  kerberos_renew_age:
    description:
    - Determine the maximum amount of time in days for which a ticket can be renewed.
    type: int

  kerberos_kdc_timeout:
    description:
    - Determine the timeout value in seconds for KDC connections.
    type: int

  is_signing_required:
    description:
    - Determine whether signing is required for incoming CIFS traffic.
    type: bool

  is_password_complexity_required:
    description:
    - Determine whether password complexity is required for local users.
    type: bool

  is_aes_encryption_enabled:
    description:
    - Determine whether AES-128 and AES-256 encryption mechanisms are enabled for Kerberos-related CIFS communication.
    type: bool

  is_smb_encryption_required:
    description:
    - Determine whether SMB encryption is required for incoming CIFS traffic.
    type: bool

  lm_compatibility_level:
    description:
    - Determine the LM compatibility level.
    choices: ['lm_ntlm_ntlmv2_krb', 'ntlm_ntlmv2_krb', 'ntlmv2_krb', 'krb']
    type: str

  referral_enabled_for_ad_ldap:
    description:
    - Determine whether LDAP referral chasing is enabled or not for AD LDAP connections.
    type: bool

  session_security_for_ad_ldap:
    description:
    - Determine the level of security required for LDAP communications.
    choices: ['none', 'sign', 'seal']
    type: str

  smb1_enabled_for_dc_connections:
    description:
    - Determine if SMB version 1 is used for connections to domain controllers.
    choices: ['false', 'true', 'system_default']
    type: str

  smb2_enabled_for_dc_connections:
    description:
    - Determine if SMB version 2 is used for connections to domain controllers.
    choices: ['false', 'true', 'system_default']
    type: str

  use_start_tls_for_ad_ldap:
    description:
    - Determine whether to use start_tls for AD LDAP connections.
    type: bool

sJ
    - name: modify cifs security
      na_ontap_vserver_cifs_security:
        vserver: ansible
        hostname: "{{ hostname }}"
        kerberos_clock_skew: 5
        kerberos_ticket_age: 5
        kerberos_renew_age: 10
        kerberos_kdc_timeout: 5
        is_signing_required: true
        is_password_complexity_required: true
        is_aes_encryption_enabled: true
        is_smb_encryption_required: true
        lm_compatibility_level: krb
        smb1_enabled_for_dc_connections: true
        smb2_enabled_for_dc_connections: true
        use_start_tls_for_ad_ldap: true
        username: username
        password: password

    - name: modify cifs security
      na_ontap_vserver_cifs_security:
        vserver: ansible
        hostname: "{{ hostname }}"
        referral_enabled_for_ad_ldap: true
        username: username
        password: password

    - name: modify cifs security
      na_ontap_vserver_cifs_security:
        vserver: ansible
        hostname: "{{ hostname }}"
        session_security_for_ad_ldap: true
        username: username
        password: password
t
N(t
AnsibleModule(t	to_native(tNetAppModuletNetAppONTAPCifsSecuritycB`sJeZdZd�Zd�Zd�Zed��Zd�Zd�Z	RS(s&
    modify vserver cifs security
    c$C`stj�|_|jjtdtdtdd�dtdtdd�dtdtdd�dtdtdd�d	tdtdd�d
tdtdd�dtdtdd�d
tdtdd�dtdtdd�dtdtdddddg�dtdtdd�dtdtddddg�dtdtddddg�dtdtddddg�dtdtdd���td |jd!t�|_t	�|_
|j
j|jj�|_
ttkr�|jjd"d#�n%tjd$|jd|j
d�|_dS(%Ntvservertrequiredttypetstrtkerberos_clock_skewtinttkerberos_ticket_agetkerberos_renew_agetkerberos_kdc_timeouttis_signing_requiredtbooltis_password_complexity_requiredtis_aes_encryption_enabledtis_smb_encryption_requiredtlm_compatibility_leveltchoicestlm_ntlm_ntlmv2_krbtntlm_ntlmv2_krbt
ntlmv2_krbtkrbtreferral_enabled_for_ad_ldaptsession_security_for_ad_ldaptnonetsigntsealtsmb1_enabled_for_dc_connectionstfalsettruetsystem_defaulttsmb2_enabled_for_dc_connectionstuse_start_tls_for_ad_ldapt
argument_spectsupports_check_modetmsgs(the python NetApp-Lib module is requiredtmodule(tnetapp_utilstna_ontap_host_argument_specR,tupdatetdicttTruetFalseR	R/Rt	na_helpertset_parameterstparamst
parameterstHAS_NETAPP_LIBt	fail_jsontsetup_na_ontap_zapitserver(tself((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pyt__init__�s2!	cC`sVtjjd�}tjjd�}tjjd�}|jd|jd�|j|�|j|�t�}y|jj|dt	�}WnOtjj
k
r�}|jjdd|jdt
|�fdtj��nX|jd	�rRt|jd	��d
krR|jd�jd�}|jd�|d
<|jd�|d<|jd�|d<|jd�|d<t|jd��|d<t|jd��|d<t|jd��|d<t|jd��|d<|jd�|d<t|jd��|d<|jd �|d!<|jd"�|d#<|jd$�|d%<t|jd&��|d'<|Sd(S()se
        get current vserver cifs security.
        :return: a dict of vserver cifs security
        scifs-security-get-itertquerys
cifs-securityR
tenable_tunnelingR.s(Error fetching cifs security from %s: %st	exceptionsnum-recordsisattributes-listskerberos-clock-skewRskerberos-ticket-ageRskerberos-renew-ageRskerberos-kdc-timeoutRsis-signing-requiredRsis-password-complexity-requiredRsis-aes-encryption-enabledRsis-smb-encryption-requiredRslm-compatibility-levelRsreferral-enabled-for-ad-ldapR!ssession-security-for-ad-ldapR"ssmb1-enabled-for-dc-connectionsR&ssmb2-enabled-for-dc-connectionsR*suse-start-tls-for-ad-ldapR+N(R0tzapit	NaElementt
add_new_childR9tadd_child_elemR3R=tinvoke_successfullyR4t
NaApiErrorR/R;R
t	tracebackt
format_exctget_child_by_nameRtget_child_contentRtNone(R>tcifs_security_getR@t
cifs_securitytcifs_security_detailstresultterrortcifs_security_info((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pytcifs_security_get_iter�s>

	*cC`s�tjjd�}x4|D],}|j|j|�t|j|��qWy|jj|dt	�WnOtjj
k
r�}|jjdd|jdt
|�fdtj��nXdS(sU
        :param modify: A list of attributes to modify
        :return: None
        scifs-security-modifyRAR.s'Error modifying cifs security on %s: %sR
RBN(R0RCRDREtattribute_to_nameRR9R=RGR4RHR/R;R
RIRJ(R>tmodifytcifs_security_modifyt	attributete((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pyRW�s
*cC`stj|dd�S(Nt_t-(Rtreplace(RX((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pyRU�scC`s�|jd�|j�}|jj||j�}|jjre|jjrLqe|re|j|�qen|jj	d|jj�dS(sCall modify operations.tna_ontap_vserver_cifs_securitytchangedN(
tasup_log_for_cserverRTR6tget_modified_attributesR9R^R/t
check_modeRWt	exit_json(R>tcurrentRV((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pytapply�s
cC`sAtj|j�}tjd|jd|�}tj||�dS(s�
        Fetch admin vserver for the given cluster
        Create and Autosupport log event with the given module name
        :param event_name: Name of the event log
        :return: None
        R/R
N(R0tget_cserverR=R<R/t
ems_log_event(R>t
event_nametresultstcserver((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pyR_s(
t__name__t
__module__t__doc__R?RTRWtstaticmethodRURdR_(((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pyR�s	"	%		
cC`st�}|j�dS(N(RRd(tobj((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pytmains	t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRItansible.module_utils.basicR	tansible.module_utils._textR
tansible.module_utils.netapptmodule_utilstnetappR0t"ansible.module_utils.netapp_moduleRthas_netapp_libR:tobjectRRoRj(((sa/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_ontap_vserver_cifs_security.pyt<module>s"


`%w	

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