
    '                        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Updates a Cloud NetApp Volume.    )absolute_import)division)unicode_literals)client)base)flags)labels_util)logc                 ,    [         R                  " XS9  g )N)release_track)volumes_flagsAddVolumeUpdateArgs)parserr   s     $lib/surface/netapp/volumes/update.py_CommonArgsr      s    ##FH    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 Volume.zN          Update a Cloud NetApp Volume and its specified parameters
          a            The following command updates a Volume named NAME and its specified parameters

              $ {command} NAME --location=us-central1 --capacity=4096 --description="new description" --enable-kerberos=false --storage-pool=sp3 --unix-permissions=0777
          )DESCRIPTIONEXAMPLESc                 8    [        U [        R                  5        g N)r   r   _RELEASE_TRACKr   s    r   ArgsUpdate.Args1   s    --.r   c                 H   UR                   R                  R                  5       n[        R                  " U R
                  5      n[        R                  R                  U5      nUR                  U5      nUR                  5       (       aI  UR                  UR                  R                  R                  UR                  5      R!                  5       nOSn/ nUR"                  (       aD  UR"                   H4  n[$        R&                  " XR                  5      n	UR)                  U	5        M6     UR*                  (       a  UR*                  S-	  OSn
/ nUR,                  (       aD  UR,                   H4  n[$        R.                  " XR                  5      nUR)                  U5        M6     / nUR0                  (       aD  UR0                   H4  n[$        R2                  " XR                  5      nUR)                  U5        M6     0 nSUR4                  4SUR6                  4SUR8                  4SUR:                  44 H  u  nnU(       d  M  UUU'   M     U(       d  SnUR<                  (       a,  [$        R>                  " UR<                  UR                  5      nOSnU R
                  [@        RB                  RD                  [@        RB                  RF                  4;   a  URH                  nURJ                  nOSnSnURL                  nURN                  nURP                  nURS                  UURT                  UURV                  UURX                  URZ                  U
UR\                  UUUR^                  UR`                  UURb                  URd                  UUUURf                  UUUS9n/ nURi                  S5      (       a  UR)                  S	5        URi                  S
5      (       a  UR)                  S5        URi                  S5      (       a  UR)                  S5        URi                  S5      (       a  UR)                  S5        URi                  S5      (       a  UR)                  S5        URi                  S5      (       a  UR)                  S5        URi                  S5      (       a  UR)                  S5        URi                  S5      (       dB  URi                  S5      (       d,  URi                  S5      (       d  URi                  S5      (       a  UR)                  S5        URi                  S5      (       a  UR)                  S5        URi                  S5      (       a  UR)                  S5        URi                  S5      (       a  UR)                  S5        URi                  S 5      (       a  UR)                  S!5        URi                  S"5      (       a  UR)                  S#5        URi                  S$5      (       a  UR)                  S%5        URi                  S&5      (       a  UR)                  S'5        U R
                  [@        RB                  RD                  :X  d(  U R
                  [@        RB                  RF                  :X  a  URi                  S(5      (       a  UR)                  S#5        Ubi  URk                  S)5      b  UR)                  S*5        URk                  S+5      b  UR)                  S,5        URk                  S-5      b  UR)                  S.5        URi                  S/5      (       a  URf                  Rk                  S05      b  UR)                  S15        URf                  Rk                  S25      b  UR)                  S35        U R
                  [@        RB                  RD                  :X  d(  U R
                  [@        RB                  Rl                  :X  a-  URf                  Rk                  S45      b  UR)                  S55        URi                  S65      (       a  UR)                  S65        URi                  S75      (       d,  URi                  S85      (       d  URi                  S95      (       a  UR)                  S:5        URi                  S;5      (       aW  URL                  Rk                  S<5      b;  URL                  Rk                  S<5       H  nS=U;   d  M  UR)                  S>5        M     URi                  S?5      (       a  UR)                  S@5        SARo                  U5      nURq                  UUUURr                  5      nURr                  (       aW  SBRu                  U RC                  5       Rv                  5      n[x        Rz                  R}                  SCRu                  U5      5        U$ )Dz4Update a Cloud NetApp Volume in the current project.N   hourly_snapshotdaily_snapshotweekly_snapshotmonthly_snapshot)descriptionlabelsstorage_pool	protocols
share_nameexport_policycapacityunix_permissionssmb_settingssnapshot_policysnap_reservesnapshot_directorysecurity_styleenable_kerberossnapshotbackuprestricted_actionsbackup_configtiering_policycache_parametersthroughput_mibpsblock_devicesr+   capacityGibr'   storagePoolr)   	shareNamer*   exportPolicyr(   r,   unixPermissionsr-   smbSettingssnapshot_hourlysnapshot_dailysnapshot_weeklysnapshot_monthlysnapshotPolicyr/   snapReserver0   snapshotDirectoryr1   securityStyler2   kerberosEnabledsource_snapshotrestoreParametersr5   restrictedActionsr9   throughputMibpssource_backupzbackup-policieszbackupConfig.backupPolicieszbackup-vaultzbackupConfig.backupVaultzenable-scheduled-backupsz#backupConfig.scheduledBackupEnabledr7   ztier-actionztieringPolicy.tierActionzcooling-threshold-daysz"tieringPolicy.coolingThresholdDayszenable-hot-tier-bypass-modez&tieringPolicy.hotTierBypassModeEnabledr%   update_labelsremove_labelsclear_labelsr&   r8   zcache-configzcifs-change-notify-enabledz3cacheParameters.cacheConfig.cifsChangeNotifyEnabledr:   blockDevices,zgcloud {} netapp volumes listzFCheck the status of the updated volume by listing all volumes:
  $ {} )?CONCEPTSvolumeParsevolumes_clientVolumesClientr   r	   DiffFromUpdateArgs	GetVolumeMayHaveUpdatesApplymessagesVolumeLabelsValuer&   	GetOrNoner(   r   GetVolumeProtocolEnumFromArgappendr+   r-   GetVolumeSmbSettingsEnumFromArgr5   %GetVolumeRestrictedActionsEnumFromArgrA   rB   rC   rD   r1   !GetVolumeSecurityStyleEnumFromArgr   ReleaseTrackBETAGAr6   rN   r8   r:   r9   ParseUpdatedVolumeConfigr%   r'   r)   r*   r,   r/   r0   r2   rJ   r7   IsSpecifiedgetALPHAjoinUpdateVolumeasync_formatprefixr
   statusPrint) selfargs
volume_refr   labels_difforiginal_volumer&   r(   protocolprotocol_enumcapacity_in_gibr-   smb_settingsmb_setting_enumr5   restricted_actionrestricted_action_enumr.   namesnapshot_scheduler1   r6   rN   r8   r:   r9   rU   updated_fieldsconfigupdate_maskresultcommands                                    r   Run
Update.Run5   s   %%++-J))$*=*=>F""11$7K&&z2O !!##  !7!7!C!C!0!7!799B  fI~~nn(%BBoo
 	'	 %
 .2]]dmmr)OL**+(HH
 	,-	 +
 #66
??!?? 	
 	!!"89  7 O	D001	4../	D001	T223	$ 
	 1$  o$FF


vn nt0055t7H7H7K7KLL((m((mmm,,&&M,,,,$$&&??(( ..!'&&22%,,%%-#**))#/ - F4 N 
##M*''M*%%K(((N+$$K(*++-.''M**++)***+++,,,-''M*,--/0())O,)**-.)**/0,--/0*++-.t00555t00333			/	*	*12		"./;


 =
>^,8


 :
;78D


 E
F())				 	 	/	;89				 	 !9	:	FBC


!2!2!7!7
7  D$5$5$;$;;##$ABNFG&&M*))O,,N++H%+,,!!%%n5A))--n=& (61


C > ((N+((>*K  V[$++NF{{/66




$
$g 
jj&/ Mr    N)__name__
__module____qualname____firstlineno____doc__r   rg   ri   r   detailed_helpstaticmethodr   r   __static_attributes__r   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   r   r   r   s    r   r   UpdateBeta.Args   s    
112r   r   N)r   r   r   r   r   r   rg   rh   r   r   r   r   r   r   r   r   r      s(    %$$)).3 3r   r   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   r   r   r   s    r   r   UpdateAlpha.Args  s    223r   r   N)r   r   r   r   r   r   rg   rm   r   r   r   r   r   r   r   r   r      s(    %$$**.4 4r   r   N)r   
__future__r   r   r   %googlecloudsdk.api_lib.netapp.volumesr   rW   googlecloudsdk.callioper   )googlecloudsdk.command_lib.netapp.volumesr   r   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   r   DefaultUniverseOnlyReleaseTracksrg   ri   UpdateCommandr   rh   r   rm   r   r   r   r   <module>r      s    % &  ' J ( L < #I D%%(()OT O * Od D%%**+3 3 ,3 D%%++,4* 4 -4r   