
    
                     b    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 Zd Z	d	 Z
d
 Zd Zy)zAFlags and helpers for the compute reservation sub block commands.    )absolute_import)division)unicode_literals)arg_parsers)basec                 l    | j                  ddt        dd       | j                  ddt        dd       y	)
2Adds flags to the parser for the describe command.--block-name
BLOCK_NAMET"The name of the reservation block.metavartyperequiredhelpz--sub-block-nameSUB_BLOCK_NAMEz&The name of the reservation sub block.Nadd_argumentstrparsers    Glib/googlecloudsdk/command_lib/compute/reservations/sub_blocks/flags.pyAddDescribeFlagsr      sH    /  1 	3  5    c                 8    | j                  ddt        dd       y)r	   r
   r   Tr   r   Nr   r   s    r   AddListFlagsr   )   s$    /  1r   c                  8    t        j                  dddidd      S )z$Gets the --disruption-schedule flag.z--disruption-schedule	IMMEDIATEz&All VMs will be disrupted immediately.z*The disruption schedule for the sub-block.Tchoicesr   r   r   Argument r   r   GetDisruptionScheduleFlagr$   3   s)    	
? 8
 r   c                  t    t        j                  dt        j                  t        t        d      ddd      S )zGets the --fault-reasons flag.z--fault-reasons)behaviordescription)specappendzThe reasons for the fault experienced with the sub-block. This flag can be repeated. Each instance should specify a "behavior" and an optional "description". The possible values for "behavior" are: PERFORMANCE, SWITCH_FAILURE, GPU_ERROR.T)r   actionr   r   )r   r"   r   ArgDictr   r#   r   r   GetFaultReasonsFlagr,   >   s;    	4 5
 
 r   c                  :    t        j                  dddddd      S )z"Gets the --failure-component flag.z--failure-componentz(The NVLink switch experienced the fault.z%Multiple hosts experienced the fault.)NVLINK_SWITCHMULTIPLE_FAULTY_HOSTSz)The component that experienced the fault.Tr   r!   r#   r   r   GetFailureComponentFlagr0   P   s)    	E#J 7
 r   N)__doc__
__future__r   r   r   googlecloudsdk.callioper   r   r   r   r$   r,   r0   r#   r   r   <module>r4      s3    H &  ' / (5 1$	r   