
    $                        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$Updates a Cloud NetApp Storage Pool.    )client)base)flags)labels_util)logc                 0    [         R                  " X5        g N)storagepools_flagsAddStoragePoolUpdateArgs)parserrelease_tracks     *lib/surface/netapp/storage_pools/update.py_CommonArgsr      s    --fD    c                   d    \ rS rSrSr\R                  R                  rSSS.r	\
S 5       rS rSrg	)
Update   #Update a Cloud NetApp Storage Pool.z@          Updates a Storage Pool with given arguments
          z          The following command updates a Storage Pool named NAME in the given location

              $ {command} NAME --location=us-central1 --capacity=4096 --active-directory=ad-2 --description="new description" --update-labels=key1=val1
          )DESCRIPTIONEXAMPLESc                 8    [        U [        R                  5        g r	   )r   r   _RELEASE_TRACKr   s    r   ArgsUpdate.Args0   s    --.r   c                 >
   UR                   R                  R                  5       n[        R                  " U R
                  5      n[        R                  R                  U5      nUR                  U5      nUR                  (       a  UR                  S-	  OSnUR                  5       (       aI  UR                  UR                  R                  R                  UR                   5      R#                  5       nOSnUR$                  nUR&                  n	UR(                  b  UR(                  S-	  n
OSn
SnSnSnUR*                  b9  [,        R.                  " UR                  5      R1                  UR*                  5      nU R
                  [2        R4                  R6                  :X  d(  U R
                  [2        R4                  R8                  :X  a(  UR:                  b  UR:                  S-	  nUR<                  nUR?                  UUUR@                  URB                  UURD                  UU	U
URF                  UUUS9n/ nURI                  S5      (       a  URK                  S5        URI                  S5      (       a  URK                  S5        URI                  S	5      (       a  URK                  S	5        URI                  S
5      (       d,  URI                  S5      (       d  URI                  S5      (       a  URK                  S5        URI                  S5      (       a  URK                  S5        URI                  S5      (       a  URK                  S5        URI                  S5      (       a  URK                  S5        URI                  S5      (       a  URK                  S5        URI                  S5      (       a  URK                  S5        URI                  S5      (       a  URK                  S5        U R
                  [2        R4                  R6                  :X  d(  U R
                  [2        R4                  R8                  :X  aN  URI                  S5      (       a  URK                  S5        URI                  S5      (       a  URK                  S5        SRM                  U5      nURO                  X.UURP                  5      nURP                  (       aW  SRS                  U R5                  5       RT                  5      n[V        RX                  R[                  SRS                  U5      5        U$ ) z:Update a Cloud NetApp Storage Pool in the current project.r   N   )capacityactive_directorydescriptionlabelsallow_auto_tieringzonereplica_zonetotal_throughput
total_iopshot_tier_sizeenable_hot_tier_auto_resizeqos_typer   capacityGibr   activeDirectoryr    update_labelsremove_labelsclear_labelsr!   r"   allowAutoTieringr#   r$   replicaZoner%   totalThroughputMibpsr&   	totalIopsr)   qosTyper'   hotTierSizeGibr(   enableHotTierAutoResize,z#gcloud {} netapp storage-pools listzRCheck the status of the updated storage pool by listing all storage pools:
  $ {} ).CONCEPTSstorage_poolParsestoragepools_clientStoragePoolsClientr   r   DiffFromUpdateArgsGetStoragePoolr   MayHaveUpdatesApplymessagesStoragePoolLabelsValuer!   	GetOrNoner#   r$   r%   r)   r
   GetStoragePoolQosTypeArgGetEnumForChoicer   ReleaseTrackALPHABETAr'   r(   ParseUpdatedStoragePoolConfigr   r    r"   r&   IsSpecifiedappendjoinUpdateStoragePoolasync_formatprefixr   statusPrint)selfargsstoragepool_refr   labels_difforig_storagepoolcapacity_in_gibr!   r#   r$   total_throughput_mibpshot_tier_size_gibr(   r)   r8   updated_fieldsupdate_maskresultcommands                      r   Run
Update.Run4   s<   mm00668O 33D4G4GHF""11$7K,,_=-1]]dmmr)O!!##  
//
%
%
1
13C3J3J	  f99D$$L(#44:#"&H}} #<<
//'  	t00666t00555				' .."4$($D$D!77 ..$$22!/??'$? 8 L  N
##M**++-.&&M*))O,,N++H%,--./F#''M**++23%%K(
##I&t00666t00555			/	*	*./			7	8	878((>*K%%{DKKF {{5<<




$
$g 
jj#VG_ Mr    N)__name__
__module____qualname____firstlineno____doc__r   rG   GAr   detailed_helpstaticmethodr   r`   __static_attributes__rb   r   r   r   r      sC     ,$$''.		- / /_r   r   c                   T    \ rS rSrSr\R                  R                  r\	S 5       r
Srg)
UpdateBeta   r   c                 8    [        U [        R                  5        g r	   )r   rm   r   r   s    r   r   UpdateBeta.Args   s    
112r   rb   N)rc   rd   re   rf   rg   r   rG   rI   r   rj   r   rk   rb   r   r   rm   rm      s(    +$$)).3 3r   rm   c                   T    \ rS rSrSr\R                  R                  r\	S 5       r
Srg)UpdateAlpha   r   c                 8    [        U [        R                  5        g r	   )r   rr   r   r   s    r   r   UpdateAlpha.Args   s    223r   rb   N)rc   rd   re   rf   rg   r   rG   rH   r   rj   r   rk   rb   r   r   rr   rr      s(    +$$**.4 4r   rr   N)rg   +googlecloudsdk.api_lib.netapp.storage_poolsr   r:   googlecloudsdk.callioper   /googlecloudsdk.command_lib.netapp.storage_poolsr   r
   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   r   DefaultUniverseOnlyReleaseTracksrG   rh   UpdateCommandr   rI   rm   rH   rr   rb   r   r   <module>r~      s    + V ( W < #E D%%(()sT s * sl D%%**+3 3 ,3 D%%++,4* 4 -4r   