
                            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  S
 r\	R$                  \	R&                  " \	R(                  R*                  5       " S S\	R,                  5      5       5       r\	R&                  " \	R(                  R0                  5       " S S\5      5       r\	R&                  " \	R(                  R4                  5       " S S\5      5       rg)z$Creates a Cloud NetApp Storage Pool.    )absolute_import)division)unicode_literals)client)base)flags)labels_util)logc                 ,    [         R                  " XS9  g )N)release_track)storagepools_flagsAddStoragePoolCreateArgs)parserr   s     *lib/surface/netapp/storage_pools/create.py_CommonArgsr      s    --    c                   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 Storage Pool.zk          Creates a Storage Pool to contain Volumes with a specified Service Level and capacity.
          a$            The following command creates a Storage Pool named NAME using all possible arguments with a VPC network in the same project

              $ {command} NAME --location=us-central1 --service-level=standard --capacity=2048 --network=name=default --active-directory=ad1 --kms-config=kms-config1 --enable-ldap=true --description="example description"

          The following command creates a Storage pool named NAME using all possible arguments with a shared VPC network in a separate project called VPC_PROJECT

              $ {command} NAME --location=us-central1 --service-level=standard --capacity=2048 --network=name=projects/VPC_PROJECT/locations/us-central1/networks/default --active-directory=ad1 --kms-config=kms-config1 --enable-ldap=true --description="example description"

          )DESCRIPTIONEXAMPLESc                 8    [        U [        R                  5        g N)r   r   _RELEASE_TRACKr   s    r   ArgsCreate.Args:   s    --.r   c                 D   UR                   R                  R                  5       n[        R                  " U R
                  5      n[        R                  " UR                  U R
                  5      R                  UR                  5      n[        R                  " XR                  R                  R                  5      nUR                  S-	  nUR                   nUR"                  nUR$                  b  UR$                  S-	  n	OSn	Sn
SnUR&                  b9  [        R(                  " UR                  5      R                  UR&                  5      nSnSnSnUR*                  b+  [        R,                  " UR*                  UR                  5      nU R
                  [.        R0                  R2                  :X  d(  U R
                  [.        R0                  R4                  :X  aA  UR6                  b  UR6                  S-	  n
UR8                  nUR:                  b  UR:                  nUR=                  UR?                  5       UUR@                  URB                  URD                  URF                  UURH                  URJ                  UUURL                  U	URN                  U
UUUUUS9nURQ                  X!RR                  U5      nURR                  (       aW  SRU                  U R1                  5       RV                  5      n[X        RZ                  R]                  SRU                  U5      5        U$ )z:Create a Cloud NetApp Storage Pool in the current project.   N   )nameservice_levelnetworkactive_directory
kms_configenable_ldapcapacitydescriptionallow_auto_tieringzonereplica_zonecustom_performance_enabledtotal_throughput
total_iopshot_tier_sizeenable_hot_tier_auto_resizelabelsunified_poolqos_typestorage_pool_typez#gcloud {} netapp storage-pools listzNCheck the status of the new storage pool by listing all storage pools:
  $ {} )/CONCEPTSstorage_poolParsestoragepools_clientStoragePoolsClientr   r   GetStoragePoolServiceLevelArgmessagesGetEnumForChoicer#   r	   ParseCreateArgsStoragePoolLabelsValuer(   r+   r,   r.   r4   GetStoragePoolQosTypeArgtypeGetStoragePoolTypeEnumFromArgr   ReleaseTrackALPHABETAr0   r1   r3   ParseStoragePoolConfigRelativeNamer$   r%   r&   r'   r)   r*   r-   r/   CreateStoragePoolasync_formatprefixr
   statusPrint)selfargsstoragepool_refr   r#   r2   capacity_in_gibr+   r,   total_throughput_mibpshot_tier_size_gibr4   r1   r3   r5   r7   resultcommands                     r   Run
Create.Run>   s   mm00668O 33D4G4GHF&DD,,t))*  ((oo))557Fmmr)O99D$$L(#44:#H}} #<<
//'  #'Lyy,JJ
))V__ 	t00666t00555				' .."4$($D$D!				&((00))+#..??$$ $$22!#'#B#B/??'$?!+) 1 L, %%lF {{5<<




$
$g 
jj#VG_ Mr    N)__name__
__module____qualname____firstlineno____doc__r   rD   GAr   detailed_helpstaticmethodr   rW   __static_attributes__rY   r   r   r   r   #   sC     ,$$''.		-  / /Fr   r   c                   T    \ rS rSrSr\R                  R                  r\	S 5       r
Srg)
CreateBeta   r   c                 8    [        U [        R                  5        g r   )r   rd   r   r   s    r   r   CreateBeta.Args   s    
112r   rY   N)rZ   r[   r\   r]   r^   r   rD   rF   r   ra   r   rb   rY   r   r   rd   rd      s(    +$$)).3 3r   rd   c                   T    \ rS rSrSr\R                  R                  r\	S 5       r
Srg)CreateAlpha   r   c                 8    [        U [        R                  5        g r   )r   ri   r   r   s    r   r   CreateAlpha.Args   s    223r   rY   N)rZ   r[   r\   r]   r^   r   rD   rE   r   ra   r   rb   rY   r   r   ri   ri      s(    +$$**.4 4r   ri   N)r^   
__future__r   r   r   +googlecloudsdk.api_lib.netapp.storage_poolsr   r9   googlecloudsdk.callioper   /googlecloudsdk.command_lib.netapp.storage_poolsr   r   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   r   DefaultUniverseOnlyReleaseTracksrD   r_   CreateCommandr   rF   rd   rE   ri   rY   r   r   <module>rv      s    + &  ' U ( W < # D%%(()_T _ * _D D%%**+3 3 ,3 D%%++,4* 4 -4r   