
    VhPx                         d Z ddlmZmZmZ eZdZdZdZ	ddl
mZ ddlmZ ddlmZ  ej                  d	      Zd
Z G d de      ZddZd Zd Zd Zedk(  r e        yy)z: Ansible module for managing Filesystem Snapshots on Unity    )absolute_importdivisionprint_functiona  
---
module: filesystem_snapshot
short_description: Manage filesystem snapshot on the Unity storage system
description:
- Managing Filesystem Snapshot on the Unity storage system includes
  create filesystem snapshot, get filesystem snapshot, modify filesystem
  snapshot and delete filesystem snapshot.
version_added: '1.1.0'
extends_documentation_fragment:
  - dellemc.unity.unity
author:
- Rajshree Khare (@kharer5) <ansible.team@dell.com>
options:
  snapshot_name:
    description:
    - The name of the filesystem snapshot.
    - Mandatory parameter for creating a filesystem snapshot.
    - For all other operations either I(snapshot_name) or I(snapshot_id)
      is required.
    type: str
  snapshot_id:
    description:
    - During creation snapshot_id is auto generated.
    - For all other operations either I(snapshot_id) or I(snapshot_name)
      is required.
    type: str
  filesystem_name:
    description:
    - The name of the Filesystem for which snapshot is created.
    - For creation of filesystem snapshot either I(filesystem_name) or
      I(filesystem_id) is required.
    - Not required for other operations.
    type: str
  filesystem_id:
    description:
    - The ID of the Filesystem for which snapshot is created.
    - For creation of filesystem snapshot either I(filesystem_id) or
      I(filesystem_name) is required.
    - Not required for other operations.
    type: str
  nas_server_name:
    description:
    - The name of the NAS server in which the Filesystem is created.
    - For creation of filesystem snapshot either I(nas_server_name) or
      I(nas_server_id) is required.
    - Not required for other operations.
    type: str
  nas_server_id:
    description:
    - The ID of the NAS server in which the Filesystem is created.
    - For creation of filesystem snapshot either I(filesystem_id) or
      I(filesystem_name) is required.
    - Not required for other operations.
    type: str
  auto_delete:
    description:
    - This option specifies whether or not the filesystem snapshot will be
      automatically deleted.
    - If set to C(true), the filesystem snapshot will expire based on the pool
      auto deletion policy.
    - If set to C(false), the filesystem snapshot will not be auto deleted
      based on the pool auto deletion policy.
    - Option I(auto_delete) can not be set to C(true), if I(expiry_time) is specified.
    - If during creation neither I(auto_delete) nor I(expiry_time) is mentioned
      then the filesystem snapshot will be created keeping I(auto_delete) as
      C(true).
    - Once the I(expiry_time) is set, then the filesystem snapshot cannot be
      assigned to the auto delete policy.
    type: bool
  expiry_time:
    description:
    - This option is for specifying the date and time after which the
      filesystem snapshot will expire.
    - The time is to be mentioned in UTC timezone.
    - The format is "MM/DD/YYYY HH:MM". Year must be in 4 digits.
    type: str
  description:
    description:
    - The additional information about the filesystem snapshot can be
      provided using this option.
    - The description can be removed by passing an empty string.
    type: str
  fs_access_type:
    description:
    - Access type of the filesystem snapshot.
    - Required only during creation of filesystem snapshot.
    - If not given, snapshot's access type will be C(Checkpoint).
    type: str
    choices: ['Checkpoint' , 'Protocol']
  state:
    description:
    - The state option is used to mention the existence of the filesystem
      snapshot.
    type: str
    required: true
    choices: ['absent', 'present']
notes:
  - Filesystem snapshot cannot be deleted, if it has nfs or smb share.
  - The I(check_mode) is not supported.
a
  
- name: Create Filesystem Snapshot
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap"
    filesystem_name: "ansible_test_FS"
    nas_server_name: "lglad069"
    description: "Created using playbook"
    auto_delete: true
    fs_access_type: "Protocol"
    state: "present"

- name: Create Filesystem Snapshot with expiry time
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap_1"
    filesystem_name: "ansible_test_FS_1"
    nas_server_name: "lglad069"
    description: "Created using playbook"
    expiry_time: "04/15/2021 2:30"
    fs_access_type: "Protocol"
    state: "present"

