
    U                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SS	KJr  \	R"                  " \	R$                  R&                  5      \	R(                   " S
 S\	R*                  5      5       5       r\	R"                  " \	R$                  R.                  5       " S S\5      5       r\	R"                  " \	R$                  R2                  5       " S S\5      5       rg)z(Creates a Cloud NetApp Active Directory.    )absolute_import)division)unicode_literals)client)base)flags)labels_util)logc                   d    \ rS rSrSr\R                  R                  rSSS.r	\
S 5       rS rSrg	)
Create   'Create a Cloud NetApp Active Directory.zV          Creates an AD (Active Directory) config for Cloud NetApp Volumes.
          a            The following command creates an AD named AD_NAME with the required arguments:

              $ {command} AD_NAME --location=us-central1 --domain=example-domain.com --dns=0.0.0.0 --net-bios-prefix=prefix-1 --enable-aes=true --username=user1 --password="secure1" --backup-operators=backup_op1,backup_op2 --security-operators=sec_op1,sec_op2 --enable-ldap-signing=false
          )DESCRIPTIONEXAMPLESc                 0    [         R                  " U 5        g )N)activedirectories_flagsAddActiveDirectoryCreateArgs)parsers    /lib/surface/netapp/active_directories/create.pyArgsCreate.Args/   s    88@    c                    UR                   R                  R                  5       n[        R                  " U R
                  5      n[        R                  " XR                  R                  R                  5      nUR                  UR                  5       UR                  UR                  UR                  UR                   UR"                  UR$                  UR&                  UR(                  UR*                  UR,                  UR.                  UR0                  UR2                  UR4                  UR6                  UR8                  UR:                  US9nUR=                  UUR>                  U5      nUR>                  (       aW  SRA                  U RC                  5       RD                  5      n[F        RH                  RK                  SRA                  U5      5        U$ )z>Create a Cloud NetApp Active Directory in the current project.)namedomainsitednsnet_bios_prefixorganizational_unitaes_encryptionusernamepasswordbackup_operatorssecurity_operatorsadministratorskdc_hostnamekdc_ipnfs_users_with_ldapldap_signingencrypt_dc_connectionsdescriptionlabelsz(gcloud {} netapp active-directories listzWCheck the status of the new active directory by listing all active directories:
  $ {} )&CONCEPTSactive_directoryParse	ad_clientActiveDirectoriesClient_RELEASE_TRACKr	   ParseCreateArgsmessagesActiveDirectoryLabelsValueParseActiveDirectoryConfigRelativeNamer   r   r   r   r   
enable_aesr!   r"   r#   r$   r%   r&   r'   r(   enable_ldap_signingr*   r+   CreateActiveDirectoryasync_formatReleaseTrackprefixr
   statusPrint)selfargsactivedirectory_refr   r,   r.   resultcommands           r   Run
Create.Run3   sw   --88>>@..t/B/BCF((oo--99;F 88 --/{{YYHH,, 44..22**&&{{ 44--#::$$' 9 * ))*=*.++*:<F {{:AA




$
$&g	jj##)6'? Mr    N)__name__
__module____qualname____firstlineno____doc__r   r>   GAr2   detailed_helpstaticmethodr   rG   __static_attributes__rI   r   r   r   r      sD     0$$''.		- A A&r   r   c                   D    \ rS rSrSr\R                  R                  rSr	g)
CreateBeta\   r   rI   N)
rJ   rK   rL   rM   rN   r   r>   BETAr2   rR   rI   r   r   rT   rT   \   s    /$$)).r   rT   c                   D    \ rS rSrSr\R                  R                  rSr	g)CreateAlphac   r   rI   N)
rJ   rK   rL   rM   rN   r   r>   ALPHAr2   rR   rI   r   r   rX   rX   c   s    /$$**.r   rX   N)rN   
__future__r   r   r   0googlecloudsdk.api_lib.netapp.active_directoriesr   r0   googlecloudsdk.callioper   4googlecloudsdk.command_lib.netapp.active_directoriesr   r   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   ReleaseTracksr>   rO   DefaultUniverseOnlyCreateCommandr   rV   rT   rZ   rX   rI   r   r   <module>rd      s    / &  ' P ( a < # D%%(():T :  *:z D%%**+* * ,* D%%++,+* + -+r   