
                         &   d Z ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ej                   ej                  ej                  j                   ej                  j"                        ej$                   G d dej&                                             Zy	)
z"Updates a Cloud NetApp Host Group.    )client)base)flags)labels_util)logc                   0    e Zd ZdZdddZed        Zd Zy)Updatez!Update a Cloud NetApp Host Group.zS          Update a Cloud NetApp Host Group and its specified parameters.
          z          The following command updates a Host Group named NAME and its specified parameters:

              $ {command} NAME --location=us-central1 --description="new description" --hosts="host3,host4" --update-labels=key2=val2
          )DESCRIPTIONEXAMPLESc                 .    t        j                  |        y )N)host_groups_flagsAddHostGroupUpdateArgs)parsers    (lib/surface/netapp/host_groups/update.pyArgszUpdate.Args*   s    ,,V4    c                 l   |j                   j                  j                         }t        j                  | j                               }t        j                  j                  |      }|j                  |      }|j                         rI|j                  |j                  j                  j                  |j                        j!                         }nd}|j#                  ||j$                  |j&                  |      }g }|j)                  d      r|j+                  d       |j)                  d      r|j+                  d       |D|j)                  d      s"|j)                  d      s|j)                  d      r|j+                  d       d	j-                  |      }	|j/                  |||	|j0                        }
|j0                  rqd
j3                  | j                         j4                  |j7                         |j8                        }t:        j<                  j?                  dj3                  |             |
S )z8Update a Cloud NetApp Host Group in the current project.N)hostsdescriptionlabelsr   r   update_labelsremove_labelsclear_labelsr   ,z6gcloud {} netapp host-groups describe {} --location {}zDCheck the status of the updated host group by describing it:
  $ {} ) CONCEPTS
host_groupParsehost_groups_clientHostGroupsClientReleaseTrackr   DiffFromUpdateArgsGetHostGroupMayHaveUpdatesApplymessages	HostGroupLabelsValuer   	GetOrNoneParseUpdatedHostGroupConfigr   r   IsSpecifiedappendjoinUpdateHostGroupasync_formatprefixNamelocationsIdr   statusPrint)selfargshost_group_refr   labels_difforiginal_host_groupr   r   updated_fieldsupdate_maskresultcommands               r   Runz
Update.Run.   s   ]]--335N001B1B1DEF""11$7K --n= !!#  
//
#
#
/
/1D1K1K	  f33jj$$	 4 J N&M* G$)O,N+H%((>*K##
KF {{HOO




$
$





$
$g
 
jj&/ Mr   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r?    r   r   r	   r	      s1     *		- 5 51r   r	   N)rC   )googlecloudsdk.api_lib.netapp.host_groupsr   r   googlecloudsdk.callioper   -googlecloudsdk.command_lib.netapp.host_groupsr   r   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksr    ALPHABETAHiddenUpdateCommandr	   rF   r   r   <module>rR      s     ) R ( T < # D%%++T->->-C-CDCT C  E Cr   