- name: Get Filesystem Snapshot Details using Name
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap"
    state: "present"

- name: Get Filesystem Snapshot Details using ID
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_id: "10008000403"
    state: "present"

- name: Update Filesystem Snapshot attributes
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap"
    description: "Description updated"
    auto_delete: false
    expiry_time: "04/15/2021 5:30"
    state: "present"

- name: Update Filesystem Snapshot attributes using ID
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_id: "10008000403"
    expiry_time: "04/18/2021 8:30"
    state: "present"

- name: Delete Filesystem Snapshot using Name
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_name: "ansible_test_FS_snap"
    state: "absent"

- name: Delete Filesystem Snapshot using ID
  dellemc.unity.filesystem_snapshot:
    unispherehost: "{{unispherehost}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    snapshot_id: "10008000403"
    state: "absent"
a  
changed:
    description: Whether or not the resource has changed.
    returned: always
    type: bool
    sample: true

filesystem_snapshot_details:
    description: Details of the filesystem snapshot.
    returned: When filesystem snapshot exists
    type: dict
    contains:
        access_type:
            description: Access type of filesystem snapshot.
            type: str
        attached_wwn:
            description: Attached WWN details.
            type: str
        creation_time:
            description: Creation time of filesystem snapshot.
            type: str
        creator_schedule:
            description: Creator schedule of filesystem snapshot.
            type: str
        creator_type:
            description: Creator type for filesystem snapshot.
            type: str
        creator_user:
            description: Creator user for filesystem snapshot.
            type: str
        description:
            description: Description of the filesystem snapshot.
            type: str
        expiration_time:
            description: Date and time after which the filesystem snapshot
                         will expire.
            type: str
        is_auto_delete:
            description: Is the filesystem snapshot is auto deleted or not.
            type: bool
        id:
            description: Unique identifier of the filesystem snapshot
                         instance.
            type: str
        name:
            description: The name of the filesystem snapshot.
            type: str
        size:
            description: Size of the filesystem snapshot.
            type: int
        filesystem_name:
            description: Name of the filesystem for which the snapshot exists.
            type: str
        filesystem_id:
            description: Id of the filesystem for which the snapshot exists.
            type: str
        nas_server_name:
            description: Name of the NAS server on which filesystem exists.
            type: str
        nas_server_id:
            description: Id of the NAS server on which filesystem exists.
            type: str
    sample: {
        "access_type": "FilesystemSnapAccessTypeEnum.CHECKPOINT",
        "attached_wwn": null,
        "creation_time": "2022-10-21 04:42:53.951000+00:00",
        "creator_schedule": null,
        "creator_type": "SnapCreatorTypeEnum.USER_CUSTOM",
        "creator_user": {
            "id": "user_admin"
        },
        "description": "Created using playbook",
        "existed": true,
        "expiration_time": null,
        "filesystem_id": "fs_137",
        "filesystem_name": "test",
        "hash": 8739894572587,
        "host_access": null,
        "id": "171798721695",
        "io_limit_policy": null,
        "is_auto_delete": true,
        "is_modifiable": false,
        "is_modified": false,
        "is_read_only": true,
        "is_system_snap": false,
        "last_writable_time": null,
        "lun": null,
        "name": "test_FS_snap_1",
        "nas_server_id": "nas_1",
        "nas_server_name": "lglad072",
        "parent_snap": null,
        "size": 107374182400,
        "snap_group": null,
        "state": "SnapStateEnum.READY"
    }

)AnsibleModule)utils)datetimefilesystem_snapshotzAnsible/1.7.1c                   j    e Zd ZdZd Zd Z	 	 ddZd Z	 	 ddZd Z	d	 Z
dd
ZddZddZd Zd Zy)FilesystemSnapshotz)Class with Filesystem Snapshot operationsc                    t        j                         | _        | j                  j                  t	                      ddgddgddgg}ddgg}t        | j                  d||      | _        t        j                  | j                         di d	| _        t        j                  | j                  j                  t              | _        t         j                  j                  | j                        | _        t         j#                  d
       y)z. Define all parameters required by this modulesnapshot_namesnapshot_idfilesystem_namefilesystem_idnas_server_namenas_server_idF)argument_specsupports_check_modemutually_exclusiverequired_one_of)changedfilesystem_snapshot_detailsz+Connection established with the Unity ArrayN)r   $get_unity_management_host_parametersmodule_paramsupdateget_snapshot_parametersr   moduleensure_required_libsresultget_unity_unisphere_connectionparamsapplication_type
