
    	                     :   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	d
dZ ej                  ej                  j                  ej                  j                  ej                  j                          G d dej"                               Zee_        y)z:Command for sending a diagnostic interrupt to an instance.    )absolute_import)division)unicode_literals)base_classes)base)flags:Send a diagnostic interrupt to a virtual machine instance.a(            *{command}* is used to send a diagnostic interrupt to a running
          instance, which triggers special interrupt handling logic inside VM.

        For instances with Intel or AMD processors, the guest OS on the instance
        will receive a non-maskable interrupt (NMI).
        z        To send a diagnostic interrupt to an instance named ``test-instance'', run:

          $ {command} test-instance
        )briefDESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)SendDiagnosticInterruptr	   c                 B    t         j                  j                  |        y )N)r   INSTANCE_ARGAddArgument)parsers    :lib/surface/compute/instances/send_diagnostic_interrupt.pyArgszSendDiagnosticInterrupt.Args2   s    	""6*    c                    t        j                  | j                               }|j                  }t        j
                  j                  ||j                  t	        j                  |            } |j                  j                  di |j                         }|j                  |j                  j                  d|fg      S )N)scope_listerr    )r   ComputeApiHolderReleaseTrackclientr   r   ResolveAsResource	resourcesGetInstanceZoneScopeListermessages.ComputeInstancesSendDiagnosticInterruptRequestAsDictMakeRequestsapitools_client	instances)selfargsholderr   instance_refrequests         r   RunzSendDiagnosticInterrupt.Run6   s    **4+<+<+>?F]]F%%7755f= 8 ?L
 MfooLL !



!G !7!7!A!A!:G!E  F G Gr   N)__name__
__module____qualname____doc__staticmethodr   r*   r   r   r   r   r   -   s      C+ +Gr   r   N)r.   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   ,googlecloudsdk.command_lib.compute.instancesr   DETAILED_HELPReleaseTracksr   ALPHABETAGASilentCommandr   detailed_helpr   r   r   <module>r;      s    A &  ' 7 ( > 	E		( D%%++T->->-C-C%%((*Gd00 G*G. )6  %r   