Debian Codegraph @

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

raw
1 .. _user_quota_module:
2
3
4 user_quota -- Manage user quota on the Unity storage system
5 ===========================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 Managing User Quota on the Unity storage system includes Create user quota, Get user quota, Modify user quota, Delete user quota, Create user quota for quota tree, Modify user quota for quota tree and Delete user quota for quota tree.
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 filesystem_name (optional, str, None)
34 The name of the filesystem for which the user quota is created.
35
36 For creation of a user quota either *filesystem_name* or *filesystem_id* is required.
37
38
39 filesystem_id (optional, str, None)
40 The ID of the filesystem for which the user quota is created.
41
42 For creation of a user quota either *filesystem_id* or *filesystem_name* is required.
43
44
45 nas_server_name (optional, str, None)
46 The name of the NAS server in which the filesystem is created.
47
48 For creation of a user quota either *nas_server_name* or *nas_server_id* is required.
49
50
51 nas_server_id (optional, str, None)
52 The ID of the NAS server in which the filesystem is created.
53
54 For creation of a user quota either *filesystem_id* or *filesystem_name* is required.
55
56
57 hard_limit (optional, int, None)
58 Hard limitation for a user on the total space available. If exceeded, user cannot write data.
59
60 Value ``0`` implies no limit.
61
62 One of the values of *soft_limit* and *hard_limit* can be ``0``, however, both cannot be ``0`` during creation or modification of user quota.
63
64
65 soft_limit (optional, int, None)
66 Soft limitation for a user on the total space available. If exceeded, notification will be sent to the user for the grace period mentioned, beyond which the user cannot use space.
67
68 Value ``0`` implies no limit.
69
70 Both *soft_limit* and *hard_limit* cannot be ``0`` during creation or modification of user quota.
71
72
73 cap_unit (optional, str, None)
74 Unit of *soft_limit* and *hard_limit* size.
75
76 It defaults to ``GB`` if not specified.
77
78
79 user_type (optional, str, None)
80 Type of user creating a user quota.
81
82 Mandatory while creating or modifying user quota.
83
84
85 win_domain (optional, str, None)
86 Fully qualified or short domain name for Windows user type.
87
88 Mandatory when *user_type* is ``Windows``.
89
90
91 user_name (optional, str, None)
92 User name of the user quota when *user_type* is ``Windows`` or ``Unix``.
93
94 Option *user_name* must be specified along with *win_domain* when *user_type* is ``Windows``.
95
96
97 uid (optional, str, None)
98 User ID of the user quota.
99
100
101 user_quota_id (optional, str, None)
102 User quota ID generated after creation of a user quota.
103
104
105 tree_quota_id (optional, str, None)
106 The ID of the quota tree.
107
108 Either *tree_quota_id* or *path* to quota tree is required to create/modify/delete user quota for a quota tree.
109
110
111 path (optional, str, None)
112 The path to the quota tree.
113
114 Either *tree_quota_id* or *path* to quota tree is required to create/modify/delete user quota for a quota tree.
115
116 Path must start with a forward slash '/'.
117
118
119 state (True, str, None)
120 The *state* option is used to mention the existence of the user quota.
121
122
123 unispherehost (True, str, None)
124 IP or FQDN of the Unity management server.
125
126
127 username (True, str, None)
128 The username of the Unity management server.
129
130
131 password (True, str, None)
132 The password of the Unity management server.
133
134
135 validate_certs (optional, bool, True)
136 Boolean variable to specify whether or not to validate SSL certificate.
137
138 ``true`` - Indicates that the SSL certificate should be verified.
139
140 ``false`` - Indicates that the SSL certificate should not be verified.
141
142
143 port (optional, int, 443)
144 Port number through which communication happens with Unity management server.
145
146
147
148
149
150 Notes
151 -----
152
153 .. note::
154 - The *check_mode* is not supported.
155 - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform.
156
157
158
159
160 Examples
161 --------
162
163 .. code-block:: yaml+jinja
164
165
166 - name: Get user quota details by user quota id
167 user_quota:
168 unispherehost: "{{unispherehost}}"
169 username: "{{username}}"
170 password: "{{password}}"
171 validate_certs: "{{validate_certs}}"
172 user_quota_id: "userquota_171798700679_0_123"
173 state: "present"
174
175 - name: Get user quota details by user quota uid/user name
176 user_quota:
177 unispherehost: "{{unispherehost}}"
178 username: "{{username}}"
179 password: "{{password}}"
180 validate_certs: "{{validate_certs}}"
181 filesystem_name: "fs_2171"
182 nas_server_id: "nas_21"
183 user_name: "test"
184 state: "present"
185
186 - name: Create user quota for a filesystem with filesystem id
187 user_quota:
188 unispherehost: "{{unispherehost}}"
189 username: "{{username}}"
190 password: "{{password}}"
191 validate_certs: "{{validate_certs}}"
192 filesystem_id: "fs_2171"
193 hard_limit: 6
194 cap_unit: "TB"
195 soft_limit: 5
196 uid: "111"
197 state: "present"
198
199 - name: Create user quota for a filesystem with filesystem name
200 user_quota:
201 unispherehost: "{{unispherehost}}"
202 username: "{{username}}"
203 password: "{{password}}"
204 validate_certs: "{{validate_certs}}"
205 filesystem_name: "Test_filesystem"
206 nas_server_name: "lglad068"
207 hard_limit: 6
208 cap_unit: "TB"
209 soft_limit: 5
210 uid: "111"
211 state: "present"
212
213 - name: Modify user quota limit usage by user quota id
214 user_quota:
215 unispherehost: "{{unispherehost}}"
216 username: "{{username}}"
217 password: "{{password}}"
218 validate_certs: "{{validate_certs}}"
219 user_quota_id: "userquota_171798700679_0_123"
220 hard_limit: 10
221 cap_unit: "TB"
222 soft_limit: 8
223 state: "present"
224
225 - name: Modify user quota by filesystem id and user quota uid/user_name
226 user_quota:
227 unispherehost: "{{unispherehost}}"
228 username: "{{username}}"
229 password: "{{password}}"
230 validate_certs: "{{validate_certs}}"
231 filesystem_id: "fs_2171"
232 user_type: "Windows"
233 win_domain: "prod"
234 user_name: "sample"
235 hard_limit: 12
236 cap_unit: "TB"
237 soft_limit: 10
238 state: "present"
239
240 - name: Delete user quota
241 user_quota:
242 unispherehost: "{{unispherehost}}"
243 username: "{{username}}"
244 password: "{{password}}"
245 validate_certs: "{{validate_certs}}"
246 filesystem_id: "fs_2171"
247 win_domain: "prod"
248 user_name: "sample"
249 state: "absent"
250
251 - name: Create user quota of a quota tree
252 user_quota:
253 unispherehost: "{{unispherehost}}"
254 username: "{{username}}"
255 password: "{{password}}"
256 validate_certs: "{{validate_certs}}"
257 tree_quota_id: "treequota_171798700679_4"
258 user_type: "Windows"
259 win_domain: "prod"
260 user_name: "sample"
261 soft_limit: 9
262 cap_unit: "TB"
263 state: "present"
264
265 - name: Create user quota of a quota tree by quota tree path
266 user_quota:
267 unispherehost: "{{unispherehost}}"
268 username: "{{username}}"
269 password: "{{password}}"
270 validate_certs: "{{validate_certs}}"
271 filesystem_id: "fs_2171"
272 path: "/sample"
273 user_type: "Unix"
274 user_name: "test"
275 hard_limit: 2
276 cap_unit: "TB"
277 state: "present"
278
279 - name: Modify user quota of a quota tree
280 user_quota:
281 unispherehost: "{{unispherehost}}"
282 username: "{{username}}"
283 password: "{{password}}"
284 validate_certs: "{{validate_certs}}"
285 tree_quota_id: "treequota_171798700679_4"
286 user_type: "Windows"
287 win_domain: "prod"
288 user_name: "sample"
289 soft_limit: 10
290 cap_unit: "TB"
291 state: "present"
292
293 - name: Modify user quota of a quota tree by quota tree path
294 user_quota:
295 unispherehost: "{{unispherehost}}"
296 username: "{{username}}"
297 password: "{{password}}"
298 validate_certs: "{{validate_certs}}"
299 filesystem_id: "fs_2171"
300 path: "/sample"
301 user_type: "Windows"
302 win_domain: "prod"
303 user_name: "sample"
304 hard_limit: 12
305 cap_unit: "TB"
306 state: "present"
307
308 - name: Delete user quota of a quota tree by quota tree path
309 user_quota:
310 unispherehost: "{{unispherehost}}"
311 username: "{{username}}"
312 password: "{{password}}"
313 validate_certs: "{{validate_certs}}"
314 filesystem_id: "fs_2171"
315 path: "/sample"
316 win_domain: "prod"
317 user_name: "sample"
318 state: "absent"
319
320 - name: Delete user quota of a quota tree by quota tree id
321 user_quota:
322 unispherehost: "{{unispherehost}}"
323 username: "{{username}}"
324 password: "{{password}}"
325 validate_certs: "{{validate_certs}}"
326 tree_quota_id: "treequota_171798700679_4"
327 win_domain: "prod"
328 user_name: "sample"
329 state: "absent"
330
331
332
333 Return Values
334 -------------
335
336 changed (always, bool, True)
337 Whether or not the resource has changed.
338
339
340 get_user_quota_details (When user quota exists, dict, {'existed': True, 'filesystem': {'UnityFileSystem': {'hash': 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER', 'id': 'fs_120', 'name': 'nfs-multiprotocol', 'nas_server': {'id': 'nas_1', 'name': 'lglad072'}}}, 'gp_left': None, 'hard_limit': '10.0 GB', 'hard_ratio': None, 'hash': 8752448438089, 'id': 'userquota_171798694698_0_60000', 'size_used': 0, 'soft_limit': '10.0 GB', 'soft_ratio': None, 'state': 0, 'tree_quota': None, 'uid': 60000, 'unix_name': None, 'windows_names': None, 'windows_sids': None})
341 Details of the user quota.
342
343
344 filesystem (, dict, )
345 Filesystem details for which the user quota is created.
346
347
348 UnityFileSystem (, dict, )
349 Filesystem details for which the user quota is created.
350
351
352 id (, str, )
353 ID of the filesystem for which the user quota is created.
354
355
356 name (, str, )
357 Name of filesystem.
358
359
360 nas_server (, dict, )
361 Nasserver details where filesystem is created.
362
363
364 name (, str, )
365 Name of nasserver.
366
367
368 id (, str, )
369 ID of nasserver.
370
371
372
373
374
375 tree_quota (, dict, )
376 Quota tree details for which the user quota is created.
377
378
379 UnityTreeQuota (, dict, )
380 Quota tree details for which the user quota is created.
381
382
383 id (, str, )
384 ID of the quota tree.
385
386
387 path (, str, )
388 Path to quota tree.
389
390
391
392
393 gp_left (, int, )
394 The grace period left after the soft limit for the user quota is exceeded.
395
396
397 hard_limit (, int, )
398 Hard limitation for a user on the total space available. If exceeded, user cannot write data.
399
400
401 hard_ratio (, str, )
402 The hard ratio is the ratio between the hard limit size of the user quota and the amount of storage actually consumed.
403
404
405 soft_limit (, int, )
406 Soft limitation for a user on the total space available. If exceeded, notification will be sent to user for the grace period mentioned, beyond which user cannot use space.
407
408
409 soft_ratio (, str, )
410 The soft ratio is the ratio between the soft limit size of the user quota and the amount of storage actually consumed.
411
412
413 id (, str, )
414 User quota ID.
415
416
417 size_used (, int, )
418 Size of used space in the filesystem by the user files.
419
420
421 state (, int, )
422 State of the user quota.
423
424
425 uid (, int, )
426 User ID of the user.
427
428
429 unix_name (, str, )
430 Unix user name for this user quota's uid.
431
432
433 windows_names (, str, )
434 Windows user name that maps to this quota's uid.
435
436
437 windows_sids (, str, )
438 Windows SIDs that maps to this quota's uid
439
440
441
442
443
444
445 Status
446 ------
447
448
449
450
451
452 Authors
453 ~~~~~~~
454
455 - Spandita Panigrahi (@panigs7) <[email protected]>
456