unity_connsnap	UnitySnapsnap_objLOGinfo)selfr   r   s      u/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/dellemc/unity/plugins/modules/filesystem_snapshot.py__init__zFilesystemSnapshot.__init__9  s     #GGI!!"9";<.>0/B0/BD ,];<#$2D2D8=7I4CE 	""4;;/ #(68:  >>KK 02

,,T__=>?    c                     	 t        j                  |d       y# t        $ r9 d|z  }t        j	                  |       | j
                  j                  |       Y yw xY w)z#Validates the specified expiry_time%m/%d/%Y %H:%Mz0expiry_time: %s, not in MM/DD/YYYY HH:MM format.msgN)r   strptime
ValueErrorr'   errorr   	fail_json)r)   expiry_time	error_msgs      r*   validate_expiry_timez'FilesystemSnapshot.validate_expiry_timeU  sU    	1k+;< 	1K$%IIIi KK!!i!0		1s    ?AANc                    t               }|rB||j                  k7  r3d}t        j                  |       | j                  j                  |       |r,|j                  r ||r| j                  j                  d       |>|j                  rd}| j                  j                  |       ||j                  k7  r||d<   |||j                  k7  r||d<   t        ||      r||d<   t        j                  d|       |S )	z0Determines whether to update the snapshot or notz+Modification of access type is not allowed.r/   z6expiry_time can be assigned when auto delete is False.zrexpiry_time for filesystem snapshot is set. Once it is set then snapshot cannot be assigned to auto_delete policy.is_auto_deletedescriptionr5   z!Snapshot modification details: %s)dictaccess_typer'   r3   r   r4   r9   expiration_timer:   to_update_expiry_timer(   )	r)   fs_snapshotr:   auto_delr5   fs_access_typesnap_modify_dicterror_messager6   s	            r*   	to_updatezFilesystemSnapshot.to_update_  s     6n0G0GGIMIIm$KK!!m!4 ;55%KK!! '?! @**B	 %%)%4;5555= !12"{k6M6M'M.9]+ k:.9]+46FGr,   c           	      6   	 d }d|v r(|d   r#t        |d   | j                  j                        }|r!|dk  r| j                  j	                  d       d|v r|d   |d   }nd }d|v r|d   st        |d         dk(  r|d   }nd }|j                  |||       |j                          y # t        $ rd}d|j                  d	|j                  d
t        |      d}t        j                  |       | j                  j	                  |       Y d }~y d }~ww xY w)Nr5   r   4expiry_time should be after the current system time.r/   r9   r:   )retentionDurationisAutoDeleter:   z,Failed to modify filesystem snapshot [name: z , id: ] with error .)convert_timestamp_to_secr#   system_timer   r4   lenmodifyr   	Exceptionnameidstrr'   r3   )r)   r?   rB   durationauto_deleter:   er6   s           r*   update_filesystem_snapshotz-FilesystemSnapshot.update_filesystem_snapshot  s9   	1H 00(73$]3OO//1 HM%% +F% G#33()9:F./?@" 00)-8 0 ?@AE.}=",7+6  8   	1 '++[^^SVEI IIi KK!!i!00	1s   B(B+ +	D4ADDc           	         	 d }|rAt        || j                  j                        }|dk  r| j                  j	                  d       | j
                  j                  | j                  j                  ||||||      }|S # t        $ rL}	d|dt        |	      }
t        j                  |
       | j                  j	                  |
       Y d }	~	y d }	~	ww xY w)Nr   rF   r/   )clistorage_resourcerP   r:   r9   retention_durationrA   z%Failed to create filesystem snapshot  with error )rK   r#   rL   r   r4   r&   create_clirO   rR   r'   r3   )r)   	snap_name
