Actions
EnQuotaModule » Cronologia » Versione 4
« Precedente |
Versione 4/7
(diff)
| Successivo »
Amministratore Truelite, 10-06-2010 17:14
Module quota¶
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). h3. Installation To install the module you need the following steps (provided you have standard development tools installed): <pre> svn co https://labs.truelite.it/svn/cyrcus/quotamodule cd quotamodule/ python setup.py build </pre> <pre> h3. Use The module provides the following functions (interface is preliminar, it will be probably changed in future releases): ||*Function*||*Arguments*||*Description*|| <pre> <pre> <pre> <pre> <pre> <pre> <pre> 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. 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: ||*Key*||*Desctiption*|| ||used|| integer with the actual usage of the resource (blocks or inodes number)|| ||quota|| a two integers tuple with the current value of the quota (soft limit, hard limit) || ||grace|| an integer with the time_t value of the grace expiration (if active)|| h3. Error handling <pre>
Aggiornato da Amministratore Truelite oltre 14 anni fa · 4 revisions