EnQuotaModule » Cronologia » Versione 4
Amministratore Truelite, 10-06-2010 17:14
1 | 1 | Amministratore Truelite | |
---|---|---|---|
2 | 4 | Amministratore Truelite | h2. Module quota |
3 | 1 | Amministratore Truelite | |
4 | 4 | Amministratore Truelite | |
5 | <pre> |
||
6 | |||
7 | 1 | Amministratore Truelite | It's still extremely primordial, providing limited functionality and working only with Linux quota version 2. It has been tested on Debian Etch and Lenny. As my first attempt to write a module it is also very far from elegance (and no pythonic at all). |
8 | |||
9 | |||
10 | 4 | Amministratore Truelite | h3. Installation |
11 | |||
12 | |||
13 | 1 | Amministratore Truelite | To install the module you need the following steps (provided you have standard development tools installed): |
14 | 4 | Amministratore Truelite | <pre> |
15 | 1 | Amministratore Truelite | svn co https://labs.truelite.it/svn/cyrcus/quotamodule |
16 | cd quotamodule/ |
||
17 | python setup.py build |
||
18 | 4 | Amministratore Truelite | </pre> |
19 | <pre> |
||
20 | 1 | Amministratore Truelite | |
21 | |||
22 | 4 | Amministratore Truelite | h3. Use |
23 | |||
24 | |||
25 | 1 | Amministratore Truelite | The module provides the following functions (interface is preliminar, it will be probably changed in future releases): |
26 | |||
27 | 4 | Amministratore Truelite | ||*Function*||*Arguments*||*Description*|| |
28 | <pre> |
||
29 | <pre> |
||
30 | <pre> |
||
31 | <pre> |
||
32 | <pre> |
||
33 | <pre> |
||
34 | 1 | Amministratore Truelite | |
35 | 4 | Amministratore Truelite | <pre> |
36 | 1 | Amministratore Truelite | |
37 | When setting quotas they must be provided as a tuple of two integer values (first for soft limit, second for hard limit). They will be applied to inode/block, user/group according to the chosen function. |
||
38 | |||
39 | Reading quota will give back a tuple of two dictionaries. First dictionary is for block quota data, second for inode quota data. Both dictionaries will have the same string keys according to the following table: |
||
40 | |||
41 | 4 | Amministratore Truelite | ||*Key*||*Desctiption*|| |
42 | 1 | Amministratore Truelite | ||used|| integer with the actual usage of the resource (blocks or inodes number)|| |
43 | ||quota|| a two integers tuple with the current value of the quota (soft limit, hard limit) || |
||
44 | ||grace|| an integer with the time_t value of the grace expiration (if active)|| |
||
45 | |||
46 | |||
47 | 4 | Amministratore Truelite | h3. Error handling |
48 | |||
49 | |||
50 | <pre> |