storage_idr:   r@   r5   rA   rS   r?   rU   r6   s              r*   create_filesystem_snapshotz-FilesystemSnapshot.create_filesystem_snapshot  s    	1H3!<!<>q=KK)) /J) K --..OO((:K'H-	 / /K
  	1/8#a&BIIIi KK!!i!00		1s   A<A? ?	CACCc                    	 | j                   j                  |      xs | j                   j                  |      }t        |      dkD  r t        j                  dt        |             y	 y# t        $ rI}dt        |      z  }t        j                  |       | j                  j                  |       Y d }~yd }~ww xY w)N)r$   r   zSnapshot has %s nfs/smb share/sTz?Failed to get nfs/smb share from filesystem snapshot. error: %sr/   F)r#   get_nfs_shareget_cifs_sharerM   r'   r(   rO   rR   r3   r   r4   )r)   fs_snapobjrU   r0   s        r*   is_snap_has_sharez$FilesystemSnapshot.is_snap_has_share  s    
	+////W/= =..G.< 3x!|:CHE    	+ #A'CIIcNKK!!c!**	+s   A'A, ,	B>5?B99B>c           	         	 | j                  |      r3d}t        j                  |       | j                  j	                  |       |j                          y # t        $ rd}d|j                  d|j                  dt        |      d}t        j                  |       | j                  j	                  |       Y d }~y d }~ww xY w)NzBFilesystem snapshot cannot be deleted because it has nfs/smb sharer/   z,Failed to delete filesystem snapshot [name: z, id: rI   rJ   )
rf   r'   r3   r   r4   deleterO   rP   rQ   rR   )r)   r?   r0   rU   r6   s        r*   delete_fs_snapshotz%FilesystemSnapshot.delete_fs_snapshot  s    	1%%k2&		#%%#%.  	1 '++[^^SVEI IIi KK!!i!00	1s   AA 	C AB??Cc                    |r|n|}d}	 | j                   j                  ||      }|r$|j                  rt        j	                  d|       |S d }|S # t
        j                  $ r}|j                  dk(  r,d|j                  z  }| j                  j                  |       nF||t        |      fz  }t        j                  |       | j                  j                  |       Y d }~y Y d }~y d }~wt
        j                  $ r/}||t        |      fz  }t        j                  |       Y d }~y d }~wt        $ rK}||t        |      fz  }t        j                  |       | j                  j                  |       Y d }~y d }~ww xY w)Nz>Failed to get details of filesystem snapshot %s with error %s.)rP   _idz3Successfully got the filesystem snapshot object %s.i  z#Incorrect username or password , %sr/   )r#   get_snapexistedr'   r(   r   	HttpErrorhttp_statusmessager   r4   rR   r3   UnityResourceNotFoundErrorrO   )	r)   rP   rQ   r?   r0   fs_snap_objrU   cred_errerr_msgs	            r*   get_fs_snapshot_objz&FilesystemSnapshot.get_fs_snapshot_obj  sT   bDN	///22"2EK{22  +-  # 	3}}#AAIIM%%(%3c!f 55		'"%%'%22	 4 // 	[#a&11GIIg 	/[#a&11GIIgKK!!g!..	/s8   AA A F$A<C**F %D**F6AE<<Fc                    |r|n|}	 d }|rx|s3d}t         j                  |       | j                  j                  |       | j                  j                  ||      }|r$|j                  rt         j                  d|       |S |rd|r| j                  j                  ||      }n| j                  j                  |      }|r%|j                  rt         j                  d|       |S y y y # t        $ rM}d|dt        |      d	}t         j                  |       | j                  j                  |       Y d }~y d }~ww xY w)
