Debian Codegraph @

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

raw
1 .. _snapshotschedule_module:
2
3
4 snapshotschedule -- Manage snapshot schedules on Unity storage system
5 =====================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 Managing snapshot schedules on Unity storage system includes creating new snapshot schedule, getting details of snapshot schedule, modifying attributes of snapshot schedule, and deleting snapshot schedule.
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 name (optional, str, None)
34 The name of the snapshot schedule.
35
36 Name is mandatory for a create operation.
37
38 Specify either *name* or *id* (but not both) for any operation.
39
40
41 id (optional, str, None)
42 The ID of the snapshot schedule.
43
44
45 type (optional, str, None)
46 Type of the rule to be included in snapshot schedule.
47
48 Type is mandatory for any create or modify operation.
49
50 Once the snapshot schedule is created with one type it can be modified.
51
52
53 interval (optional, int, None)
54 Number of hours between snapshots.
55
56 Applicable only when rule type is ``every_n_hours``.
57
58
59 hours_of_day (optional, list, None)
60 Hours of the day when the snapshot will be taken.
61
62 Applicable only when rule type is ``every_day``.
63
64
65 day_interval (optional, int, None)
66 Number of days between snapshots.
67
68 Applicable only when rule type is ``every_n_days``.
69
70
71 days_of_week (optional, list, None)
72 Days of the week for which the snapshot schedule rule applies.
73
74 Applicable only when rule type is ``every_week``.
75
76
77 day_of_month (optional, int, None)
78 Day of the month for which the snapshot schedule rule applies.
79
80 Applicable only when rule type is ``every_month``.
81
82 Value should be [1, 31].
83
84
85 hour (optional, int, None)
86 The hour when the snapshot will be taken.
87
88 Applicable for ``every_n_days``, ``every_week``, ``every_month`` rule types.
89
90 For create operation, if *hour* parameter is not specified, value will be taken as ``0``.
91
92 Value should be [0, 23].
93
94
95 minute (optional, int, None)
96 Minute offset from the hour when the snapshot will be taken.
97
98 Applicable for all rule types.
99
100 For a create operation, if *minute* parameter is not specified, value will be taken as ``0``.
101
102 Value should be [0, 59].
103
104
105 desired_retention (optional, int, None)
106 The number of days/hours for which snapshot will be retained.
107
108 When *auto_delete* is ``true``, *desired_retention* cannot be specified.
109
110 Maximum desired retention supported is 31 days or 744 hours.
111
112
113 retention_unit (optional, str, hours)
114 The retention unit for the snapshot.
115
116
117 auto_delete (optional, bool, None)
118 Indicates whether the system can automatically delete the snapshot.
119
120
121 state (True, str, None)
122 Define whether the snapshot schedule should exist or not.
123
124
125 unispherehost (True, str, None)
126 IP or FQDN of the Unity management server.
127
128
129 username (True, str, None)
130 The username of the Unity management server.
131
132
133 password (True, str, None)
134 The password of the Unity management server.
135
136
137 validate_certs (optional, bool, True)
138 Boolean variable to specify whether or not to validate SSL certificate.
139
140 ``true`` - Indicates that the SSL certificate should be verified.
141
142 ``false`` - Indicates that the SSL certificate should not be verified.
143
144
145 port (optional, int, 443)
146 Port number through which communication happens with Unity management server.
147
148
149
150
151
152 Notes
153 -----
154
155 .. note::
156 - Snapshot schedule created through Ansible will have only one rule.
157 - Modification of rule type is not allowed. Within the same type, other parameters can be modified.
158 - If an existing snapshot schedule has more than 1 rule in it, only get and delete operation is allowed.
159 - The *check_mode* is not supported.
160 - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform.
161
162
163
164
165 Examples
166 --------
167
168 .. code-block:: yaml+jinja
169
170
171 - name: Create snapshot schedule (Rule Type - every_n_hours)
172 snapshotschedule:
173 unispherehost: "{{unispherehost}}"
174 validate_certs: "{{validate_certs}}"
175 username: "{{username}}"
176 password: "{{password}}"
177 name: "Ansible_Every_N_Hours_Testing"
178 type: "every_n_hours"
179 interval: 6
180 desired_retention: 24
181 state: "{{state_present}}"
182
183 - name: Create snapshot schedule (Rule Type - every_day)
184 snapshotschedule:
185 unispherehost: "{{unispherehost}}"
186 validate_certs: "{{validate_certs}}"
187 username: "{{username}}"
188 password: "{{password}}"
189 name: "Ansible_Every_Day_Testing"
190 type: "every_day"
191 hours_of_day:
192 - 8
193 - 14
194 auto_delete: True
195 state: "{{state_present}}"
196
197 - name: Create snapshot schedule (Rule Type - every_n_days)
198 snapshotschedule:
199 unispherehost: "{{unispherehost}}"
200 validate_certs: "{{validate_certs}}"
201 username: "{{username}}"
202 password: "{{password}}"
203 name: "Ansible_Every_N_Day_Testing"
204 type: "every_n_days"
205 day_interval: 2
206 desired_retention: 16
207 retention_unit: "days"
208 state: "{{state_present}}"
209
210 - name: Create snapshot schedule (Rule Type - every_week)
211 snapshotschedule:
212 unispherehost: "{{unispherehost}}"
213 validate_certs: "{{validate_certs}}"
214 username: "{{username}}"
215 password: "{{password}}"
216 name: "Ansible_Every_Week_Testing"
217 type: "every_week"
218 days_of_week:
219 - MONDAY
220 - FRIDAY
221 hour: 12
222 minute: 30
223 desired_retention: 200
224 state: "{{state_present}}"
225
226 - name: Create snapshot schedule (Rule Type - every_month)
227 snapshotschedule:
228 unispherehost: "{{unispherehost}}"
229 validate_certs: "{{validate_certs}}"
230 username: "{{username}}"
231 password: "{{password}}"
232 name: "Ansible_Every_Month_Testing"
233 type: "every_month"
234 day_of_month: 17
235 auto_delete: True
236 state: "{{state_present}}"
237
238 - name: Get snapshot schedule details using name
239 snapshotschedule:
240 unispherehost: "{{unispherehost}}"
241 validate_certs: "{{validate_certs}}"
242 username: "{{username}}"
243 password: "{{password}}"
244 name: "Ansible_Every_N_Hours_Testing"
245 state: "{{state_present}}"
246
247 - name: Get snapshot schedule details using id
248 snapshotschedule:
249 unispherehost: "{{unispherehost}}"
250 validate_certs: "{{validate_certs}}"
251 username: "{{username}}"
252 password: "{{password}}"
253 id: "{{id}}"
254 state: "{{state_present}}"
255
256 - name: Modify snapshot schedule details id
257 snapshotschedule:
258 unispherehost: "{{unispherehost}}"
259 validate_certs: "{{validate_certs}}"
260 username: "{{username}}"
261 password: "{{password}}"
262 id: "{{id}}"
263 type: "every_n_hours"
264 interval: 8
265 state: "{{state_present}}"
266
267 - name: Modify snapshot schedule using name
268 snapshotschedule:
269 unispherehost: "{{unispherehost}}"
270 validate_certs: "{{validate_certs}}"
271 username: "{{username}}"
272 password: "{{password}}"
273 name: "Ansible_Every_Day_Testing"
274 type: "every_day"
275 desired_retention: 200
276 auto_delete: False
277 state: "{{state_present}}"
278
279 - name: Delete snapshot schedule using id
280 snapshotschedule:
281 unispherehost: "{{unispherehost}}"
282 validate_certs: "{{validate_certs}}"
283 username: "{{username}}"
284 password: "{{password}}"
285 id: "{{id}}"
286 state: "{{state_absent}}"
287
288 - name: Delete snapshot schedule using name
289 snapshotschedule:
290 unispherehost: "{{unispherehost}}"
291 validate_certs: "{{validate_certs}}"
292 username: "{{username}}"
293 password: "{{password}}"
294 name: "Ansible_Every_Day_Testing"
295 state: "{{state_absent}}"
296
297
298
299 Return Values
300 -------------
301
302 changed (always, bool, True)
303 Whether or not the resource has changed.
304
305
306 snapshot_schedule_details (When snapshot schedule exists, dict, {'existed': True, 'hash': 8742032390151, 'id': 'snapSch_63', 'is_default': False, 'is_modified': None, 'is_sync_replicated': False, 'luns': None, 'modification_time': '2021-12-14 21:37:47.905000+00:00', 'name': 'SS7_empty_hour_SS', 'rules': [{'access_type': 'FilesystemSnapAccessTypeEnum.CHECKPOINT', 'days_of_month': None, 'days_of_week': {'DayOfWeekEnumList': []}, 'existed': True, 'hash': 8742032280772, 'hours': [0], 'id': 'SchedRule_109', 'interval': 2, 'is_auto_delete': False, 'minute': 0, 'retention_time': 86400, 'retention_time_in_hours': 24, 'rule_type': 'every_n_days', 'type': 'ScheduleTypeEnum.N_DAYS_AT_HHMM'}], 'storage_resources': None, 'version': 'ScheduleVersionEnum.LEGACY'})
307 Details of the snapshot schedule.
308
309
310 id (, str, )
311 The system ID given to the snapshot schedule.
312
313
314 name (, str, )
315 The name of the snapshot schedule.
316
317
318 luns (, dict, )
319 Details of volumes for which snapshot schedule applied.
320
321
322 UnityLunList (, list, )
323 List of volumes for which snapshot schedule applied.
324
325
326 UnityLun (, dict, )
327 Detail of volume.
328
329
330 id (, str, )
331 The system ID given to volume.
332
333
334
335
336
337 rules (, list, )
338 Details of rules that apply to snapshot schedule.
339
340
341 id (, str, )
342 The system ID of the rule.
343
344
345 interval (, int, )
346 Number of days or hours between snaps, depending on the rule type.
347
348
349 hours (, list, )
350 Hourly frequency for the snapshot schedule rule.
351
352
353 minute (, int, )
354 Minute frequency for the snapshot schedule rule.
355
356
357 days_of_week (, dict, )
358 Days of the week for which the snapshot schedule rule applies.
359
360
361 DayOfWeekEnumList (, list, )
362 Enumeration of days of the week.
363
364
365
366 days_of_month (, list, )
367 Days of the month for which the snapshot schedule rule applies.
368
369
370 retention_time (, int, )
371 Period of time in seconds for which to keep the snapshot.
372
373
374 retention_time_in_hours (, int, )
375 Period of time in hours for which to keep the snapshot.
376
377
378 rule_type (, str, )
379 Type of the rule applied to snapshot schedule.
380
381
382 is_auto_delete (, bool, )
383 Indicates whether the system can automatically delete the snapshot based on pool automatic-deletion thresholds.
384
385
386
387 storage_resources (, dict, )
388 Details of storage resources for which snapshot. schedule applied.
389
390
391 UnityStorageResourceList (, list, )
392 List of storage resources for which snapshot schedule applied.
393
394
395 UnityStorageResource (, dict, )
396 Detail of storage resource.
397
398
399 id (, str, )
400 The system ID given to storage resource.
401
402
403
404
405
406
407
408
409
410 Status
411 ------
412
413
414
415
416
417 Authors
418 ~~~~~~~
419
420 - Akash Shendge (@shenda1) <[email protected]>
421