| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/google-cloud-sdk/lib/surface/netapp/volumes/__pycache__/ |
Upload File : |
�
��L � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddl
mZ ddlmZ
ddlmZ dd lmZ dd
lmZ e j e j j � � G d� de j � � � � Z e j e j j � � G d
� de� � � � Z e j e j j � � G d� de� � � � ZdS )z;Reverts a Cloud NetApp Volume back to a specified Snapshot.� )�absolute_import)�division)�unicode_literals)�client)�base)�flags)�concept_parsers)�log)�
console_ioc �P � e Zd ZdZej j Zddd�Ze d� � � Z
d� ZdS )�Revert�:Revert a Cloud NetApp Volume back to a specified Snapshot.zU Revert a Cloud NetApp Volume back to a specified source Snapshot
z� The following command reverts a Volume named NAME in the given location and snapshot
$ {command} NAME --location=us-central1 --snapshot="snapshot1"
)�DESCRIPTION�EXAMPLESc �� � t j t j d� � g� � � | � � t j | � � t j | � � d S )NzThe Volume to revert.)r �
ConceptParserr �GetVolumePresentationSpec�AddToParser�
volumes_flags�AddVolumeRevertSnapshotArg�AddResourceAsyncFlag)�parsers �$lib/surface/netapp/volumes/revert.py�ArgszRevert.Args/ sa � ��!�5�#B��$!� $!� #"� #� #�#.�;�v�#6�#6�#6��,�V�4�4�4� ��v�&�&�&�&�&� c �
� |j j � � � }t j | j �� � }d� |� � � |j � � }t j
|�� � sdS |� ||j |j � � }|j r^d� | �
� � j � � }t j � d� |� � � � |S )zRun the revert command.)�
release_trackzDYou are about to revert Volume {} back to Snapshot {}.
Are you sure?)�messageNzgcloud {} netapp volumes listzJCheck the status of the volume being reverted by listing all volumes:
$ {})�CONCEPTS�volume�Parse�volumes_client�
VolumesClient�_RELEASE_TRACK�format�RelativeName�snapshotr �PromptContinue�RevertVolume�async_�ReleaseTrack�prefixr
�status�Print)�self�args�
volume_refr �revert_warning�result�commands r �Runz
Revert.Run6 s� � ���%�+�+�-�-�J�
�
)��8K�
L�
L�
L�F� ���z�6�6�8�8�$�-�H�H� � �$�^�<�<�<� �
�T�
�
�
��T�]�D�K�
H�
H�F��{� �/�6�6�
�
�
�
�
�
$�� �g�
�j����"�F�7�O�O�� � � �Mr N)�__name__�
__module__�__qualname__�__doc__r r+ �GAr$ �
detailed_help�staticmethodr r5 � r r r
r
se � � � � � �B�B��$�'�.��� � �-� �'� '� �<�'�� � � � r r
c �* � e Zd ZdZej j ZdS )�
RevertBetar N)r6 r7 r8 r9 r r+ �BETAr$ r= r r r? r? L s � � � � � �B�B��$�)�.�.�.r r? c �* � e Zd ZdZej j ZdS )�RevertAlphar N)r6 r7 r8 r9 r r+ �ALPHAr$ r= r r rB rB S s � � � � � �B�B��$�*�.�.�.r rB N)r9 �
__future__r r r �%googlecloudsdk.api_lib.netapp.volumesr r"