1.1 --- a/docs/wiki/Resources Tue May 10 15:16:55 2016 +0200
1.2 +++ b/docs/wiki/Resources Tue May 10 15:45:53 2016 +0200
1.3 @@ -372,59 +372,36 @@
1.4
1.5 ==== Initialising Quotas ====
1.6
1.7 -Within the journal storage area (described in the
1.8 -[[../FilesystemUsage|filesystem guide]] and [[../DatabaseStore|database guide]]),
1.9 -a quota group directory must be initialised with a `limits` file indicating
1.10 -the amount of time that can be occupied by the cumulative total of all events
1.11 -scheduled by an individual user or a group of which they are a member. For
1.12 -example:
1.13 +Within the journal storage area, a quota may be initialised with limits
1.14 +indicating the amount of time that can be occupied by the cumulative total of
1.15 +all events scheduled by an individual user or a group of which they are a
1.16 +member.
1.17 +
1.18 +Such limits may be set directly using the `limits` file in a quota directory
1.19 +(described in the [[../FilesystemUsage|filesystem guide]]) or in the
1.20 +`quota_limits` table (described in the [[../DatabaseStore|database guide]]),
1.21 +but a tool is also provided to set such limits. For example:
1.22
1.23 {{{
1.24 -mailto:vincent.vole@example.com PT10H
1.25 +set_quota_limit.py 'mailto:resource-car-cadillac@example.com' \
1.26 + 'mailto:vincent.vole@example.com' PT10H
1.27 }}}
1.28
1.29 -This indicates that the given user may only reserve 10 hours of events or less.
1.30 -Attempts to schedule more time will be declined.
1.31 +This indicates that the given user may only reserve 10 hours of events or less
1.32 +within the given quota (corresponding to a specific resource in the above
1.33 +example). Attempts to schedule more time will be declined.
1.34
1.35 To impose a general quota, the special `*` identity can be used:
1.36
1.37 {{{
1.38 -* PT10H
1.39 +set_quota_limit.py 'mailto:resource-car-cadillac@example.com' \
1.40 + '*' PT10H
1.41 }}}
1.42
1.43 When a user identity is not listed and no general quota is defined, that
1.44 particular user will be unable to reserve the resource unless defined as a
1.45 member of a group listed in the `limits` file, as described below.
1.46
1.47 -{{{{#!wiki tip
1.48 -In a deployment using the [[../FileStore|file store]], files as described
1.49 -above and below hold mappings and definitions in the given format. In a
1.50 -deployment using the [[../DatabaseStore|database store]], database tables
1.51 -hold such mappings with each column dedicated to a particular kind of
1.52 -information.
1.53 -
1.54 -The examples here can be transcribed by just taking each
1.55 -element and putting it in the appropriate column within a table, making
1.56 -sure to set the `quota` column to indicate which quota is involved. For
1.57 -example, to set the above limits in PostgreSQL, the following operations
1.58 -may be used:
1.59 -
1.60 -{{{
1.61 -insert into quota_limits (quota, user_group, quota_limit) values (
1.62 - 'mailto:resource-car-cadillac@example.com',
1.63 - 'mailto:vincent.vole@example.com',
1.64 - 'PT10H');
1.65 -insert into quota_limits (quota, user_group, quota_limit) values (
1.66 - 'mailto:resource-car-cadillac@example.com',
1.67 - '*',
1.68 - 'PT10H');
1.69 -}}}
1.70 -
1.71 -Here, the `quota` column is set to `mailto:resource-car-cadillac@example.com`.
1.72 -In a file-based journal, the equivalent `limits` file would be placed within a
1.73 -quota directory having the name `mailto:resource-car-cadillac@example.com`.
1.74 -}}}}
1.75 -
1.76 ==== Sharing Quotas Across Users ====
1.77
1.78 When the use of resources is to be shared between users in such a way that