Debian Codegraph @

ansible_collections/dellemc/unity/docs/modules/filesystem_snapshot.rst

raw
1 .. _filesystem_snapshot_module:
2
3
4 filesystem_snapshot -- Manage filesystem snapshot on the Unity storage system
5 =============================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 Managing Filesystem Snapshot on the Unity storage system includes create filesystem snapshot, get filesystem snapshot, modify filesystem snapshot and delete filesystem snapshot.
16
17
18
19 Requirements
20 ------------
21 The below requirements are needed on the host that executes this module.
22
23 - A Dell Unity Storage device version 5.1 or later.
24 - Ansible-core 2.17 or later.
25 - Python 3.11, or 3.12.
26 - Storops Python SDK 1.2.12.
27
28
29
30 Parameters
31 ----------
32
33 snapshot_name (optional, str, None)
34 The name of the filesystem snapshot.
35
36 Mandatory parameter for creating a filesystem snapshot.
37
38 For all other operations either *snapshot_name* or *snapshot_id* is required.
39
40
41 snapshot_id (optional, str, None)
42 During creation snapshot_id is auto generated.
43
44 For all other operations either *snapshot_id* or *snapshot_name* is required.
45
46
47 filesystem_name (optional, str, None)
48 The name of the Filesystem for which snapshot is created.
49
50 For creation of filesystem snapshot either *filesystem_name* or *filesystem_id* is required.
51
52 Not required for other operations.
53
54
55 filesystem_id (optional, str, None)
56 The ID of the Filesystem for which snapshot is created.
57
58 For creation of filesystem snapshot either *filesystem_id* or *filesystem_name* is required.
59
60 Not required for other operations.
61
62
63 nas_server_name (optional, str, None)
64 The name of the NAS server in which the Filesystem is created.
65
66 For creation of filesystem snapshot either *nas_server_name* or *nas_server_id* is required.
67
68 Not required for other operations.
69
70
71 nas_server_id (optional, str, None)
72 The ID of the NAS server in which the Filesystem is created.
73
74 For creation of filesystem snapshot either *filesystem_id* or *filesystem_name* is required.
75
76 Not required for other operations.
77
78
79 auto_delete (optional, bool, None)
80 This option specifies whether or not the filesystem snapshot will be automatically deleted.
81
82 If set to ``true``, the filesystem snapshot will expire based on the pool auto deletion policy.
83
84 If set to ``false``, the filesystem snapshot will not be auto deleted based on the pool auto deletion policy.
85
86 Option *auto_delete* can not be set to ``true``, if *expiry_time* is specified.
87
88 If during creation neither *auto_delete* nor *expiry_time* is mentioned then the filesystem snapshot will be created keeping *auto_delete* as ``true``.
89
90 Once the *expiry_time* is set, then the filesystem snapshot cannot be assigned to the auto delete policy.
91
92
93 expiry_time (optional, str, None)
94 This option is for specifying the date and time after which the filesystem snapshot will expire.
95
96 The time is to be mentioned in UTC timezone.
97
98 The format is "MM/DD/YYYY HH:MM". Year must be in 4 digits.
99
100
101 description (optional, str, None)
102 The additional information about the filesystem snapshot can be provided using this option.
103
104 The description can be removed by passing an empty string.
105
106
107 fs_access_type (optional, str, None)
108 Access type of the filesystem snapshot.
109
110 Required only during creation of filesystem snapshot.
111
112 If not given, snapshot's access type will be ``Checkpoint``.
113
114
115 state (True, str, None)
116 The state option is used to mention the existence of the filesystem snapshot.
117
118
119 unispherehost (True, str, None)
120 IP or FQDN of the Unity management server.
121
122
123 username (True, str, None)
124 The username of the Unity management server.
125
126
127 password (True, str, None)
128 The password of the Unity management server.
129
130
131 validate_certs (optional, bool, True)
132 Boolean variable to specify whether or not to validate SSL certificate.
133
134 ``true`` - Indicates that the SSL certificate should be verified.
135
136 ``false`` - Indicates that the SSL certificate should not be verified.
137
138
139 port (optional, int, 443)
140 Port number through which communication happens with Unity management server.
141
142
143
144
145
146 Notes
147 -----
148
149 .. note::
150 - Filesystem snapshot cannot be deleted, if it has nfs or smb share.
151 - The *check_mode* is not supported.
152 - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform.
153
154
155
156
157 Examples
158 --------
159
160 .. code-block:: yaml+jinja
161
162
163 - name: Create Filesystem Snapshot
164 filesystem_snapshot:
165 unispherehost: "{{unispherehost}}"
166 username: "{{username}}"
167 password: "{{password}}"
168 validate_certs: "{{validate_certs}}"
169 snapshot_name: "ansible_test_FS_snap"
170 filesystem_name: "ansible_test_FS"
171 nas_server_name: "lglad069"
172 description: "Created using playbook"
173 auto_delete: True
174 fs_access_type: "Protocol"
175 state: "present"
176
177 - name: Create Filesystem Snapshot with expiry time
178 filesystem_snapshot:
179 unispherehost: "{{unispherehost}}"
180 username: "{{username}}"
181 password: "{{password}}"
182 validate_certs: "{{validate_certs}}"
183 snapshot_name: "ansible_test_FS_snap_1"
184 filesystem_name: "ansible_test_FS_1"
185 nas_server_name: "lglad069"
186 description: "Created using playbook"
187 expiry_time: "04/15/2021 2:30"
188 fs_access_type: "Protocol"
189 state: "present"
190
191 - name: Get Filesystem Snapshot Details using Name
192 filesystem_snapshot:
193 unispherehost: "{{unispherehost}}"
194 username: "{{username}}"
195 password: "{{password}}"
196 validate_certs: "{{validate_certs}}"
197 snapshot_name: "ansible_test_FS_snap"
198 state: "present"
199
200 - name: Get Filesystem Snapshot Details using ID
201 filesystem_snapshot:
202 unispherehost: "{{unispherehost}}"
203 username: "{{username}}"
204 password: "{{password}}"
205 validate_certs: "{{validate_certs}}"
206 snapshot_id: "10008000403"
207 state: "present"
208
209 - name: Update Filesystem Snapshot attributes
210 filesystem_snapshot:
211 unispherehost: "{{unispherehost}}"
212 username: "{{username}}"
213 password: "{{password}}"
214 validate_certs: "{{validate_certs}}"
215 snapshot_name: "ansible_test_FS_snap"
216 description: "Description updated"
217 auto_delete: False
218 expiry_time: "04/15/2021 5:30"
219 state: "present"
220
221 - name: Update Filesystem Snapshot attributes using ID
222 filesystem_snapshot:
223 unispherehost: "{{unispherehost}}"
224 username: "{{username}}"
225 password: "{{password}}"
226 validate_certs: "{{validate_certs}}"
227 snapshot_id: "10008000403"
228 expiry_time: "04/18/2021 8:30"
229 state: "present"
230
231 - name: Delete Filesystem Snapshot using Name
232 filesystem_snapshot:
233 unispherehost: "{{unispherehost}}"
234 username: "{{username}}"
235 password: "{{password}}"
236 validate_certs: "{{validate_certs}}"
237 snapshot_name: "ansible_test_FS_snap"
238 state: "absent"
239
240 - name: Delete Filesystem Snapshot using ID
241 filesystem_snapshot:
242 unispherehost: "{{unispherehost}}"
243 username: "{{username}}"
244 password: "{{password}}"
245 validate_certs: "{{validate_certs}}"
246 snapshot_id: "10008000403"
247 state: "absent"
248
249
250
251 Return Values
252 -------------
253
254 changed (always, bool, True)
255 Whether or not the resource has changed.
256
257
258 filesystem_snapshot_details (When filesystem snapshot exists, dict, {'access_type': 'FilesystemSnapAccessTypeEnum.CHECKPOINT', 'attached_wwn': None, 'creation_time': '2022-10-21 04:42:53.951000+00:00', 'creator_schedule': None, 'creator_type': 'SnapCreatorTypeEnum.USER_CUSTOM', 'creator_user': {'id': 'user_admin'}, 'description': 'Created using playbook', 'existed': True, 'expiration_time': None, 'filesystem_id': 'fs_137', 'filesystem_name': 'test', 'hash': 8739894572587, 'host_access': None, 'id': '171798721695', 'io_limit_policy': None, 'is_auto_delete': True, 'is_modifiable': False, 'is_modified': False, 'is_read_only': True, 'is_system_snap': False, 'last_writable_time': None, 'lun': None, 'name': 'test_FS_snap_1', 'nas_server_id': 'nas_1', 'nas_server_name': 'lglad072', 'parent_snap': None, 'size': 107374182400, 'snap_group': None, 'state': 'SnapStateEnum.READY'})
259 Details of the filesystem snapshot.
260
261
262 access_type (, str, )
263 Access type of filesystem snapshot.
264
265
266 attached_wwn (, str, )
267 Attached WWN details.
268
269
270 creation_time (, str, )
271 Creation time of filesystem snapshot.
272
273
274 creator_schedule (, str, )
275 Creator schedule of filesystem snapshot.
276
277
278 creator_type (, str, )
279 Creator type for filesystem snapshot.
280
281
282 creator_user (, str, )
283 Creator user for filesystem snapshot.
284
285
286 description (, str, )
287 Description of the filesystem snapshot.
288
289
290 expiration_time (, str, )
291 Date and time after which the filesystem snapshot will expire.
292
293
294 is_auto_delete (, bool, )
295 Is the filesystem snapshot is auto deleted or not.
296
297
298 id (, str, )
299 Unique identifier of the filesystem snapshot instance.
300
301
302 name (, str, )
303 The name of the filesystem snapshot.
304
305
306 size (, int, )
307 Size of the filesystem snapshot.
308
309
310 filesystem_name (, str, )
311 Name of the filesystem for which the snapshot exists.
312
313
314 filesystem_id (, str, )
315 Id of the filesystem for which the snapshot exists.
316
317
318 nas_server_name (, str, )
319 Name of the NAS server on which filesystem exists.
320
321
322 nas_server_id (, str, )
323 Id of the NAS server on which filesystem exists.
324
325
326
327
328
329
330 Status
331 ------
332
333
334
335
336
337 Authors
338 ~~~~~~~
339
340 - Rajshree Khare (@kharer5) <[email protected]>
341