
    U                     2   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 ddl	m
Z
 ddlmZ dd	lmZ dd
lmZ dddZ ej                   ej"                  j$                  ej"                  j&                         G d dej(                               Zee_        y)z5'Bare Metal Solution boot volumes "snapshot" command.    )absolute_import)division)unicode_literals)	BmsClient)base)flags)log)
properties)	resourceszK
          Create a snapshot of a Bare Metal Solution boot volume.
        aA  
          To create a snapshot of a boot volume named ``my-boot-volume'' in
          region ``us-central1'' with the name ``my-snapshot'' and description
          ``my-description'', run:

          $ {command} my-boot-volume --region=us-central1 --snapshot-name=my-snapshot
          --description=my-description
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Createz7Create a snapshot of a Bare Metal Solution boot volume.c                     t        j                  | d       | j                  ddd       | j                  ddd       y)	z Register flags for this command.T)
positionalz--snapshot-namez'Name to assign to the created snapshot.)helprequiredz--descriptionz,Textual description of the created snapshot.N)r   AddVolumeArgToParseradd_argument)parsers    #lib/surface/bms/volumes/snapshot.pyArgszCreate.Args2   sM     
v$7
)F!%  ' K!%  '    c                    |j                   j                  j                         }t               }t        j
                  j                  |j                  t        j                  j                  j                  j                  |j                  |j                  ddd      }|j                  ||j                         |j                        }t!        j"                  |j$                  d       |S )N)
projectsIdlocationsId	volumesIdz6baremetalsolution.projects.locations.volumes.snapshotsv2)params
collectionapi_version)resourcenamedescriptionsnapshot)CONCEPTSvolumeParser   r   REGISTRYsnapshot_namer
   VALUEScoreproject	GetOrFailregionCreateVolumeSnapshotRelativeNamer$   r	   CreatedResourcer#   )selfargsr'   clientsnapshot_refress         r   Runz
Create.Run=   s    ]]!!'')F[F%%++$++0088BB;;

 L , L 
%
%v+7+D+D+F262B2B & DC *-Jr   N)__name__
__module____qualname____doc__staticmethodr   r8    r   r   r   r   .   s    ?' 'r   r   N)r<   
__future__r   r   r   %googlecloudsdk.api_lib.bms.bms_clientr   googlecloudsdk.callioper   googlecloudsdk.command_lib.bmsr   googlecloudsdk.corer	   r
   r   DETAILED_HELPReleaseTracksReleaseTrackALPHAGACreateCommandr   detailed_helpr>   r   r   <module>rK      s    < &  ' ; ( 0 # * )
		" D%%++T->->-A-ABT  CD % r   