Nz-NAS Server is required to get the FileSystem.r/   )rP   
nas_serverz*Successfully got the filesystem object %s.)rQ   rw   rQ   zFailed to get filesystem r[   rJ   )
r'   r3   r   r4   r#   get_filesystemrm   r(   rO   rR   )	r)   rw   rP   rQ   
filesystemobj_fsrt   rU   r6   s	            r*   get_filesystem_objz%FilesystemSnapshot.get_filesystem_obj  s+   R4
	1F!MGIIg&KK))g)677TCM 8 OfnnHHI#%!M!__'2*E  "__;;r;BFfnnHHI#%!M -6   	1%s1v/IIIi KK!!i!00		1s    A;C+ A#C+ +	E4AD<<Ec                    |r|n|}d|z  }	 | j                   j                  ||      }|r|j                  s|r$|j                  rt        j	                  d|       |S t        j                  |       | j                  j                  |       y # t        $ rM}d|dt        |      d}t        j                  |       | j                  j                  |       Y d }~y d }~ww xY w)NzFailed to get NAS server %s.)rk   rP   z*Successfully got the NAS server object %s.r/   zFailed to get NAS server r[   rJ   )
r#   get_nas_serverrm   r'   r(   r3   r   r4   rO   rR   )r)   rP   rQ   rw   r6   obj_nasrU   s          r*   get_nas_server_objz%FilesystemSnapshot.get_nas_server_obj  s    R4
3j@		1oo44$4GGbW__E "		)$%%)%4 	1%s1v/IIIi KK!!i!00		1s   AB 1B 	C&AC!!C&c                    |j                         }|d= |j                  j                  |d<   |j                  j                  j                  |d<   | j
                  j                  |j                  j                  j                        }|rD|j                  r8|j                  d   j                  |d<   |j                  d   j                  |d<   |S )zP Add name and id of storage resource to filesystem snapshot
            details rY   r   r   rx   r   r   r   )	_get_propertiesrY   rP   rz   rQ   r#   ry   rm   rw   )r)   r?   snapshot_dictr{   s       r*   create_fs_snapshot_details_dictz2FilesystemSnapshot.create_fs_snapshot_details_dict*  s     $335,-+6+G+G+L+L'()4)E)E)P)P)S)So&Nk::EEHHNI 	fnn/5/@/@/C/H/HM+,-3->->q-A-D-DM/*r,   c           	      2   | j                   j                  d   }| j                   j                  d   }| j                   j                  d   }| j                   j                  d   }| j                   j                  d   }| j                   j                  d   }| j                   j                  d   }| j                   j                  d   }| j                   j                  d	   }	| j                   j                  d
   }
| j                   j                  d   }d}d}d}t        j                  d       | j	                  ||      }dt        |      z  }t        j                  |       |D|dk(  s|j                         r| j                   j                  d       | j                  |      }nE|C|dk(  s|j                         r| j                   j                  d       | j                  |      }|[|dk(  s|j                         r| j                   j                  d       | j                  ||      }|j                  j                  }n^|\|dk(  s|j                         r| j                   j                  d       | j                  |      }|d   j                  j                  }|rs|rq|j                  j                  k7  rX| j                   j                  d|j                  d|j                  j                  d|j                  j                  d       |1|dk(  s|j                         r| j                   j                  d       |r| j                  |       |r5|r3d }t        j                  |       | j                   j                  |       |
p|
dk(  s|
j                         r| j                   j                  d!       |
d"k(  rt        j                  j                   }
n|
d#k(  rt        j                  j"                  }
t%               }|d$k(  r|r| j'                  ||	|||
%      }|s|d$k(  rt        j                  d&       |r| j                   j                  d'       |dk(  s|j                         r| j                   j                  d(       |s| j                   j                  d)       | j)                  ||	|||
      }d*}|r0|d$k(  r+|r)t        j                  d+       | j+                  ||       d*}|d,k(  r|r| j-                  |      }d*}|r/|j/                          | j1                  |      | j2                  d-<   ni | j2                  d-<   || j2                  d.<    | j                   j4                  d/i | j2                   y)0zm
        Perform different actions on snapshot module based on parameters
        chosen in playbook
        r   r   r   r   r   r   rT   r5   r:   rA   stateNFz$Getting Filesystem Snapshot details.)rP   rQ   z Filesystem Snapshot details: %s. z;Invalid nas_server_name given, Please provide a valid name.r/   )rP   z7Invalid nas_server_id given, Please provide a valid ID.rx   z;Invalid filesystem_name given, Please provide a valid name.)rw   rP   z7Invalid filesystem_id given, Please provide a valid ID.r   z	Snapshot z is of zA storage resource. Cannot create new snapshot with same name for z storage resource.z:Please provide valid expiry_time, empty expiry_time given.z4Cannot set expiry_time if auto_delete given as True.z@Please provide valid fs_access_type, empty fs_access_type given.
