
                            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 r\R                  \R                  " \R                   R"                  5       " S S	\R$                  5      5       5       r\R                  " \R                   R(                  5       " S
 S\5      5       r\R                  " \R                   R,                  5       " S S\5      5       rg)z$Creates a Cloud NetApp Storage Pool.    )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.Args7   s    --.r   c                 0   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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  a  UR6                  b  UR6                  S-	  n
UR8                  nUR:                  b  UR:                  nUR<                  b+  [        R>                  " UR<                  UR                  5      nUR@                  b+  [        RB                  " UR@                  UR                  5      nURE                  URG                  5       UURH                  URJ                  URL                  URN                  UURP                  URR                  UUURT                  U	URV                  U
UUUUUUUS9nURY                  X!RZ                  U5      nURZ                  (       aW  SR]                  U R1                  5       R^                  5      n[`        Rb                  Re                  SR]                  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_type
scale_tiermodez#gcloud {} netapp storage-pools listzNCheck the status of the new storage pool by listing all storage pools:
  $ {} )3CONCEPTSstorage_poolParsestoragepools_clientStoragePoolsClientr   r
   GetStoragePoolServiceLevelArgmessagesGetEnumForChoicer    r   ParseCreateArgsStoragePoolLabelsValuer%   r(   r)   r+   r1   GetStoragePoolQosTypeArgtypeGetStoragePoolTypeEnumFromArgr   ReleaseTrackALPHABETAr-   r.   r0   r3   "GetStoragePoolScaleTierEnumFromArgr4   GetStoragePoolModeEnumFromArgParseStoragePoolConfigRelativeNamer!   r"   r#   r$   r&   r'   r*   r,   CreateStoragePoolasync_formatprefixr   statusPrint)selfargsstoragepool_refr   r    r/   capacity_in_gibr(   r)   total_throughput_mibpshot_tier_size_gibr1   r.   r0   r2   r3   r4   r6   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JDyy,JJ
))V__ 	t00666t00555				' .."4$($D$D!				&((		$'JJOOV__

 
	!??IIv
 00))+#..??$$ $$22!#'#B#B/??'$?!+- 1 L0 %%lF {{5<<




$
$g 
jj#VG_ Mr    N)__name__
__module____qualname____firstlineno____doc__r   rC   GAr   detailed_helpstaticmethodr   rX   __static_attributes__rZ   r   r   r   r       sC     ,$$''.		-  / /R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   re   r   r   s    r   r   CreateBeta.Args   s    
112r   rZ   N)r[   r\   r]   r^   r_   r   rC   rE   r   rb   r   rc   rZ   r   r   re   re      s(    +$$)).3 3r   re   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   rj   r   r   s    r   r   CreateAlpha.Args   s    223r   rZ   N)r[   r\   r]   r^   r_   r   rC   rD   r   rb   r   rc   rZ   r   r   rj   rj      s(    +$$**.4 4r   rj   N)r_   +googlecloudsdk.api_lib.netapp.storage_poolsr   r8   googlecloudsdk.callioper   /googlecloudsdk.command_lib.netapp.storage_poolsr   r
   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   r   DefaultUniverseOnlyReleaseTracksrC   r`   CreateCommandr   rE   re   rD   rj   rZ   r   r   <module>rv      s    + V ( W < # D%%(()kT k * k\ D%%**+3 3 ,3 D%%++,4* 4 -4r   