
    $                     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 create a universe descriptor data entry in the cache.    )base)log)universe_descriptorc                   &    e Zd ZdZed        Zd Zy)Createz,Create a new universe descriptor data entry.c                 *    | j                  dd       y)zAdds args for this command.universe_domainz?Universe domain of the universe descriptor to add to the cache.)helpN)add_argument)parsers    1lib/surface/config/universe_descriptors/create.pyArgszCreate.Args   s     N      c                 l   ~ t        j                         }	 |j                  |j                  d       t	        j
                  d|j                         y # t         j                  $ r Y nw xY w|j                  |j                         t        j                  j                  d|j                  z         y )NF)fetch_if_not_cachedz=Universe descriptor with universe domain [%s] already cached.z5Universe descriptor with universe domain [%s] cached.)
r   UniverseDescriptorGetr	   r   errorUniverseDescriptorError"UpdateDescriptorFromUniverseDomainstatusPrint)selfargsuniverse_descriptor_objs      r   Runz
Create.Run#   s    1DDF!!


E "  
ii
I


  66 
 >> JJ?


	s   A A+*A+N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r   r      s    4 r   r   N)
r    googlecloudsdk.callioper   googlecloudsdk.corer   'googlecloudsdk.core.universe_descriptorr   UniverseCompatibleCommandr   r"   r   r   <module>r(      s9     G ( # G !T\\ ! !r   