
                            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 e	j$                   e	j&                  e	j(                  j*                         G d
 de	j,                                      Z e	j&                  e	j(                  j0                         G d de             Z e	j&                  e	j(                  j4                         G d de             Zy)6Reverse a Cloud NetApp Volume Replication's direction.    )absolute_import)division)unicode_literals)client)base)flags)concept_parsers)logc                   \    e Zd ZdZej
                  j                  ZdddZe	d        Z
d Zy)Reverser   z?          Reverse a Cloud NetApp Volume Replication.
          aV            The following command reverses a Replication named NAME using the required arguments:

              $ {command} NAME --location=us-central1 --volume=vol1

          To reverse a Replication named NAME asynchronously, run the following command:

              $ {command} NAME --location=us-central1 --volume=vol1 --async
          )DESCRIPTIONEXAMPLESc                     t        j                  t        j                  d      g      j	                  |        t        j                  | d       t        j                  |        y )Nz%The Replication to reverse direction.T)
reverse_op)r
   ConceptParserr	   GetReplicationPresentationSpecAddToParserreplications_flagsAddReplicationVolumeArgAddResourceAsyncFlag)parsers    2lib/surface/netapp/volumes/replications/reverse.pyArgszReverse.Args4   sP    !!007	
 k&..v$G	v&    c                    |j                   j                  j                         }t        j                  | j
                        }|j                  ||j                        }|j                  rWdj                  | j                         j                        }t        j                  j                  dj                  |             |S )zMReverse a Cloud NetApp Volume Replication's direction in the current project.z*gcloud {} netapp volumes replications listzQCheck the status of the reversed replication by listing all replications:
  $ {} )CONCEPTSreplicationParsereplications_clientReplicationsClient_RELEASE_TRACKReverseReplicationasync_formatReleaseTrackprefixr   statusPrint)selfargsreplication_refr   resultcommands         r   RunzReverse.Run@   s    mm//557O 33D4G4GHF&&&F{{<CC




$
$g 
jj$$*F7O Mr   N)__name__
__module____qualname____doc__r   r&   GAr"   detailed_helpstaticmethodr   r/    r   r   r   r      sB     ?$$''.	- 	' 	'r   r   c                   <    e Zd ZdZej
                  j                  Zy)ReverseBetar   N)r0   r1   r2   r3   r   r&   BETAr"   r7   r   r   r9   r9   R   s    >$$)).r   r9   c                   <    e Zd ZdZej
                  j                  Zy)ReverseAlphar   N)r0   r1   r2   r3   r   r&   ALPHAr"   r7   r   r   r<   r<   Y   s    >$$**.r   r<   N)r3   
__future__r   r   r   2googlecloudsdk.api_lib.netapp.volumes.replicationsr   r    googlecloudsdk.callioper   !googlecloudsdk.command_lib.netappr	   6googlecloudsdk.command_lib.netapp.volumes.replicationsr   (googlecloudsdk.command_lib.util.conceptsr
   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksr&   r4   Commandr   r:   r9   r=   r<   r7   r   r   <module>rH      s    = &  ' \ ( 3 ^ D # D%%(()/dll / * /d D%%**+*' * ,* D%%++,+; + -+r   