
    V                     t    d Z ddlmZ ddlmZ ddlmZ ej                   G d dej                               Z	y)z@Command to update a universe descriptor data entry in the cache.    )base)log)universe_descriptorc                   &    e Zd ZdZed        Zd Zy)Updatez-Update universe descriptor data in the cache.c                 *    | j                  dd       y)zAdds args for this command.universe_domainzBUniverse domain of the universe descriptor to update in the cache.)helpN)add_argument)parsers    1lib/surface/config/universe_descriptors/update.pyArgszUpdate.Args   s     P      c                 j   ~ t        j                         }	 |j                  |j                  d       |j	                  |j                         t
        j                  j                  d|j                  z         y# t         j                  $ r# t        j                  d|j                         Y yw xY w)zRun the update command.F)fetch_if_not_cachedz6Universe descriptor with universe domain [%s] updated.z<Universe descriptor with universe domain [%s] is not cached.N)
r   UniverseDescriptorGetr	   "UpdateDescriptorFromUniverseDomainr   statusPrintUniverseDescriptorErrorerror)selfargsuniverse_descriptor_objs      r   Runz
Update.Run$   s    1DDF!!


E "  @@


 
jj
B  ! 66 	ii
H


s   A< <3B21B2N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r   r      s    5 r   r   N)
r    googlecloudsdk.callioper   googlecloudsdk.corer   'googlecloudsdk.core.universe_descriptorr   UniverseCompatibleCommandr   r"   r   r   <module>r(      s9    G ( # G !T\\ ! !r   