CheckpointProtocolpresent)r:   r@   r5   rA   z!Creating the filesystem snapshot.zWCreation of Filesystem Snapshot is allowed using snapshot_name only, snapshot_id given.z]snapshot_name is required for creation of the filesystem snapshot, empty snapshot_name given.z?filesystem_name or filesystem_id required to create a snapshot.Tz!Updating the Filesystem Snapshot.absentr   r    )r   r!   r'   r(   ru   rR   isspacer4   r   r|   rY   rQ   rP   r7   r   FilesystemSnapAccessTypeEnum
CHECKPOINTPROTOCOLr;   rD   r`   rV   ri   r   r   r   	exit_json)r)   r   r   r   r   r   r   rT   r5   r:   rA   r   nas_server_resourcefilesystem_resourcer   r?   r0   	fs_res_idr6   fs_snap_modify_dicts                       r*   perform_module_operationz+FilesystemSnapshot.perform_module_operation<  s   
 **?;kk((7++,,->?**?;++,,->?**?;kk((7kk((7kk((7++,<=""7+""78..M2= / ? 13{3CC &"$(?(?(A%% +J% K"&###9  &"m&;&;&=%% +H% I"&"9"9]"9"K &"$(?(?(A%% +J% K"&##/B)8 $ :   ,<<??I&"m&;&;&=%% +H% I"&##}#5  +A.??BBI .)),,KK!! #'')E)E)J)J*;;@@B " C ""k&9&9&;KK!! 'B! C%%k2 ;NIHHYKK!!i!0 %"$(>(>(@%% +B% C -!&!C!C!N!N:-!&!C!C!L!L #fI+"&;K$/[*8  :   u	1HH89%% +@% A "m&;&;&=%% +4% 5 '%% +L% M 99 K G 5I-2EHH89++K9LMG H11+>KG  44[A KK56 :<DKK56!(I,,r,   )NNNN)NN)NNN)__name__
__module____qualname____doc__r+   r7   rD   rV   r`   rf   ri   ru   r|   r   r   r   r   r,   r*   r   r   6  sX    3@81 AE37 B 1F ?CDH101$/>1>1$$S-r,   r   Nc                 X    |sy| j                   yt        || j                         dk7  ryy)z+ Check whether to update expiry_time or notFTr   )r=   rK   )r?   r5   s     r*   r>   r>     s5    ""*[-H-HIr,   c                     |j                  d      }t        j                  |d      }t        j                  | d      }t        ||z
  j	                               S )z'Converts the time difference to secondsr.   )strftimer   r1   inttotal_seconds)r5   	snap_timesnap_time_strsnap_timestampexpiry_timestamps        r*   rK   rK     sT    &&'78M&&}6FGN((6FG >1@@BCCr,   c                  ,   t        t        dd      t        dd      t        dd      t        dd      t        dd      t        dd      t        dd      t        dd      t        dd      t        ddddg      t        ddd	d
g            S )z^This method provide parameter required for the ansible filesystem
    snapshot module on UnityFrR   )requiredtypeboolr   r   )r   r   choicesTr   r   )r   r   r   r   r   r   rT   r5   r:   rA   r   )r;   r   r,   r*   r   r     s     E6%e4e%8E6e%8E6%f5%e4%e4U%1:$>@Duy(6KL r,   c                  8    t               } | j                          y)zl Create Unity Filesystem Snapshot object and perform actions on it
        based on user input from playbookN)r   r   )re   s    r*   mainr     s     
C  "r,   __main__)N)r   
__future__r   r   r   r   __metaclass__DOCUMENTATIONEXAMPLESRETURNansible.module_utils.basicr   Cansible_collections.dellemc.unity.plugins.module_utils.storage.dellr   r   
get_loggerr'   r"   objectr   r>   rK   r   r   r   r   r,   r*   <module>r      s    A B BdLVp`
D 5 e,-" Y- Y-x	D&# zF r,   